Package com.google.eclipse.protobuf.ui.preferences.compiler

Examples of com.google.eclipse.protobuf.ui.preferences.compiler.CompilerPreferences


    if (monitor.isCanceled()) {
      throw new OperationCanceledException();
    }
    SubMonitor subMonitor = SubMonitor.convert(monitor, deltas.size() * 2 + 2);
    IProject project = context.getBuiltProject();
    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

Related Classes of com.google.eclipse.protobuf.ui.preferences.compiler.CompilerPreferences

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.