revert changes back because of NPEs

This commit is contained in:
Eugene Zhuravlev
2009-10-29 10:37:54 +03:00
parent 32640c800e
commit 221fa3ce57
2 changed files with 3 additions and 10 deletions
@@ -155,8 +155,7 @@ public class ProjectConfigurable extends NamedConfigurable<Project> implements D
public void run() {
ApplicationManager.getApplication().runReadAction(new Runnable(){
public void run() {
final Graph<ModifiableRootModel> originalGraph = myModulesConfigurator.createGraphGenerator();
final Graph<Chunk<ModifiableRootModel>> graph = ModuleCompilerUtil.toChunkGraph(originalGraph);
final Graph<Chunk<ModifiableRootModel>> graph = ModuleCompilerUtil.toChunkGraph(myModulesConfigurator.createGraphGenerator());
final Collection<Chunk<ModifiableRootModel>> chunks = graph.getNodes();
String cycles = "";
int count = 0;
@@ -183,9 +182,6 @@ public class ProjectConfigurable extends NamedConfigurable<Project> implements D
myWarningLabel.repaint();}
}
);
for (ModifiableRootModel model : originalGraph.getNodes()) {
model.dispose();
}
}
});
}
@@ -59,7 +59,6 @@ public class StructureConfigurableContext implements Disposable {
}
public void dispose() {
clear();
}
public ModulesConfigurator getModulesConfigurator() {
@@ -78,7 +77,8 @@ public class StructureConfigurableContext implements Disposable {
public void resetLibraries() {
final LibraryTablesRegistrar tablesRegistrar = LibraryTablesRegistrar.getInstance();
clear();
myLevel2Providers.clear();
myLevel2Providers.put(LibraryTablesRegistrar.APPLICATION_LEVEL, new LibrariesModifiableModel(tablesRegistrar.getLibraryTable(), myProject));
myLevel2Providers.put(LibraryTablesRegistrar.PROJECT_LEVEL, new LibrariesModifiableModel(tablesRegistrar.getLibraryTable(myProject), myProject));
for (final LibraryTable table : tablesRegistrar.getCustomLibraryTables()) {
@@ -154,9 +154,6 @@ public class StructureConfigurableContext implements Disposable {
}
public void clear() {
for (LibrariesModifiableModel model : myLevel2Providers.values()) {
model.disposeUncommittedLibraries();
}
myLevel2Providers.clear();
}
}