Package com.google.devtools.moe.client.editors

Examples of com.google.devtools.moe.client.editors.TranslatorPath


    ImmutableMap<String, Editor> editors = editorsBuilder.build();

    ImmutableMap.Builder<TranslatorPath, Translator> translatorsBuilder = ImmutableMap.builder();
    for (TranslatorConfig tc : config.getTranslators()) {
      Translator t = makeTranslatorFromConfig(tc, config);
      TranslatorPath tPath = new TranslatorPath(tc.getFromProjectSpace(), tc.getToProjectSpace());
      translatorsBuilder.put(tPath, t);
    }
    ImmutableMap<TranslatorPath, Translator> translators = translatorsBuilder.build();

    ImmutableMap.Builder<String, MigrationConfig> migrationConfigsBuilder = ImmutableMap.builder();
View Full Code Here


  @Override
  public Codebase createCodebase(ProjectContext context) throws CodebaseCreationError {
    Codebase codebaseToTranslate = exToTranslate.createCodebase(context);
    String toProjectSpace = translateOp.term.identifier;
    TranslatorPath path = new TranslatorPath(
        codebaseToTranslate.getProjectSpace(), toProjectSpace);
    Translator translator = context.translators.get(path);
    if (translator == null) {
      throw new CodebaseCreationError(
          String.format("Could not find translator from project space \"%s\" to \"%s\"",
View Full Code Here

    File firstDir = new File("/first");
    File secondDir = new File("/second");
    File finalDir = new File("/final");

    TranslatorPath tPath = new TranslatorPath("foo", "public");
    Translator t = new ForwardTranslator(ImmutableList.<TranslatorStep>of(
        new TranslatorStep("quux", translatorEditor)));
   
    ProjectContext context = ProjectContext.builder()
        .withRepositories(ImmutableMap.of("foo", new Repository("foo", null, cc, null)))
View Full Code Here

TOP

Related Classes of com.google.devtools.moe.client.editors.TranslatorPath

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.