Java 类com.intellij.openapi.components.impl.stores.IComponentStore 实例源码

项目:tools-idea    文件:ProjectImpl.java   
@NotNull
@Override
public IProjectStore getStateStore() {
  IProjectStore componentStore = myComponentStore;
  if (componentStore != null) return componentStore;
  synchronized (this) {
    componentStore = myComponentStore;
    if (componentStore == null) {
      myComponentStore = componentStore = (IProjectStore)getPicoContainer().getComponentInstance(IComponentStore.class);
    }
    return componentStore;
  }
}
项目:tools-idea    文件:ModuleImpl.java   
@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);
}
项目:tools-idea    文件:ModuleImpl.java   
@NotNull
public synchronized IModuleStore getStateStore() {
  if (myComponentStore == null) {
    myComponentStore = (IModuleStore)getPicoContainer().getComponentInstance(IComponentStore.class);
  }
  return myComponentStore;
}
项目:intellij-ce-playground    文件:ProjectStoreClassProvider.java   
@NotNull
Class<? extends IComponentStore> getProjectStoreClass(boolean isDefaultProject);
项目:intellij-ce-playground    文件:ApplicationImpl.java   
@NotNull
@Deprecated
public IComponentStore getStateStore() {
  return ServiceKt.getStateStore(this);
}
项目:intellij-ce-playground    文件:PlatformComponentManagerImpl.java   
@Override
public void initializeComponent(@NotNull Object component, boolean service) {
  if (!service || !(component instanceof PathMacroManager || component instanceof IComponentStore)) {
    ServiceKt.getStateStore(this).initComponent(component, service);
  }
}
项目:intellij-ce-playground    文件:ProjectUtil.java   
public static boolean isDirectoryBased(@NotNull Project project) {
  IComponentStore store = ServiceKt.getStateStore(project);
  return store instanceof IProjectStore && StorageScheme.DIRECTORY_BASED.equals(((IProjectStore)store).getStorageScheme());
}
项目:tools-idea    文件:ProjectManagerImpl.java   
public void reloadProjectImpl(@NotNull final Project p, final boolean clearCopyToRestore) {
  if (clearCopyToRestore) {
    mySavedCopies.clear();
    mySavedTimestamps.clear();
  }

  final Project[] project = {p};

  ProjectReloadState.getInstance(project[0]).onBeforeAutomaticProjectReload();
  final Application application = ApplicationManager.getApplication();

  application.invokeLater(new Runnable() {
    @Override
    public void run() {
      LOG.debug("Reloading project.");
      ProjectImpl projectImpl = (ProjectImpl)project[0];
      if (projectImpl.isDisposed()) return;
      IProjectStore projectStore = projectImpl.getStateStore();
      final String location = projectImpl.getPresentableUrl();

      final List<IFile> original;
      try {
        final IComponentStore.SaveSession saveSession = projectStore.startSave();
        original = saveSession.getAllStorageFiles(true);
        saveSession.finishSave();
      }
      catch (IOException e) {
        LOG.error(e);
        return;
      }

      if (project[0].isDisposed() || ProjectUtil.closeAndDispose(project[0])) {
        application.runWriteAction(new Runnable() {
          @Override
          public void run() {
            for (final IFile originalFile : original) {
              restoreCopy(LocalFileSystem.getInstance().refreshAndFindFileByIoFile(originalFile));
            }
          }
        });

        project[0] = null; // Let it go.

        ProjectUtil.openProject(location, null, true);
      }
    }
  }, ModalityState.NON_MODAL);
}
项目:consulo    文件:CompilerServerApplication.java   
@Override
protected void bootstrapPicoContainer(@Nonnull String name) {
  super.bootstrapPicoContainer(name);
  getPicoContainer().registerComponentImplementation(IComponentStore.class, ApplicationStoreImpl.class);
  getPicoContainer().registerComponentImplementation(ApplicationPathMacroManager.class);
}
项目:consulo    文件:CompilerServerApplication.java   
@Nonnull
@Override
public IApplicationStore getStateStore() {
  return (IApplicationStore)getPicoContainer().getComponentInstance(IComponentStore.class);
}
项目:consulo    文件:ApplicationImpl.java   
@Override
protected void bootstrapPicoContainer(@Nonnull String name) {
  super.bootstrapPicoContainer(name);
  getPicoContainer().registerComponentImplementation(IComponentStore.class, ApplicationStoreImpl.class);
  getPicoContainer().registerComponentImplementation(ApplicationPathMacroManager.class);
}
项目:consulo    文件:ApplicationImpl.java   
@Override
@Nonnull
public IApplicationStore getStateStore() {
  return (IApplicationStore)getPicoContainer().getComponentInstance(IComponentStore.class);
}
项目:tools-idea    文件:ProjectStoreClassProvider.java   
Class<? extends IComponentStore> getProjectStoreClass(final boolean isDefaultProject);