Class DefaultLocationInFileProvider

  • All Implemented Interfaces:
    org.eclipse.xtext.resource.ILocationInFileProvider

    public class DefaultLocationInFileProvider
    extends Object
    implements org.eclipse.xtext.resource.ILocationInFileProvider
    Default implementation of ILocationInFileProvider for XtextXmlResource.

    This implementation doesn't discriminates significant and full region, it always returns full region. Clients can override.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.eclipse.xtext.util.ITextRegion createRegion​(List<INode> nodes)  
      protected org.eclipse.xtext.util.ITextRegion doGetLocationOfFeature​(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feature, int indexInList, boolean isSignificant)  
      org.eclipse.xtext.util.ITextRegion getFullTextRegion​(org.eclipse.emf.ecore.EObject obj)  
      org.eclipse.xtext.util.ITextRegion getFullTextRegion​(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feature, int indexInList)  
      protected org.eclipse.xtext.util.ITextRegion getLocationOfAttribute​(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EAttribute attribute, int indexInList, boolean isSignificant)  
      protected org.eclipse.xtext.util.ITextRegion getLocationOfContainmentReference​(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference feature, int indexInList, boolean isSignificant)  
      protected org.eclipse.xtext.util.ITextRegion getLocationOfCrossReference​(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference, int indexInList, boolean isSignificant)  
      org.eclipse.xtext.util.ITextRegion getSignificantTextRegion​(org.eclipse.emf.ecore.EObject obj)  
      org.eclipse.xtext.util.ITextRegion getSignificantTextRegion​(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feature, int indexInList)  
      protected org.eclipse.xtext.util.ITextRegion getTextRegion​(org.eclipse.emf.ecore.EObject obj, boolean isSignificant)  
    • Constructor Detail

      • DefaultLocationInFileProvider

        public DefaultLocationInFileProvider()
    • Method Detail

      • getSignificantTextRegion

        public org.eclipse.xtext.util.ITextRegion getSignificantTextRegion​(org.eclipse.emf.ecore.EObject obj)
        Specified by:
        getSignificantTextRegion in interface org.eclipse.xtext.resource.ILocationInFileProvider
      • getFullTextRegion

        public org.eclipse.xtext.util.ITextRegion getFullTextRegion​(org.eclipse.emf.ecore.EObject obj)
        Specified by:
        getFullTextRegion in interface org.eclipse.xtext.resource.ILocationInFileProvider
      • getSignificantTextRegion

        public org.eclipse.xtext.util.ITextRegion getSignificantTextRegion​(org.eclipse.emf.ecore.EObject owner,
                                                                           org.eclipse.emf.ecore.EStructuralFeature feature,
                                                                           int indexInList)
        Specified by:
        getSignificantTextRegion in interface org.eclipse.xtext.resource.ILocationInFileProvider
      • getFullTextRegion

        public org.eclipse.xtext.util.ITextRegion getFullTextRegion​(org.eclipse.emf.ecore.EObject owner,
                                                                    org.eclipse.emf.ecore.EStructuralFeature feature,
                                                                    int indexInList)
        Specified by:
        getFullTextRegion in interface org.eclipse.xtext.resource.ILocationInFileProvider
      • getLocationOfCrossReference

        protected org.eclipse.xtext.util.ITextRegion getLocationOfCrossReference​(org.eclipse.emf.ecore.EObject owner,
                                                                                 org.eclipse.emf.ecore.EReference reference,
                                                                                 int indexInList,
                                                                                 boolean isSignificant)
      • getLocationOfAttribute

        protected org.eclipse.xtext.util.ITextRegion getLocationOfAttribute​(org.eclipse.emf.ecore.EObject owner,
                                                                            org.eclipse.emf.ecore.EAttribute attribute,
                                                                            int indexInList,
                                                                            boolean isSignificant)
      • getLocationOfContainmentReference

        protected org.eclipse.xtext.util.ITextRegion getLocationOfContainmentReference​(org.eclipse.emf.ecore.EObject owner,
                                                                                       org.eclipse.emf.ecore.EReference feature,
                                                                                       int indexInList,
                                                                                       boolean isSignificant)
      • doGetLocationOfFeature

        protected org.eclipse.xtext.util.ITextRegion doGetLocationOfFeature​(org.eclipse.emf.ecore.EObject owner,
                                                                            org.eclipse.emf.ecore.EStructuralFeature feature,
                                                                            int indexInList,
                                                                            boolean isSignificant)
      • createRegion

        protected org.eclipse.xtext.util.ITextRegion createRegion​(List<INode> nodes)
      • getTextRegion

        protected org.eclipse.xtext.util.ITextRegion getTextRegion​(org.eclipse.emf.ecore.EObject obj,
                                                                   boolean isSignificant)