List<Delta> deltas = context.getDeltas();
if (deltas.isEmpty()) {
return;
}
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");