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); } } }
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(); } }
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(); } }
@Override protected void tearDown() throws Exception { EditorColorsManager.getInstance().setGlobalScheme(mySavedScheme); ((EditorColorsManagerImpl)EditorColorsManager.getInstance()).getSchemeManager().removeScheme(myTestScheme); super.tearDown(); }
protected boolean isEnabled() { return EditorColorsManager.getInstance().getAllSchemes().length > 1 || ((EditorColorsManagerImpl)EditorColorsManager.getInstance()).getSchemesManager().isImportAvailable(); }
static boolean isSharedScheme(EditorColorsScheme selected) { return ((EditorColorsManagerImpl) EditorColorsManager.getInstance()).getSchemesManager().isShared(selected); }