Tabnine Logo
EditorFactoryEvent.getEditor
Code IndexAdd Tabnine to your IDE (free)

How to use
getEditor
method
in
com.intellij.openapi.editor.event.EditorFactoryEvent

Best Java code snippets using com.intellij.openapi.editor.event.EditorFactoryEvent.getEditor (Showing top 16 results out of 315)

origin: JetBrains/ideavim

 public void editorReleased(@NotNull EditorFactoryEvent event) {
  Editor editor = event.getEditor();
  if (EditorData.getMotionGroup(editor)) {
   removeEditorListener(editor);
   EditorData.setMotionGroup(editor, false);
  }
 }
}, ApplicationManager.getApplication());
origin: JetBrains/ideavim

public void editorCreated(@NotNull EditorFactoryEvent event) {
 final Editor editor = event.getEditor();
 eventFacade.addEditorMouseListener(editor, listener);
 EditorData.setChangeGroup(editor, true);
}
origin: JetBrains/ideavim

 public void editorReleased(@NotNull EditorFactoryEvent event) {
  // Save off the last caret position of the file before it is closed
  Editor editor = event.getEditor();
  setMark(editor, '"', editor.getCaretModel().getOffset());
 }
}, ApplicationManager.getApplication());
origin: JetBrains/ideavim

public void editorReleased(@NotNull EditorFactoryEvent event) {
 final Editor editor = event.getEditor();
 if (EditorData.getChangeGroup(editor)) {
  eventFacade.removeEditorMouseListener(editor, listener);
  EditorData.setChangeGroup(editor, false);
 }
}
origin: go-lang-plugin-org/go-lang-idea-plugin

 @Override
 public void editorCreated(@NotNull EditorFactoryEvent event) {
  Document document = event.getEditor().getDocument();
  VirtualFile file = FileDocumentManager.getInstance().getFile(document);
  if (file != null && file.getFileType() == GoFileType.INSTANCE) {
   checkForUpdates();
  }
 }
};
origin: JetBrains/ideavim

public void editorCreated(@NotNull EditorFactoryEvent event) {
 final Editor editor = event.getEditor();
 // This ridiculous code ensures that a lot of events are processed BEFORE we finally start listening
 // to visible area changes. The primary reason for this change is to fix the cursor position bug
 // using the gd and gD commands (Goto Declaration). This bug has been around since Idea 6.0.4?
 // Prior to this change the visible area code was moving the cursor around during file load and messing
 // with the cursor position of the Goto Declaration processing.
 ApplicationManager.getApplication().invokeLater(
   () -> ApplicationManager.getApplication().invokeLater(
     () -> ApplicationManager.getApplication().invokeLater(
       () -> {
        addEditorListener(editor);
        EditorData.setMotionGroup(editor, true);
       })
   )
 );
}
origin: JetBrains/ideavim

 @Override
 public void editorReleased(@NotNull EditorFactoryEvent event) {
  final Editor editor = event.getEditor();
  deinitLineNumbers(editor);
  EditorData.unInitializeEditor(editor);
  VimPlugin.getKey().unregisterShortcutKeys(editor);
  editor.getSettings().setAnimatedScrolling(isAnimatedScrolling);
  editor.getSettings().setRefrainFromScrolling(isRefrainFromScrolling);
  DocumentManager.getInstance().removeListeners(editor.getDocument());
 }
}, ApplicationManager.getApplication());
origin: JetBrains/ideavim

@Override
public void editorCreated(@NotNull EditorFactoryEvent event) {
 final Editor editor = event.getEditor();
 isBlockCursor = editor.getSettings().isBlockCursor();
 isAnimatedScrolling = editor.getSettings().isAnimatedScrolling();
 isRefrainFromScrolling = editor.getSettings().isRefrainFromScrolling();
 EditorData.initializeEditor(editor);
 DocumentManager.getInstance().addListeners(editor.getDocument());
 VimPlugin.getKey().registerRequiredShortcutKeys(editor);
 if (VimPlugin.isEnabled()) {
  initLineNumbers(editor);
  // Turn on insert mode if editor doesn't have any file
  if (!EditorData.isFileEditor(editor) && editor.getDocument().isWritable() &&
    !CommandState.inInsertMode(editor)) {
   KeyHandler.getInstance().handleKey(editor, KeyStroke.getKeyStroke('i'), new EditorDataContext(editor));
  }
  editor.getSettings().setBlockCursor(!CommandState.inInsertMode(editor));
  editor.getSettings().setAnimatedScrolling(ANIMATED_SCROLLING_VIM_VALUE);
  editor.getSettings().setRefrainFromScrolling(REFRAIN_FROM_SCROLLING_VIM_VALUE);
 }
}
origin: GoogleCloudPlatform/google-cloud-intellij

 @Override
 public void editorReleased(@NotNull EditorFactoryEvent event) {
  TargetLineMouseAdapter adapter = mouseAdapterMap.get(event.getEditor());
  if (adapter != null && event.getEditor().getGutter() instanceof Component) {
   Component gutterComponent = (Component) event.getEditor().getGutter();
   gutterComponent.removeMouseListener(adapter);
   mouseAdapterMap.remove(event.getEditor());
  }
 }
},
origin: GoogleCloudPlatform/google-cloud-intellij

@Override
public void editorCreated(@NotNull EditorFactoryEvent event) {
 if (event.getEditor().getProject()
     == CloudDebugProcessStateSerializer.this.project
   && event.getEditor().getGutter() instanceof Component) {
  Component gutterComponent = (Component) event.getEditor().getGutter();
  TargetLineMouseAdapter adapter = new TargetLineMouseAdapter(event.getEditor());
  assert !mouseAdapterMap.containsKey(event.getEditor());
  mouseAdapterMap.put(event.getEditor(), adapter);
  gutterComponent.addMouseListener(adapter);
 }
}
origin: AlexanderBartash/hybris-integration-intellij-idea-plugin

  @Override
  public void editorReleased(@NotNull final EditorFactoryEvent editorFactoryEvent) {
    impexHeaderNameHighlighterService.releaseEditorData(editorFactoryEvent.getEditor());
    impexColumnHighlighterService.releaseEditorData(editorFactoryEvent.getEditor());
  }
}
origin: qeesung/HighlightBracketPair

/**
 * Invoked when the editor is released, and dissolve the relationship
 * between the {@link Editor} editor and {@link HighlightEditorComponent} component,
 * and dispose the component.
 *
 * @param editorFactoryEvent
 */
@Override
public void editorReleased(@NotNull EditorFactoryEvent editorFactoryEvent) {
  HighlightEditorComponent editorComponent =
      editorHighlightEditorComponentMap.remove(editorFactoryEvent.getEditor());
  if (editorComponent == null) {
    return;
  }
  editorComponent.dispose();
}
origin: qeesung/HighlightBracketPair

/**
 * Invoked when the editor is created, and establish the relationship
 * between the {@link Editor} editor and {@link HighlightEditorComponent} component.
 *
 * @param editorFactoryEvent editor factory event.
 */
@Override
public void editorCreated(@NotNull EditorFactoryEvent editorFactoryEvent) {
  Editor editor = editorFactoryEvent.getEditor();
  if (editor.getProject() == null) {
    return;
  }
  HighlightEditorComponent highlightEditorComponent =
      new HighlightEditorComponent(editor);
  editorHighlightEditorComponentMap.put(editor, highlightEditorComponent);
}
origin: Camelcade/Perl5-IDEA

 @Override
 public void editorCreated(@NotNull EditorFactoryEvent event) {
  Document document = event.getEditor().getDocument();
  VirtualFile file = FileDocumentManager.getInstance().getFile(document);
  if (file != null && file.getFileType() instanceof PerlPluginBaseFileType) {
   checkForUpdates();
  }
 }
};
origin: antlr/intellij-plugin-v4

  @Override
  public void editorReleased(@NotNull EditorFactoryEvent event) {
    Editor editor = event.getEditor();
    if (editor.getProject() != null && editor.getProject() != project) {
      return;
    }
    GrammarEditorMouseAdapter listener = editor.getUserData(EDITOR_MOUSE_LISTENER_KEY);
    if (listener != null) {
      editor.removeEditorMouseListener(listener);
      editor.putUserData(EDITOR_MOUSE_LISTENER_KEY, null);
    }
  }
}
origin: antlr/intellij-plugin-v4

@Override
public void editorCreated(@NotNull EditorFactoryEvent event) {
  final Editor editor = event.getEditor();
  final Document doc = editor.getDocument();
  VirtualFile vfile = FileDocumentManager.getInstance().getFile(doc);
  if ( vfile!=null && vfile.getName().endsWith(".g4") ) {
    GrammarEditorMouseAdapter listener = new GrammarEditorMouseAdapter();
    editor.putUserData(EDITOR_MOUSE_LISTENER_KEY, listener);
    editor.addEditorMouseListener(listener);
  }
}
com.intellij.openapi.editor.eventEditorFactoryEventgetEditor

Popular methods of EditorFactoryEvent

    Popular in Java

    • Reactive rest calls using spring rest template
    • requestLocationUpdates (LocationManager)
    • getExternalFilesDir (Context)
    • getSupportFragmentManager (FragmentActivity)
    • FileNotFoundException (java.io)
      Thrown when a file specified by a program cannot be found.
    • NoSuchElementException (java.util)
      Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
    • Stack (java.util)
      Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
    • Pattern (java.util.regex)
      Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
    • Response (javax.ws.rs.core)
      Defines the contract between a returned instance and the runtime when an application needs to provid
    • IsNull (org.hamcrest.core)
      Is the value null?
    • Top Sublime Text plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now