Examples of EditorFactory


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

Examples of com.intellij.openapi.editor.EditorFactory

      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

Examples of com.intellij.openapi.editor.EditorFactory

    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

Examples of com.intellij.openapi.editor.EditorFactory

    /**
     * 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

Examples of com.intellij.openapi.editor.EditorFactory

            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

Examples of org.nlogo.window.EditorFactory

    VMCheck.detectBadJVMs();
    org.nlogo.awt.EventQueue.invokeLater(new Runnable() {
      public void run() {
        setBackground(java.awt.Color.white);
        getContentPane().setBackground(java.awt.Color.white);
        EditorFactory editorFactory = new EditorFactory() {
          public org.nlogo.editor.AbstractEditorArea newEditor(int cols, final int rows, boolean disableFocusTraversal) {
            return newEditor(cols, rows, disableFocusTraversal, null);
          }

          org.nlogo.editor.AbstractEditorArea newEditor
View Full Code Here

Examples of ptolemy.actor.gui.EditorFactory

            Frame frame = getFrame();
            if (target instanceof GTEntity) {
                List<?> attributeList = target
                        .attributeList(EditorFactory.class);
                if (attributeList.size() > 0) {
                    EditorFactory factory = (EditorFactory) attributeList
                            .get(0);
                    factory.createEditor(target, frame);
                } else {
                    new EditParametersDialog(frame, target);
                }
            } else {
                List<?> ingredientsAttributes = target
                        .attributeList(GTIngredientsAttribute.class);
                try {
                    if (ingredientsAttributes.isEmpty()) {
                        Attribute attribute = new GTIngredientsAttribute(
                                target, target.uniqueName("operations"));
                        attribute.setPersistent(false);
                    }

                    EditorFactory factory = new GTIngredientsEditor.Factory(
                            target, target
                                    .uniqueName("ingredientsEditorFactory"));
                    factory.setPersistent(false);
                    factory.createEditor(target, frame);
                    factory.setContainer(null);
                } catch (KernelException e) {
                    throw new InternalErrorException(e);
                }
            }
        }
View Full Code Here

Examples of ptolemy.actor.gui.EditorFactory

        //Use the EditorFactory if the alt key is not pressed and the
        // action command is not "Configure".
        if (attributeList.size() > 0 && !altKeyPressed
                && !event.getActionCommand().equals("Configure")) {

            EditorFactory factory = (EditorFactory) attributeList.get(0);
            factory.createEditor(target, parent);
        } else {
            new EditParametersDialog(parent, target);
        }
    }
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.