mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -157,25 +157,17 @@ public class ModuleRootsIndex {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public RootDescriptor associateRoot(@NotNull CompileContext context, File root, JpsModule module, boolean isTestRoot, final boolean isForGeneratedSources, final boolean isTemp) {
|
||||
Map<File, RootDescriptor> rootToDescriptorMap;
|
||||
Map<JpsModule, List<RootDescriptor>> moduleToRootMap;
|
||||
if (isTemp) {
|
||||
rootToDescriptorMap = ROOT_DESCRIPTOR_MAP.get(context);
|
||||
if (rootToDescriptorMap == null) {
|
||||
rootToDescriptorMap = new HashMap<File, RootDescriptor>();
|
||||
ROOT_DESCRIPTOR_MAP.set(context, rootToDescriptorMap);
|
||||
}
|
||||
|
||||
moduleToRootMap = MODULE_ROOT_MAP.get(context);
|
||||
if (moduleToRootMap == null) {
|
||||
moduleToRootMap = new HashMap<JpsModule, List<RootDescriptor>>();
|
||||
MODULE_ROOT_MAP.set(context, moduleToRootMap);
|
||||
}
|
||||
public RootDescriptor associateRoot(@NotNull CompileContext context, File root, JpsModule module, boolean isTestRoot) {
|
||||
Map<File, RootDescriptor> rootToDescriptorMap = ROOT_DESCRIPTOR_MAP.get(context);
|
||||
if (rootToDescriptorMap == null) {
|
||||
rootToDescriptorMap = new HashMap<File, RootDescriptor>();
|
||||
ROOT_DESCRIPTOR_MAP.set(context, rootToDescriptorMap);
|
||||
}
|
||||
else {
|
||||
rootToDescriptorMap = myRootToDescriptorMap;
|
||||
moduleToRootMap = myModuleToRootsMap;
|
||||
|
||||
Map<JpsModule, List<RootDescriptor>> moduleToRootMap = MODULE_ROOT_MAP.get(context);
|
||||
if (moduleToRootMap == null) {
|
||||
moduleToRootMap = new HashMap<JpsModule, List<RootDescriptor>>();
|
||||
MODULE_ROOT_MAP.set(context, moduleToRootMap);
|
||||
}
|
||||
|
||||
final RootDescriptor d = rootToDescriptorMap.get(root);
|
||||
@@ -188,7 +180,7 @@ public class ModuleRootsIndex {
|
||||
moduleRoots = new ArrayList<RootDescriptor>();
|
||||
moduleToRootMap.put(module, moduleRoots);
|
||||
}
|
||||
final RootDescriptor descriptor = new RootDescriptor(module.getName(), root, isTestRoot, isForGeneratedSources, isTemp);
|
||||
final RootDescriptor descriptor = new RootDescriptor(module.getName(), root, isTestRoot, true, true);
|
||||
rootToDescriptorMap.put(root, descriptor);
|
||||
moduleRoots.add(descriptor);
|
||||
return descriptor;
|
||||
|
||||
@@ -57,13 +57,6 @@ public class FSState {
|
||||
myTestDeltas.clear();
|
||||
}
|
||||
|
||||
public void init(String moduleName, final Collection<String> deleteProduction, final Collection<String> deletedTests, final Map<File, Set<File>> recompileProduction, final Map<File, Set<File>> recompileTests) {
|
||||
getDelta(moduleName, true).init(deletedTests, recompileTests);
|
||||
getDelta(moduleName, false).init(deleteProduction, recompileProduction);
|
||||
myInitialTestsScanPerformed.add(moduleName);
|
||||
myInitialProductionScanPerformed.add(moduleName);
|
||||
}
|
||||
|
||||
public final void clearRecompile(final RootDescriptor rd) {
|
||||
getDelta(rd.module, rd.isTestRoot).clearRecompile(rd.root);
|
||||
}
|
||||
|
||||
@@ -79,13 +79,6 @@ final class FilesDelta {
|
||||
});
|
||||
}
|
||||
|
||||
public void init(Collection<String> deleted, Map<File, Set<File>> recompile) {
|
||||
myDeletedPaths.clear();
|
||||
myDeletedPaths.addAll(deleted);
|
||||
myFilesToRecompile.clear();
|
||||
myFilesToRecompile.putAll(recompile);
|
||||
}
|
||||
|
||||
public boolean markRecompile(File root, File file) {
|
||||
final boolean added = _addToRecompiled(root, file);
|
||||
if (added) {
|
||||
|
||||
@@ -117,7 +117,7 @@ public class GroovyBuilder extends ModuleLevelBuilder {
|
||||
final ModuleRootsIndex rootsIndex = context.getProjectDescriptor().rootsIndex;
|
||||
for (JpsModule module : generationOutputs.keySet()) {
|
||||
File root = new File(generationOutputs.get(module));
|
||||
rootsIndex.associateRoot(context, root, module, context.isCompilingTests(), true, true);
|
||||
rootsIndex.associateRoot(context, root, module, context.isCompilingTests());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user