Package org.intellij.grammar.livePreview

Examples of org.intellij.grammar.livePreview.LivePreviewLanguage


  @Override
  public void update(AnActionEvent e) {
    Editor editor = PlatformDataKeys.EDITOR.getData(e.getDataContext());
    PsiFile psiFile = LangDataKeys.PSI_FILE.getData(e.getDataContext());
    Language language = psiFile == null ? null : psiFile.getLanguage();
    LivePreviewLanguage livePreviewLanguage = language instanceof LivePreviewLanguage? (LivePreviewLanguage)language : null;
    Editor grammarEditor = livePreviewLanguage == null? null : getGrammarEditor(psiFile.getProject(), livePreviewLanguage);

    boolean enabled = editor != null && grammarEditor != null;
    if (enabled) {
      boolean running = editor.getUserData(GRAMMAR_UPDATE_RUNNING) != null;
View Full Code Here


  @Override
  public void actionPerformed(AnActionEvent e) {
    final Editor editor = PlatformDataKeys.EDITOR.getData(e.getDataContext());
    PsiFile psiFile = LangDataKeys.PSI_FILE.getData(e.getDataContext());
    Language language = psiFile == null ? null : psiFile.getLanguage();
    final LivePreviewLanguage livePreviewLanguage = language instanceof LivePreviewLanguage ? (LivePreviewLanguage)language : null;
    final Editor grammarEditor = livePreviewLanguage == null ? null : getGrammarEditor(psiFile.getProject(), livePreviewLanguage);

    if (editor == null || grammarEditor == null) return;

    final Project project = psiFile.getProject();
View Full Code Here

TOP

Related Classes of org.intellij.grammar.livePreview.LivePreviewLanguage

Copyright © 2018 www.massapicom. 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.