Examples of SyntaxHighlighter


Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

        } else {
          Language language = TemplateDataLanguageMappings.getInstance(project).getMapping(virtualFile);
          if(language != null) type = language.getAssociatedFileType();
            if(type == null) type = StdFileTypes.HTML;
        }
        SyntaxHighlighter outerHighlighter = SyntaxHighlighter.PROVIDER.create(type, project, virtualFile);

        registerLayer(LatteTokenTypes.HTML_TEXT, new LayerDescriptor(outerHighlighter, ""));
    }
View Full Code Here

Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

        document = DocumentUtil.getDocument(selectStatementFile);
        document.createGuardedBlock(0, conditionStartOffset);
        editor = (EditorEx) EditorFactory.getInstance().createEditor(document, project);
        editor.setEmbeddedIntoDialogWrapper(true);

        SyntaxHighlighter syntaxHighlighter = dataset.getLanguageDialect(SQLLanguage.INSTANCE).getSyntaxHighlighter();
        editor.setHighlighter(HighlighterFactory.createHighlighter(syntaxHighlighter, editor.getColorsScheme()));
        editor.getCaretModel().moveToOffset(conditionStartOffset);
        if (!isValidCondition) editor.getSelectionModel().setSelection(conditionStartOffset, document.getTextLength());

        JScrollPane editorScrollPane = editor.getScrollPane();
View Full Code Here

Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

            previewDocument = DocumentUtil.getDocument(selectStatementFile);

            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);
View Full Code Here

Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

                previewDocument = DocumentUtil.getDocument(selectStatementFile);

                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);
View Full Code Here

Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

        return;
      }
      updatePending = true;
    }

    SyntaxHighlighter hl = SyntaxHighlighterFactory.getSyntaxHighlighter(file.getLanguage(), project, file.getVirtualFile());

    nextBuffer = activeBuffer == 0 ? 1 : 0;

    runner.add(new RenderTask(minimaps[nextBuffer], editor.getDocument().getText(), editor.getColorsScheme(), hl, editor.getFoldingModel().getAllFoldRegions(), new Runnable() {
      @Override public void run() {
View Full Code Here

Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

  }

  @Nullable
  @Override
  public Lexer getHighlightingLexer() {
    SyntaxHighlighter syntaxHighlighter = SyntaxHighlighterFactory.getSyntaxHighlighter(DartFileType.INSTANCE, null, null);
    return syntaxHighlighter != null ? syntaxHighlighter.getHighlightingLexer() : null;
  }
View Full Code Here

Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

    else {
      Language language = TemplateDataLanguageMappings.getInstance(project).getMapping(virtualFile);
      if (language != null) type = language.getAssociatedFileType();
      if (type == null) type = HbLanguage.getDefaultTemplateLang();
    }
    @SuppressWarnings("deprecation") // deprecated in IDEA 12, still needed in IDEA 11 TODO remove when IDEA 11 support is dropped
      SyntaxHighlighter outerHighlighter = SyntaxHighlighter.PROVIDER.create(type, project, virtualFile);

    registerLayer(HbTokenTypes.CONTENT, new LayerDescriptor(outerHighlighter, ""));
  }
View Full Code Here

Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

        return ColorDescriptor.EMPTY_ARRAY;
    }

    @NotNull
    public SyntaxHighlighter getHighlighter() {
        final SyntaxHighlighter highlighter =
            SyntaxHighlighterFactory.getSyntaxHighlighter(
                GoFileType.INSTANCE, null, null);

        assert highlighter != null;
        return highlighter;
View Full Code Here

Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

  public TextChunk[] extractChunks() {
    final int lineStartOffset = myDocument.getLineStartOffset(myLineNumber);
    final int lineEndOffset = lineStartOffset < myDocument.getTextLength() ? myDocument.getLineEndOffset(myLineNumber):0;
    final FileType fileType = myElement.getContainingFile().getFileType();
    SyntaxHighlighter highlighter = fileType.getHighlighter(myElement.getProject(), myElement.getContainingFile().getVirtualFile());
    if (highlighter == null) {
      highlighter = new PlainSyntaxHighlighter();
    }
    return createTextChunks(myDocument.getCharsSequence(), highlighter, lineStartOffset, lineEndOffset);
  }
View Full Code Here

Examples of com.intellij.openapi.fileTypes.SyntaxHighlighter

                    EditorEx editor = (EditorEx) editorFactory.createViewer(document, project);
                    editor.getSettings().setFoldingOutlineShown(false);
                    editor.getSettings().setLineMarkerAreaShown(false);
                    editor.getSettings().setIndentGuidesShown(false);

                    SyntaxHighlighter highlighter = SyntaxHighlighterFactory.getSyntaxHighlighter(language, project, psiFile.getViewProvider().getVirtualFile());
                    editor.setHighlighter(new LexerEditorHighlighter(highlighter, editor.getColorsScheme()));
                    return editor;
                }
            };
            chooser.setContentIcon(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.