Java 类com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl 实例源码

项目:tools-idea    文件:QuickChangeColorSchemeAction.java   
protected void fillActions(Project project, @NotNull DefaultActionGroup group, @NotNull DataContext dataContext) {
  final EditorColorsScheme[] schemes = EditorColorsManager.getInstance().getAllSchemes();
  EditorColorsScheme current = EditorColorsManager.getInstance().getGlobalScheme();
  for (final EditorColorsScheme scheme : schemes) {
    addScheme(group, current, scheme, false);
  }


  Collection<SharedScheme<EditorColorsSchemeImpl>> sharedSchemes = ((EditorColorsManagerImpl)EditorColorsManager.getInstance()).getSchemesManager().loadSharedSchemes();

  if (!sharedSchemes.isEmpty()) {
    group.add(Separator.getInstance());

    for (SharedScheme<EditorColorsSchemeImpl> sharedScheme : sharedSchemes) {
      addScheme(group, current, sharedScheme.getScheme(), true);
    }
  }

}
项目:material-theme-jetbrains    文件:MTFileColors.java   
public static void apply() {
  final EditorColorsScheme defaultScheme = getCurrentSchemeForCurrentUITheme();
  final EditorColorsScheme globalScheme = EditorColorsManagerImpl.getInstance().getGlobalScheme();
  final FileStatus[] allFileStatuses = FileStatusFactory.getInstance().getAllFileStatuses();

  for (final FileStatus allFileStatus : allFileStatuses) {
    defaultScheme.setColor(allFileStatus.getColorKey(), globalScheme.getColor(allFileStatus.getColorKey()));
  }
  ((AbstractColorsScheme) defaultScheme).setSaveNeeded(true);

  for (final Project project : ProjectManager.getInstance().getOpenProjects()) {
    FileStatusManager.getInstance(project).fileStatusesChanged();
  }
}
项目:material-theme-jetbrains    文件:MTFileColorsPage.java   
public static void apply() {
  final EditorColorsScheme defaultScheme = getCurrentSchemeForCurrentUITheme();
  final EditorColorsScheme globalScheme = EditorColorsManagerImpl.getInstance().getGlobalScheme();
  for (final ColorDescriptor descriptor : DESCRIPTORS) {
    defaultScheme.setColor(descriptor.getKey(), globalScheme.getColor(descriptor.getKey()));
  }
  ((AbstractColorsScheme) defaultScheme).setSaveNeeded(true);


  for (final Project project : ProjectManager.getInstance().getOpenProjects()) {
    FileStatusManager.getInstance(project).fileStatusesChanged();
  }
}
项目:intellij-ce-playground    文件:EditorColorsSchemeDelegateTest.java   
@Override
protected void tearDown() throws Exception {
  EditorColorsManager.getInstance().setGlobalScheme(mySavedScheme);
  ((EditorColorsManagerImpl)EditorColorsManager.getInstance()).getSchemeManager().removeScheme(myTestScheme);
  super.tearDown();
}
项目:tools-idea    文件:QuickChangeColorSchemeAction.java   
protected boolean isEnabled() {
  return EditorColorsManager.getInstance().getAllSchemes().length > 1 || ((EditorColorsManagerImpl)EditorColorsManager.getInstance()).getSchemesManager().isImportAvailable();
}
项目:tools-idea    文件:ColorSettingsUtil.java   
static boolean isSharedScheme(EditorColorsScheme selected) {
    return ((EditorColorsManagerImpl) EditorColorsManager.getInstance()).getSchemesManager().isShared(selected);
}