Package com.intellij.openapi.fileEditor

Examples of com.intellij.openapi.fileEditor.OpenFileDescriptor.navigate()


                pomFile))
            return;

        final OpenFileDescriptor desc = new OpenFileDescriptor(project, pomFile);
        if (desc.canNavigateToSource())
            desc.navigate(true);
    }

    public void navigateToSource(final PluginNode pNode) {
        final VirtualFile script = getGoalContainerFile(pNode);
        if (script == null || !script.isValid() || !FileUtils.exists(script))
View Full Code Here


        if (script == null || !script.isValid() || !FileUtils.exists(script))
            return;

        final OpenFileDescriptor desc = new OpenFileDescriptor(project, script);
        if (desc.canNavigateToSource())
            desc.navigate(true);
    }

    public void navigateToSource(final GoalNode pNode) {
        navigateToSource(pNode.getUserObject());
    }
View Full Code Here

        if (script == null)
            return;

        final OpenFileDescriptor desc = new OpenFileDescriptor(project, script);
        if (desc.canNavigateToSource()) {
            desc.navigate(true);
            final FileEditor fileEditor = fileMgr.getSelectedEditor(script);
            if (fileEditor instanceof TextEditor) {
                final Editor editor = ((TextEditor) fileEditor).getEditor();
                final Document document = editor.getDocument();
                final PsiFile psiFile = psiMgr.getPsiFile(document);
View Full Code Here

                        VirtualFile newCreatedFile = viewsPath.findFileByRelativePath(fileName + ".php");

                        if (newCreatedFile != null) {

                            OpenFileDescriptor of = new OpenFileDescriptor(project, newCreatedFile);
                            of.navigate(true);
                        }
                    }
                });
                if (this.insertHandler != null) {
                    this.insertHandler.handleInsert(context, this);
View Full Code Here

                        migrationsFolder.refresh(false, true);
                        VirtualFile migrationFile = migrationsFolder.findFileByRelativePath(name + ".php"); //migrationPath + "migrations/" +
                        if (migrationFile != null) {
                            OpenFileDescriptor of = new OpenFileDescriptor(_project, migrationFile);
                            if (of.canNavigate()) {
                                of.navigate(true);
                            }
                        } else {
                            PluginManager.getLogger().error("Migrations file not founded");
                        }
                    } else {
View Full Code Here

                    if (violationLabel.getLine() != null) {
                        DataManager.getInstance().getDataContextFromFocus().doWhenDone(new AsyncResult.Handler<DataContext>() {
                            @Override
                            public void run(DataContext dataContext) {
                                OpenFileDescriptor descriptor = new OpenFileDescriptor(project, violationLabel.getVirtualFile(), violationLabel.getLine() - 1, 0);
                                descriptor.navigate(false);
                            }
                        });
                    }
                }
            }
View Full Code Here

                    if (violation.getLine() != null) {
                        DataManager.getInstance().getDataContextFromFocus().doWhenDone(new AsyncResult.Handler<DataContext>() {
                            @Override
                            public void run(DataContext dataContext) {
                                OpenFileDescriptor descriptor = new OpenFileDescriptor(project, violationTableModel.getCurrentVirtualFile(), violation.getLine() - 1, 0);
                                descriptor.navigate(false);
                            }
                        });
                    }
                }
            }
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.