Examples of EditorColorsScheme


Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

    final HighlightManager highlightManager =
        HighlightManager.getInstance(project);
    final EditorColorsManager editorColorsManager =
        EditorColorsManager.getInstance();
    final Editor editor = editorManager.getSelectedTextEditor();
    final EditorColorsScheme globalScheme =
        editorColorsManager.getGlobalScheme();
    final TextAttributes textattributes =
        globalScheme.getAttributes(
            EditorColors.SEARCH_RESULT_ATTRIBUTES);

    assert editor != null;
    assert project != null;
    final PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
View Full Code Here

Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

    public void initComponent() {
        applyColorSchemeColorsToTree();
    }

    private void applyColorSchemeColorsToTree() {
        final EditorColorsScheme globalScheme = colorSchemeManager.getGlobalColorScheme();

        colorSchemeManager.setUiProperty("Viewport.foreground", globalScheme.getDefaultForeground());
        colorSchemeManager.setUiProperty("Viewport.background", globalScheme.getDefaultBackground());

        colorSchemeManager.setUiProperty("Tree.textForeground", globalScheme.getDefaultForeground());
        colorSchemeManager.setUiProperty("Tree.textBackground", globalScheme.getDefaultBackground());

        colorSchemeManager.setUiProperty("Tree.foreground", globalScheme.getDefaultForeground());
        colorSchemeManager.setUiProperty("Tree.background", globalScheme.getDefaultBackground());
    }
View Full Code Here

Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

        createGuardedBlock(document, 0, document.getTextLength(), reason);
        if (!highlight) {
            Editor[] editors = EditorFactory.getInstance().getEditors(document);
            for (Editor editor : editors) {
                ColorKey key = ColorKey.find("READONLY_FRAGMENT_BACKGROUND");
                EditorColorsScheme scheme = editor.getColorsScheme();
                scheme.setColor(key, scheme.getDefaultBackground());
            }
        }
    }
View Full Code Here

Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

        return userValueHolder.getContentType();
    }

    public void setContentType(TextContentType contentType) {
        SyntaxHighlighter syntaxHighlighter = SyntaxHighlighter.PROVIDER.create(contentType.getFileType(), userValueHolder.getProject(), null);
        EditorColorsScheme colorsScheme = editor.getColorsScheme();
        editor.setHighlighter(HighlighterFactory.createHighlighter(syntaxHighlighter, colorsScheme));
        userValueHolder.setContentType(contentType);

    }
View Full Code Here

Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

  }


  private Editor createEditor(final BugInstanceNode bugInstanceNode, final Document document) {
    final Editor editor = EditorFactory.getInstance().createEditor(document, _project, StdFileTypes.JAVA, false);
    final EditorColorsScheme scheme = editor.getColorsScheme();
    scheme.setEditorFontSize(scheme.getEditorFontSize() - 1);

    final EditorSettings editorSettings = editor.getSettings();
    editorSettings.setLineMarkerAreaShown(true);
    editorSettings.setLineNumbersShown(true);
    editorSettings.setFoldingOutlineShown(true);
View Full Code Here

Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

    public DataGridTextAttributes() {
        load();
    }

    public void load() {
        EditorColorsScheme globalScheme = EditorColorsManager.getInstance().getGlobalScheme();
        caretRowBgColor = globalScheme.getColor(DataGridTextAttributesKeys.CARET_ROW_BACKGROUND);

        deletedData = TextAttributesUtil.getSimpleTextAttributes(DataGridTextAttributesKeys.DELETED_DATA);
        errorData = TextAttributesUtil.getSimpleTextAttributes(DataGridTextAttributesKeys.ERROR_DATA);
        modifiedData = TextAttributesUtil.getSimpleTextAttributes(DataGridTextAttributesKeys.MODIFIED_DATA);
        modifiedDataAtCaretRow = new SimpleTextAttributes(caretRowBgColor, modifiedData.getFgColor(), null, modifiedData.getFontStyle());
View Full Code Here

Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

            return;
        }

        if (rangeHighlighter != null) return;

        EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
        rangeHighlighter = editor.getMarkupModel().addLineHighlighter(line, DebuggerColors.EXECUTION_LINE_HIGHLIGHTERLAYER,
                scheme.getAttributes(DebuggerColors.EXECUTIONPOINT_ATTRIBUTES));
    }
View Full Code Here

Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

            viewer = (EditorEx) EditorFactory.getInstance().createViewer(previewDocument, project);
            viewer.setEmbeddedIntoDialogWrapper(true);
            JScrollPane viewerScrollPane = viewer.getScrollPane();
            SyntaxHighlighter syntaxHighlighter = connectionHandler.getLanguageDialect(SQLLanguage.INSTANCE).getSyntaxHighlighter();
            EditorColorsScheme colorsScheme = viewer.getColorsScheme();
            viewer.setHighlighter(HighlighterFactory.createHighlighter(syntaxHighlighter, colorsScheme));
            viewer.setBackgroundColor(colorsScheme.getColor(ColorKey.find("CARET_ROW_COLOR")));
            viewerScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
            viewerScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
            //viewerScrollPane.setBorder(null);
            viewerScrollPane.setViewportBorder(new LineBorder(CompatibilityUtil.getEditorBackgroundColor(viewer), 4, false));
View Full Code Here

Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

                viewer = (EditorEx) EditorFactory.getInstance().createViewer(previewDocument, dataset.getProject());
                viewer.setEmbeddedIntoDialogWrapper(true);
                JScrollPane viewerScrollPane = viewer.getScrollPane();
                SyntaxHighlighter syntaxHighlighter = dataset.getLanguageDialect(SQLLanguage.INSTANCE).getSyntaxHighlighter();
                EditorColorsScheme colorsScheme = viewer.getColorsScheme();
                viewer.setHighlighter(HighlighterFactory.createHighlighter(syntaxHighlighter, colorsScheme));
                viewer.setBackgroundColor(colorsScheme.getColor(ColorKey.find("CARET_ROW_COLOR")));
                viewerScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
                viewerScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
                //viewerScrollPane.setBorder(null);
                viewerScrollPane.setViewportBorder(new LineBorder(CompatibilityUtil.getEditorBackgroundColor(viewer), 4, false));
View Full Code Here

Examples of com.intellij.openapi.editor.colors.EditorColorsScheme

            this.readUsages = readUsages.toArray(new PsiElement[readUsages.size()]);
        }

        private void highlight(Project project, Editor editor, GoLiteralIdentifier identifierToInline) {
            HighlightManager manager = HighlightManager.getInstance(project);
            EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
            TextAttributes attributes = scheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES);
            TextAttributes writeAttributes = scheme.getAttributes(EditorColors.WRITE_SEARCH_RESULT_ATTRIBUTES);
            manager.addOccurrenceHighlights(editor, readUsages, attributes, true, null);
            manager.addOccurrenceHighlights(editor, writeUsages, writeAttributes, true, null);
            manager.addOccurrenceHighlights(editor, new PsiElement[]{identifierToInline}, writeAttributes, true, null);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.