org.eclipse.xtext.xbase.jvmmodel
Class JvmLocationInFileProvider

java.lang.Object
  extended by org.eclipse.xtext.resource.DefaultLocationInFileProvider
      extended by org.eclipse.xtext.xbase.resource.XbaseLocationInFileProvider
          extended by org.eclipse.xtext.xbase.jvmmodel.JvmLocationInFileProvider
All Implemented Interfaces:
ILocationInFileProvider, ILocationInFileProviderExtension
Direct Known Subclasses:
XtendLocationInFileProvider

public class JvmLocationInFileProvider
extends XbaseLocationInFileProvider

Author:
Jan Koehnlein - Initial contribution and API

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.xtext.resource.ILocationInFileProviderExtension
ILocationInFileProviderExtension.RegionDescription
 
Constructor Summary
JvmLocationInFileProvider()
           
 
Method Summary
protected  org.eclipse.emf.ecore.EObject convertToSource(org.eclipse.emf.ecore.EObject element)
           
 ITextRegion getFullTextRegion(org.eclipse.emf.ecore.EObject element)
           
 ITextRegion getFullTextRegion(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feature, int indexInList)
           
 ITextRegion getSignificantTextRegion(org.eclipse.emf.ecore.EObject element)
           
 ITextRegion getSignificantTextRegion(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feature, int indexInList)
           
 ITextRegion getTextRegion(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int indexInList, ILocationInFileProviderExtension.RegionDescription query)
          Queries for parts of the text region that parts of the given object originate from.
 ITextRegion getTextRegion(org.eclipse.emf.ecore.EObject object, ILocationInFileProviderExtension.RegionDescription query)
          Queries for parts of the text region that the given object is originates from.
 
Methods inherited from class org.eclipse.xtext.xbase.resource.XbaseLocationInFileProvider
getLocationNodes, getLocationOfCrossReference, useKeyword
 
Methods inherited from class org.eclipse.xtext.resource.DefaultLocationInFileProvider
createRegion, createRegion, doGetLocationOfFeature, doGetLocationOfFeature, doGetTextRegion, findNodeFor, getIdentifierFeature, getLocationOfAttribute, getLocationOfContainmentReference, getLocationOfContainmentReference, getTextRegion, isHidden, isHidden
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JvmLocationInFileProvider

public JvmLocationInFileProvider()
Method Detail

getFullTextRegion

public ITextRegion getFullTextRegion(org.eclipse.emf.ecore.EObject element)
Specified by:
getFullTextRegion in interface ILocationInFileProvider
Overrides:
getFullTextRegion in class DefaultLocationInFileProvider

getFullTextRegion

public ITextRegion getFullTextRegion(org.eclipse.emf.ecore.EObject owner,
                                     org.eclipse.emf.ecore.EStructuralFeature feature,
                                     int indexInList)
Specified by:
getFullTextRegion in interface ILocationInFileProvider
Overrides:
getFullTextRegion in class DefaultLocationInFileProvider

getSignificantTextRegion

public ITextRegion getSignificantTextRegion(org.eclipse.emf.ecore.EObject element)
Specified by:
getSignificantTextRegion in interface ILocationInFileProvider
Overrides:
getSignificantTextRegion in class XbaseLocationInFileProvider

getSignificantTextRegion

public ITextRegion getSignificantTextRegion(org.eclipse.emf.ecore.EObject owner,
                                            org.eclipse.emf.ecore.EStructuralFeature feature,
                                            int indexInList)
Specified by:
getSignificantTextRegion in interface ILocationInFileProvider
Overrides:
getSignificantTextRegion in class DefaultLocationInFileProvider

getTextRegion

@NonNullByDefault
@Nullable
public ITextRegion getTextRegion(org.eclipse.emf.ecore.EObject object,
                                                           org.eclipse.emf.ecore.EStructuralFeature feature,
                                                           int indexInList,
                                                           ILocationInFileProviderExtension.RegionDescription query)
Description copied from interface: ILocationInFileProviderExtension
Queries for parts of the text region that parts of the given object originate from.

Specified by:
getTextRegion in interface ILocationInFileProviderExtension
Overrides:
getTextRegion in class DefaultLocationInFileProvider
Parameters:
object - the instance whose region should be returned.
feature - the feature that was set when the requested range was consumed by the parser.
indexInList - the index in the list of feature values. -1 if all values should be considered.
query - the hint about the requested range.
Returns:
the text region or null if the object does not have an associated text region.

getTextRegion

@NonNullByDefault
@Nullable
public ITextRegion getTextRegion(org.eclipse.emf.ecore.EObject object,
                                                           ILocationInFileProviderExtension.RegionDescription query)
Description copied from interface: ILocationInFileProviderExtension
Queries for parts of the text region that the given object is originates from.

Specified by:
getTextRegion in interface ILocationInFileProviderExtension
Overrides:
getTextRegion in class DefaultLocationInFileProvider
Parameters:
object - the instance whose region should be returned.
query - the hint about the requested range.
Returns:
the text region or null if the object does not have an associated text region.

convertToSource

protected org.eclipse.emf.ecore.EObject convertToSource(org.eclipse.emf.ecore.EObject element)