Dispose component

This commit is contained in:
Evgeny Pasynkov
2012-10-17 16:11:48 +02:00
parent 8930afdca7
commit 439faae97c
@@ -61,10 +61,16 @@ public class CoreModule extends MockComponentManager implements ModuleEx {
}
});
ModuleRootManagerImpl moduleRootManager = new ModuleRootManagerImpl(this,
final ModuleRootManagerImpl moduleRootManager = new ModuleRootManagerImpl(this,
DirectoryIndex.getInstance(project),
ProjectRootManagerImpl.getInstanceImpl(project),
VirtualFilePointerManager.getInstance());
Disposer.register(parentDisposable, new Disposable() {
@Override
public void dispose() {
moduleRootManager.disposeComponent();
}
});
getPicoContainer().registerComponentInstance(ModuleRootManager.class, moduleRootManager);
getPicoContainer().registerComponentInstance(PathMacroManager.class, new ModulePathMacroManager(PathMacros.getInstance(), this));
myModuleScopeProvider = createModuleScopeProvider();