use of org.jetbrains.jps.builders.impl.BuildOutputConsumerImpl in project intellij-community by JetBrains.
the class IncProjectBuilder method buildTarget.
private <R extends BuildRootDescriptor, T extends BuildTarget<R>> void buildTarget(final T target, final CompileContext context, TargetBuilder<?, ?> builder) throws ProjectBuildException, IOException {
if (builder.getTargetTypes().contains(target.getTargetType())) {
DirtyFilesHolder<R, T> holder = new DirtyFilesHolderBase<R, T>(context) {
@Override
public void processDirtyFiles(@NotNull FileProcessor<R, T> processor) throws IOException {
context.getProjectDescriptor().fsState.processFilesToRecompile(context, target, processor);
}
};
//noinspection unchecked
BuildOutputConsumerImpl outputConsumer = new BuildOutputConsumerImpl(target, context);
long start = System.nanoTime();
((TargetBuilder<R, T>) builder).build(target, holder, outputConsumer, context);
storeBuilderStatistics(builder, System.nanoTime() - start, outputConsumer.getNumberOfProcessedSources());
outputConsumer.fireFileGeneratedEvent();
context.checkCanceled();
}
}
use of org.jetbrains.jps.builders.impl.BuildOutputConsumerImpl in project intellij-community by JetBrains.
the class ChunkBuildOutputConsumerImpl method registerOutputFile.
@Override
public void registerOutputFile(@NotNull BuildTarget<?> target, File outputFile, Collection<String> sourcePaths) throws IOException {
BuildOutputConsumerImpl consumer = myTarget2Consumer.get(target);
if (consumer == null) {
consumer = new BuildOutputConsumerImpl(target, myContext);
myTarget2Consumer.put(target, consumer);
}
consumer.registerOutputFile(outputFile, sourcePaths);
}
Aggregations