Examples of AnnotationSelection


Examples of org.apache.uima.caseditor.editor.util.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.removeFeatureStructures(annotations.toList());
    mDocument.addFeatureStructure(mergedAnnotation);
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.util.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.util.AnnotationSelection

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

    AnnotationFS annotation = annotations.getFirst();

    lowerLeftAnnotationSide(mDocument, annotation);
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.util.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.util.AnnotationSelection

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

    AnnotationFS annotation = annotations.getFirst();
   
    wideLeftAnnotationSide(mDocument, annotation);
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.util.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.util.AnnotationSelection

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

    AnnotationFS annotation = annotations.getFirst();

    lowerRightAnnotationSide(editor.getDocument(), annotation);
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.util.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.util.AnnotationSelection

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

    AnnotationFS annotation = annotations.getFirst();

    wideRightAnnotationSide(editor.getDocument(), annotation);
  }
View Full Code Here

Examples of org.apache.uima.caseditor.editor.util.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.