Package org.apache.uima.caseditor.editor

Examples of org.apache.uima.caseditor.editor.AnnotationEditor$AnnotateAction


  // unavailable message is displayed
   
  PageRec result = null;

    if ((part instanceof AnnotationEditor)) {
      AnnotationEditor editor = (AnnotationEditor) part;

      AnnotationDocument document = editor.getDocument();
     
      if (document != null) {
        FeatureStructureBrowserViewPage page =
          new FeatureStructureBrowserViewPage(document);
        initPage(page);
View Full Code Here


      for (IWorkbenchPage page : pages) {
        IEditorPart[] parts = page.getEditors();

        for (IEditorPart part : parts) {
          if (part instanceof AnnotationEditor) {
            AnnotationEditor editor = (AnnotationEditor) part;
            dirtyParts.add(editor);
          }
        }
      }
    }
View Full Code Here

          if (editorMap.get(documentElement) == null) {
            // file is not opened in any editor, just save the changes
            documentElement.saveDocument();
          } else if (!editorMap.get(documentElement).isDirty()) {
            // element is opened in editor and not dirty
            AnnotationEditor editor = editorMap.get(documentElement);
            editor.setDirty();
          } else {
            // element is opened in editor and dirty, do nothing
          }
        } catch (CoreException e) {
View Full Code Here

  // unavailable message is displayed
   
  PageRec result = null;

    if ((part instanceof AnnotationEditor)) {
      AnnotationEditor editor = (AnnotationEditor) part;

      AnnotationDocument document = editor.getDocument();
     
      if (document != null) {
        EditViewPage page = new EditViewPage(this, document);
        initPage(page);
        page.createControl(getPageBook());
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);
    }
    return null;
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

      StructuredSelection selection = (StructuredSelection) event.getSelection();
      QueryResult data = (QueryResult) selection.getFirstElement();
      IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      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

          if (editorMap.get(filename) == null) {
            // file is not opened in any editor, just save the changes
            documentElement.saveDocument();
          } else if (!editorMap.get(filename).isDirty()) {
            // element is opened in editor and not dirty
            final AnnotationEditor editor = editorMap.get(filename);
            Display.getDefault().syncExec(new Runnable() {
                public void run() {
                  editor.getDocument().changed();
                }
              });
          } else {
            // element is opened in editor and dirty, do nothing
          }
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

      StructuredSelection selection = (StructuredSelection) event.getSelection();
      QueryResult data = (QueryResult) selection.getFirstElement();
      IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      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 (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.apache.uima.caseditor.editor.AnnotationEditor$AnnotateAction

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.