Examples of ProtocCommandBuilder


Examples of com.google.eclipse.protobuf.ui.protoc.command.ProtocCommandBuilder

    CompilerPreferences compilerPreferences = compilerPreferences(storeAccess, project);
    if (!compilerPreferences.shouldCompileProtoFiles()) {
      return;
    }
    PathsPreferences pathsPreferences = new PathsPreferences(storeAccess, project);
    ProtocCommandBuilder commandBuilder = new ProtocCommandBuilder(compilerPreferences, pathsPreferences);
    for (Delta delta : deltas) {
      if (subMonitor.isCanceled()) {
        throw new OperationCanceledException();
      }
      IFile protoFile = protoFile(delta.getUri(), project);
      subMonitor.worked(1);
      if (protoFile != null) {
        subMonitor.subTask("Compiling " + protoFile.getName() + " with protoc");
        generateSingleProto(commandBuilder.buildCommand(protoFile), protoFile);
      }
      subMonitor.worked(1);
    }
    if (compilerPreferences.refreshResources()) {
      List<IFolder> outputDirectories = commandBuilder.outputDirectories();
      boolean refreshProject = compilerPreferences.refreshProject();
      refresh(project, outputDirectories, refreshProject, subMonitor.newChild(outputDirectories.size() + 1));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.