Java 类com.intellij.openapi.editor.colors.ex.DefaultColorSchemesManager 实例源码

项目:intellij-ce-playground    文件:EditVarConstraintsDialog.java   
private static Editor createEditor(final Project project, final String text, final String fileName) {
  final FileType fileType = getFileType(fileName);
  final Document doc = createDocument(fileName, fileType, text);
  final Editor editor = EditorFactory.getInstance().createEditor(doc, project);

  ((EditorEx)editor).setEmbeddedIntoDialogWrapper(true);
  final EditorSettings settings = editor.getSettings();
  settings.setLineNumbersShown(false);
  settings.setFoldingOutlineShown(false);
  settings.setRightMarginShown(false);
  settings.setLineMarkerAreaShown(false);
  settings.setIndentGuidesShown(false);
  ((EditorEx)editor).setHighlighter(HighlighterFactory.createHighlighter(fileType, DefaultColorSchemesManager.getInstance().getFirstScheme(), project));

  return editor;
}
项目:tools-idea    文件:EditorColorsManagerImpl.java   
public EditorColorsManagerImpl(DefaultColorSchemesManager defaultColorSchemesManager, SchemesManagerFactory schemesManagerFactory) {
  myDefaultColorSchemesManager = defaultColorSchemesManager;

  mySchemesManager = schemesManagerFactory.createSchemesManager(
    FILE_SPEC,
    new MySchemeProcessor(), RoamingType.PER_USER);

  addDefaultSchemes();

  // Load default schemes from providers
  if (!isUnitTestOrHeadlessMode()) {
    loadSchemesFromBeans();
  }

  loadAllSchemes();

  loadAdditionalTextAttributes();

  setGlobalScheme(myDefaultColorSchemesManager.getAllSchemes()[0]);
}
项目:tools-idea    文件:EditorColorsManagerImpl.java   
private static EditorColorsSchemeImpl loadSchemeFromDocument(final Document document,
                                                             final boolean isEditable)
  throws InvalidDataException {

  final Element root = document.getRootElement();

  if (root == null || !SCHEME_NODE_NAME.equals(root.getName())) {
    throw new InvalidDataException();
  }

  final EditorColorsSchemeImpl scheme = isEditable
     // editable scheme
     ? new EditorColorsSchemeImpl(null, DefaultColorSchemesManager.getInstance())
     //not editable scheme
     : new ReadOnlyColorsSchemeImpl(null, DefaultColorSchemesManager.getInstance());
  scheme.readExternal(root);
  return scheme;
}
项目:tools-idea    文件:AbstractColorsScheme.java   
protected AbstractColorsScheme(EditorColorsScheme parentScheme, DefaultColorSchemesManager defaultColorSchemesManager) {
  myParentScheme = parentScheme;
  myDefaultColorSchemesManager = defaultColorSchemesManager;
  myFontPreferences.setChangeListener(new Runnable() {
    @Override
    public void run() {
      initFonts();
    }
  });
}
项目:tools-idea    文件:EditorColorsSchemeImpl.java   
@Override
public Object clone() {
  EditorColorsSchemeImpl newScheme = new EditorColorsSchemeImpl(myParentScheme, DefaultColorSchemesManager.getInstance());
  copyTo(newScheme);
  newScheme.setName(getName());
  return newScheme;
}
项目:tools-idea    文件:ColorAndFontOptions.java   
private MyColorScheme(EditorColorsScheme parentScheme) {
  super(parentScheme, DefaultColorSchemesManager.getInstance());
  parentScheme.getFontPreferences().copyTo(getFontPreferences());
  setLineSpacing(parentScheme.getLineSpacing());

  parentScheme.getConsoleFontPreferences().copyTo(getConsoleFontPreferences());
  setConsoleLineSpacing(parentScheme.getConsoleLineSpacing());

  setQuickDocFontSize(parentScheme.getQuickDocFontSize());
  myName = parentScheme.getName();
  if (parentScheme instanceof ExternalizableScheme) {
    getExternalInfo().copy(((ExternalizableScheme)parentScheme).getExternalInfo());
  }
  initFonts();
}
项目:tools-idea    文件:DefaultColorsScheme.java   
public DefaultColorsScheme(DefaultColorSchemesManager defaultColorSchemesManager) {
  super(null, defaultColorSchemesManager);
}
项目:tools-idea    文件:ReadOnlyColorsSchemeImpl.java   
public ReadOnlyColorsSchemeImpl(final EditorColorsScheme parenScheme,
                                final DefaultColorSchemesManager defaultColorSchemesManager) {
  super(parenScheme, defaultColorSchemesManager);
}
项目:tools-idea    文件:EditorColorsManagerImpl.java   
@NotNull
private static DefaultColorsScheme getDefaultScheme() {
  return DefaultColorSchemesManager.getInstance().getAllSchemes()[0];
}
项目:tools-idea    文件:AbstractColorsScheme.java   
public AbstractColorsScheme(DefaultColorSchemesManager defaultColorSchemesManager) {
  myDefaultColorSchemesManager = defaultColorSchemesManager;
}
项目:tools-idea    文件:EditorColorsSchemeImpl.java   
public EditorColorsSchemeImpl(EditorColorsScheme parentScheme, DefaultColorSchemesManager defaultColorSchemesManager) {
  super(parentScheme, defaultColorSchemesManager);
}