Examples of AnnotationSelection


Examples of org.apache.uima.caseditor.editor.AnnotationSelection

    boolean isForeignSelection = !(part instanceof ContentOutline && ((ContentOutline) part)
            .getCurrentPage() == this);

    if (isForeignSelection) {
      if (selection instanceof StructuredSelection) {
        AnnotationSelection annotations = new AnnotationSelection((StructuredSelection) selection);

        if (!annotations.isEmpty()) {
          ISelection tableSelection = new StructuredSelection(new AnnotationTreeNode(mEditor
                  .getDocument(), annotations.getFirst()));

          mTableViewer.setSelection(tableSelection, true);
        }
      }
    }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.AnnotationSelection

    setEnabled(false);
  }

  @Override
  protected boolean updateSelection(IStructuredSelection selection) {
    AnnotationSelection annotation = new AnnotationSelection(selection);

    return annotation.size() == 1;
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.AnnotationSelection

  /**
   * Decreases the end index of an annotation by one.
   */
  @Override
  public void run() {
    AnnotationSelection annotations = new AnnotationSelection(getStructuredSelection());

    AnnotationFS annotation = annotations.getFirst();

    Type annotationType = annotation.getType();
    Feature endFeature = annotationType.getFeatureByBaseName("end");

    if (annotation.getBegin() < annotation.getEnd()) {
View Full Code Here

Examples of org.apache.uima.caseditor.editor.AnnotationSelection

    setEnabled(false);
  }

  @Override
  protected boolean updateSelection(IStructuredSelection selection) {
    AnnotationSelection annotation = new AnnotationSelection(selection);

    return annotation.size() == 1;
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.AnnotationSelection

  /**
   * Increases the end index of an annotation by one.
   */
  @Override
  public void run() {
    AnnotationSelection annotations = new AnnotationSelection(getStructuredSelection());

    AnnotationFS annotation = annotations.getFirst();

    Type annotationType = annotation.getType();
    Feature endFeature = annotationType.getFeatureByBaseName("end");

    if (annotation.getEnd() < mDocument.getText().length()) {
View Full Code Here

Examples of org.apache.uima.caseditor.editor.AnnotationSelection

    setEnabled(false);
  }

  @Override
  protected boolean updateSelection(IStructuredSelection selection) {
    AnnotationSelection annotation = new AnnotationSelection(selection);

    return annotation.size() > 1;
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.AnnotationSelection

  /**
   * Executes the merge action
   */
  @Override
  public void run() {
    AnnotationSelection annotations = new AnnotationSelection(getStructuredSelection());

    CAS documentCAS = mDocument.getCAS();

    AnnotationFS mergedAnnotation = documentCAS.createAnnotation(annotations.getFirst().getType(),
            annotations.getFirst().getBegin(), annotations.getLast().getEnd());

    mDocument.removeAnnotations(annotations.toList());
    mDocument.addFeatureStructure(mergedAnnotation);
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.AnnotationSelection

    setEnabled(false);
  }

  @Override
  protected boolean updateSelection(IStructuredSelection selection) {
    AnnotationSelection annotation = new AnnotationSelection(selection);

    return annotation.size() == 1;
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.AnnotationSelection

  /**
   * Increases the begin index of an annotation by one.
   */
  @Override
  public void run() {
    AnnotationSelection annotations = new AnnotationSelection(getStructuredSelection());

    AnnotationFS annotation = annotations.getFirst();

    Type annotationType = annotation.getType();
    Feature beginFeature = annotationType.getFeatureByBaseName("begin");

    if (annotation.getBegin() < annotation.getEnd()) {
View Full Code Here

Examples of org.apache.uima.caseditor.editor.AnnotationSelection

    setEnabled(false);
  }

  @Override
  protected boolean updateSelection(IStructuredSelection selection) {
    AnnotationSelection annotation = new AnnotationSelection(selection);

    return annotation.size() == 1;
  }
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.