Package org.eclipse.ui.part

Examples of org.eclipse.ui.part.FileEditorInput


  @Override
  protected PageRec doCreatePage(IWorkbenchPart part) {
    EditorPart source = (EditorPart) part;
    IEditorInput editorInput = source.getEditorInput();
    if (editorInput instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) editorInput;
      IResource r = fileInput.getFile();

      TestViewPage testPage = new TestViewPage(r);
      initPage(testPage);
      testPage.createControl(getPageBook());
      testPage.restoreState(memento);
View Full Code Here


      } catch (CoreException e) {
        RutaAddonsPlugin.error(e);
      }
    }
    try {
      page.openEditor(new FileEditorInput(file), "org.apache.uima.caseditor.editor");
      page.showView(TruePositiveView.ID);
      page.showView(FalsePositiveView.ID);
      page.showView(FalseNegativeView.ID);
    } catch (PartInitException e) {
      RutaAddonsPlugin.error(e);
View Full Code Here

    }
    String absolutePath = file.getAbsolutePath();
    try {
      IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      IFile ifile = getIFile(absolutePath);
      AnnotationEditor editor = (AnnotationEditor) page.openEditor(new FileEditorInput(ifile),
              "org.apache.uima.caseditor.editor");
      editor.selectAndReveal(begin, end - begin);
      return editor;
    } catch (PartInitException e) {
      RutaAddonsPlugin.error(e);
View Full Code Here

    }
    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IFile file = workspace.getRoot().getFileForLocation(resultPath);
    try {
      IEditorPart openEditor = page.openEditor(new FileEditorInput(file), "org.apache.uima.ruta.ide.ui.editor.RutaEditor");
      RutaEditor tme = (RutaEditor) openEditor;
      tme.highlightElement(id);
    } catch (PartInitException e) {
      RutaAddonsPlugin.error(e);
    }
View Full Code Here

          Feature featureScript = t.getFeatureByBaseName(ExplainConstants.SCRIPT);
          int id = fs.getIntValue(featureId);
          String script = fs.getStringValue(featureScript);
          IEditorInput editorInput = editor.getEditorInput();
          if (editorInput instanceof FileEditorInput) {
            FileEditorInput fei = (FileEditorInput) editorInput;
            IPath path = fei.getPath();
            IWorkspace workspace = ResourcesPlugin.getWorkspace();
            IWorkspaceRoot workspaceRoot = workspace.getRoot();
            IFile iFile = workspaceRoot.getFileForLocation(path);
            if (iFile != null) {
              IProject project = iFile.getProject();
View Full Code Here

      Feature featureScript = t.getFeatureByBaseName(CreatedByVisitor.FEATURE_SCRIPT);
      int id = fs.getIntValue(featureId);
      String script = fs.getStringValue(featureScript);
      IEditorInput editorInput = editor.getEditorInput();
      if (editorInput instanceof FileEditorInput) {
        FileEditorInput fei = (FileEditorInput) editorInput;
        IPath path = fei.getPath();
        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IWorkspaceRoot workspaceRoot = workspace.getRoot();
        IFile iFile = workspaceRoot.getFileForLocation(path);
        IProject project = iFile.getProject();
        if (iFile != null) {
View Full Code Here

    IWorkbench workbench = RutaAddonsPlugin.getDefault().getWorkbench();
    IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
    IEditorPart part = page.getActiveEditor();
    IEditorInput editorInput = part.getEditorInput();
    if (editorInput instanceof FileEditorInput) {
      FileEditorInput input = (FileEditorInput) editorInput;
      IFile path = input.getFile();
      getJob(event, path).schedule();
    }
    return null;
  }
View Full Code Here

  }

  public void open() {
    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    try {
      page.openEditor(new FileEditorInput(file), "taeconfigurator.editors.MultiPageEditor");
    } catch (PartInitException e) {
      e.printStackTrace();
    }

  }
View Full Code Here

    }
    String absolutePath = file.getAbsolutePath();
    try {
      IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      IFile ifile = getIFile(absolutePath);
      AnnotationEditor editor = (AnnotationEditor) page.openEditor(new FileEditorInput(ifile),
              "org.apache.uima.caseditor.editor");
      editor.selectAndReveal(begin, end - begin);
    } catch (PartInitException e) {
      RutaAddonsPlugin.error(e);
    }
View Full Code Here

      IEditorPart activeEditor = page.getActiveEditor();
      if (activeEditor instanceof AnnotationEditor) {
        AnnotationEditor ae = (AnnotationEditor) activeEditor;
        IEditorInput editorInput = ae.getEditorInput();
        if (editorInput instanceof FileEditorInput) {
          FileEditorInput fei = (FileEditorInput) editorInput;
          IFile file = fei.getFile();
          if (data != null && file.getLocationURI().equals(data.getFile().toURI())) {
            int begin = data.getBegin();
            int end = data.getEnd();
            ae.selectAndReveal(begin, end - begin);
          }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.part.FileEditorInput

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.