FeatureStructureSelection fsSelection = new FeatureStructureSelection(
(IStructuredSelection) selection);
if (fsSelection.isEmpty()) {
return;
}
FeatureStructure featureStructure = fsSelection.toList().get(0);
if (featureStructure instanceof AnnotationFS) {
CAS cas = document.getCAS();
Type t = cas.getTypeSystem().getType(CreatedByVisitor.TYPE);
Feature featureAnnotation = t.getFeatureByBaseName(CreatedByVisitor.FEATURE_ANNOTATION);
FSIterator<FeatureStructure> iterator = cas.getIndexRepository().getAllIndexedFS(t);