Package com.intellij.openapi.fileEditor

Examples of com.intellij.openapi.fileEditor.FileEditorManager


        if (projectDir == null) {
            return;
        }

        FileEditorManager fileEditorManager = FileEditorManager.getInstance(project);

        try {
            GoToolWindow toolWindow = this.getGoToolWindow(project);
            toolWindow.showAndCreate(project);
            toolWindow.clearConsoleView();
View Full Code Here


        String goExecName = GoSdkUtil.getGoExecName(sdk);
        if (goExecName == null) {
            return;
        }

        FileEditorManager fileEditorManager = FileEditorManager.getInstance(project);
        VirtualFile selectedFile = fileEditorManager.getSelectedFiles()[0];
        String fileName = selectedFile.getCanonicalPath();
        Document doc = FileDocumentManager.getInstance().getDocument(selectedFile);
        if (doc != null) {
            FileDocumentManager.getInstance().saveDocument(doc);
        }
View Full Code Here

  @Nullable public static Editor getSelectedEditor() {
    IdeFrame frame = IdeFocusManager.findInstance().getLastFocusedFrame();
    if (frame == null) return null;

    FileEditorManager instance = FileEditorManager.getInstance(frame.getProject());
    return instance.getSelectedTextEditor();
  }
View Full Code Here

      });
    }
  }

  protected void tearDown() throws Exception {
    FileEditorManager editorManager = FileEditorManager.getInstance(getProject());
    VirtualFile[] openFiles = editorManager.getOpenFiles();
    for (VirtualFile openFile : openFiles) {
      editorManager.closeFile(openFile);
    }
    deleteVFile();
    myEditor = null;
    myFile = null;
    myVFile = null;
View Full Code Here

    }

    private void openFileInEditor(@NotNull final Notification notification, @Nullable final VirtualFile file) {
        if (file == null) return;

        final FileEditorManager editorManager = FileEditorManager.getInstance(myProject);
        final Editor editor = editorManager.openTextEditor(new OpenFileDescriptor(myProject, file), true);
        final LogicalPosition logicalPosition = getLogicalPosition();

        if(editor != null && logicalPosition != null) {
            // Set correct caret position
            // See https://github.com/johnlindquist/open-source-plugins/blob/master/QuickJump/src/com/johnlindquist/quickjump/QuickJumpAction.java
View Full Code Here

    public void disposeComponent() {

    }

    public void openEditor(final MongoObjectFile mongoObjectFile) {
        FileEditorManager fileEditorManager = FileEditorManager.getInstance(mongoObjectFile.getProject());
        fileEditorManager.openFile(mongoObjectFile, true);
    }
View Full Code Here

        final VirtualFile virtualFile = nodeInfo.getFile().getVirtualFile();
        if (virtualFile == null || !virtualFile.exists()) {
            return;
        }

        final FileEditorManager fileEditorManager = FileEditorManager.getInstance(project);
        final FileEditor[] editor = fileEditorManager.openFile(
                virtualFile, true);

        if (editor.length > 0 && editor[0] instanceof TextEditor) {
            final LogicalPosition problemPos = new LogicalPosition(
                    Math.max(lineFor(nodeInfo) - 1, 0), Math.max(columnFor(nodeInfo), 0));
View Full Code Here

TOP

Related Classes of com.intellij.openapi.fileEditor.FileEditorManager

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.