Search in sources :

Example 6 with Mappings

use of org.jetbrains.jps.builders.java.dependencyView.Mappings in project intellij-community by JetBrains.

the class JavaBuilderUtil method markDirtyDependenciesForInitialRound.

public static void markDirtyDependenciesForInitialRound(CompileContext context, DirtyFilesHolder<JavaSourceRootDescriptor, ModuleBuildTarget> dfh, ModuleChunk chunk) throws IOException {
    if (hasRemovedPaths(chunk, dfh)) {
        final Mappings delta = context.getProjectDescriptor().dataManager.getMappings().createDelta();
        final Set<File> empty = Collections.emptySet();
        updateMappings(context, delta, dfh, chunk, empty, empty, CompilationRound.CURRENT, null);
    }
}
Also used : Mappings(org.jetbrains.jps.builders.java.dependencyView.Mappings) File(java.io.File)

Example 7 with Mappings

use of org.jetbrains.jps.builders.java.dependencyView.Mappings in project intellij-community by JetBrains.

the class JavaBuilderUtil method updateMappingsOnRoundCompletion.

public static boolean updateMappingsOnRoundCompletion(CompileContext context, DirtyFilesHolder<JavaSourceRootDescriptor, ModuleBuildTarget> dirtyFilesHolder, ModuleChunk chunk) throws IOException {
    Mappings delta = null;
    final Pair<Mappings, Callbacks.Backend> pair = MAPPINGS_DELTA_KEY.get(context);
    if (pair != null) {
        MAPPINGS_DELTA_KEY.set(context, null);
        delta = pair.getFirst();
    }
    if (delta == null) {
        return false;
    }
    final Set<File> compiledFiles = getFilesContainer(context, FILES_TO_COMPILE_KEY);
    FILES_TO_COMPILE_KEY.set(context, null);
    final Set<File> successfullyCompiled = getFilesContainer(context, SUCCESSFULLY_COMPILED_FILES_KEY);
    SUCCESSFULLY_COMPILED_FILES_KEY.set(context, null);
    FileFilter filter = createOrFilter(SKIP_MARKING_DIRTY_FILTERS_KEY.get(context));
    SKIP_MARKING_DIRTY_FILTERS_KEY.set(context, null);
    return updateMappings(context, delta, dirtyFilesHolder, chunk, compiledFiles, successfullyCompiled, CompilationRound.NEXT, filter);
}
Also used : Mappings(org.jetbrains.jps.builders.java.dependencyView.Mappings) FileFilter(java.io.FileFilter) File(java.io.File)

Aggregations

Mappings (org.jetbrains.jps.builders.java.dependencyView.Mappings)7 File (java.io.File)4 FileFilter (java.io.FileFilter)2 Pair (com.intellij.openapi.util.Pair)1 THashSet (gnu.trove.THashSet)1 NotNull (org.jetbrains.annotations.NotNull)1 BuildDataCorruptedException (org.jetbrains.jps.builders.storage.BuildDataCorruptedException)1 ProgressMessage (org.jetbrains.jps.incremental.messages.ProgressMessage)1 JpsModule (org.jetbrains.jps.model.module.JpsModule)1