public CoreModule(@NotNull Disposable parentDisposable, @NotNull Project project, String moduleFilePath) { super(project.getPicoContainer(), parentDisposable); myLifetime = parentDisposable; myProject = project; myPath = moduleFilePath; Extensions.instantiateArea(ExtensionAreas.IDEA_MODULE, this, null); CoreApplicationEnvironment.registerExtensionPoint(Extensions.getArea(this), ModuleExtension.EP_NAME, ModuleExtension.class); Disposer.register(parentDisposable, new Disposable() { @Override public void dispose() { Extensions.disposeArea(CoreModule.this); } }); initModuleExtensions(); final ModuleRootManagerImpl moduleRootManager = new ModuleRootManagerImpl(this, DirectoryIndex.getInstance(project), ProjectRootManagerImpl.getInstanceImpl(project), VirtualFilePointerManager.getInstance()) { @Override public void loadState(ModuleRootManagerState object) { loadState(object, false); } }; 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(); }
@Override protected void bootstrapPicoContainer(@NotNull String name) { Extensions.instantiateArea(ExtensionAreas.IDEA_MODULE, this, (AreaInstance)getParentComponentManager()); super.bootstrapPicoContainer(name); getPicoContainer().registerComponentImplementation(IComponentStore.class, ModuleStoreImpl.class); getPicoContainer().registerComponentImplementation(ModulePathMacroManager.class); }
@Override protected void bootstrapPicoContainer(@Nonnull String name) { Extensions.instantiateArea(ExtensionAreas.MODULE, this, (AreaInstance)getParentComponentManager()); super.bootstrapPicoContainer(name); getPicoContainer().registerComponentImplementation(ModulePathMacroManager.class); }
protected PathMacroManager createModulePathMacroManager(@NotNull Project project) { return new ModulePathMacroManager(PathMacros.getInstance(), this); }