org.eclipse.xtext.ui.editor.occurrences
Class DefaultOccurrenceComputer

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.occurrences.DefaultOccurrenceComputer
All Implemented Interfaces:
IOccurrenceComputer
Direct Known Subclasses:
JvmModelOccurrenceComputer

public class DefaultOccurrenceComputer
extends java.lang.Object
implements IOccurrenceComputer

Author:
Jan Koehnlein - Initial contribution and API

Field Summary
static java.lang.String DECLARATION_ANNOTATION_TYPE
           
static java.lang.String OCCURRENCE_ANNOTATION_TYPE
           
 
Constructor Summary
DefaultOccurrenceComputer()
           
 
Method Summary
protected  void addOccurrenceAnnotation(java.lang.String type, org.eclipse.jface.text.IDocument document, ITextRegion textRegion, java.util.Map<org.eclipse.jface.text.source.Annotation,org.eclipse.jface.text.Position> annotationMap)
           
protected  boolean canBeReferencedLocally(org.eclipse.emf.ecore.EObject object)
           
 java.util.Map<org.eclipse.jface.text.source.Annotation,org.eclipse.jface.text.Position> createAnnotationMap(XtextEditor editor, org.eclipse.jface.text.ITextSelection selection, org.eclipse.core.runtime.SubMonitor monitor)
           
protected  java.lang.Iterable<org.eclipse.emf.common.util.URI> getTargetURIs(org.eclipse.emf.ecore.EObject target)
           
 boolean hasAnnotationType(java.lang.String annotationType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OCCURRENCE_ANNOTATION_TYPE

public static final java.lang.String OCCURRENCE_ANNOTATION_TYPE
See Also:
Constant Field Values

DECLARATION_ANNOTATION_TYPE

public static final java.lang.String DECLARATION_ANNOTATION_TYPE
See Also:
Constant Field Values
Constructor Detail

DefaultOccurrenceComputer

public DefaultOccurrenceComputer()
Method Detail

addOccurrenceAnnotation

protected void addOccurrenceAnnotation(java.lang.String type,
                                       org.eclipse.jface.text.IDocument document,
                                       ITextRegion textRegion,
                                       java.util.Map<org.eclipse.jface.text.source.Annotation,org.eclipse.jface.text.Position> annotationMap)

createAnnotationMap

public java.util.Map<org.eclipse.jface.text.source.Annotation,org.eclipse.jface.text.Position> createAnnotationMap(XtextEditor editor,
                                                                                                                   org.eclipse.jface.text.ITextSelection selection,
                                                                                                                   org.eclipse.core.runtime.SubMonitor monitor)
Specified by:
createAnnotationMap in interface IOccurrenceComputer

getTargetURIs

protected java.lang.Iterable<org.eclipse.emf.common.util.URI> getTargetURIs(org.eclipse.emf.ecore.EObject target)
Since:
2.3

canBeReferencedLocally

protected boolean canBeReferencedLocally(org.eclipse.emf.ecore.EObject object)
Since:
2.1

hasAnnotationType

public boolean hasAnnotationType(java.lang.String annotationType)
Specified by:
hasAnnotationType in interface IOccurrenceComputer