Package com.intellij.openapi.editor

Examples of com.intellij.openapi.editor.EditorFactory


  public void removeBottomComponent(@NotNull final FileEditor editor, @NotNull final JComponent component) {
  }

  public void closeAllFiles() {
    final EditorFactory editorFactory = EditorFactory.getInstance();
    for (VirtualFile file : myVirtualFile2Editor.keySet()) {
      Editor editor = myVirtualFile2Editor.get(file);
      if (editor != null){
        editorFactory.releaseEditor(editor);
      }
    }
    myVirtualFile2Editor.clear();
  }
View Full Code Here


      finally {
        ourTestCase = null;
      }
      super.tearDown();

      EditorFactory editorFactory = EditorFactory.getInstance();
      final Editor[] allEditors = editorFactory.getAllEditors();
      ((EditorFactoryImpl)editorFactory).validateEditorsAreReleased(getProject());
      for (Editor editor : allEditors) {
        editorFactory.releaseEditor(editor);
      }
      assertEquals(0, allEditors.length);
    }
    finally {
      myProjectManager = null;
View Full Code Here

    private Editor findEditorForTab(String tabTitle) {
        return this.velocityEditorMap.get(tabTitle);
    }

    private void createEditors(JUnitGeneratorSettings settings) {
        EditorFactory factory = EditorFactory.getInstance();
        //create the editors
        for (Map.Entry<String, String> entry : settings.getVmTemplates().entrySet()) {
            final Document velocityTemplate = factory.createDocument(entry.getValue() != null ? entry.getValue() : "");
            try {
                final Editor editor =
                        factory.createEditor(velocityTemplate, this.project, FileTypeManager.getInstance().getFileTypeByExtension("vm"), false);
                editor.getContentComponent().addKeyListener(new KeyAdapter() {
                    @Override
                    public void keyReleased(KeyEvent e) {
                        modified = true;
                    }
View Full Code Here

    /**
     * Clean out the editors and other components that need to be released
     */
    public void release() {
        EditorFactory factory = EditorFactory.getInstance();
        for (Editor editor : this.velocityEditorMap.values()) {
            this.tabbedPane1.remove(editor.getComponent());
            factory.releaseEditor(editor);
        }
        this.velocityEditorMap.clear();
    }
View Full Code Here

            focusManager.requestFocus(editorContentComponent, true);
        }
    }

    private Editor createEditor() {
        EditorFactory editorFactory = EditorFactory.getInstance();
        Document editorDocument = editorFactory.createDocument("");
        Editor editor = editorFactory.createEditor(editorDocument, project);
        fillEditorSettings(editor.getSettings());
        EditorEx editorEx = (EditorEx) editor;
        attachHighlighter(editorEx);
        operatorCompletionAction = new OperatorCompletionAction(editor);
        return editor;
View Full Code Here

TOP

Related Classes of com.intellij.openapi.editor.EditorFactory

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.