Class DefaultLocationInFileProvider

    • Constructor Detail

      • DefaultLocationInFileProvider

        public DefaultLocationInFileProvider()
    • Method Detail

      • getTextRegion

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

        public org.eclipse.xtext.util.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
        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.
        Since:
        2.3
      • getLocationOfContainmentReference

        protected org.eclipse.xtext.util.ITextRegion getLocationOfContainmentReference​(org.eclipse.emf.ecore.EObject owner,
                                                                                       org.eclipse.emf.ecore.EReference feature,
                                                                                       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,
                                                                                       ILocationInFileProviderExtension.RegionDescription query)
        Since:
        2.3
      • 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)
      • doGetLocationOfFeature

        protected org.eclipse.xtext.util.ITextRegion doGetLocationOfFeature​(org.eclipse.emf.ecore.EObject owner,
                                                                            org.eclipse.emf.ecore.EStructuralFeature 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,
                                                                            ILocationInFileProviderExtension.RegionDescription query)
        Since:
        2.3
      • getLocationNodes

        protected java.util.List<INode> getLocationNodes​(org.eclipse.emf.ecore.EObject obj)
      • useKeyword

        protected boolean useKeyword​(Keyword keyword,
                                     org.eclipse.emf.ecore.EObject context)
      • getIdentifierFeature

        protected org.eclipse.emf.ecore.EStructuralFeature getIdentifierFeature​(org.eclipse.emf.ecore.EObject obj)
      • createRegion

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

        protected org.eclipse.xtext.util.TextRegionWithLineInformation toZeroBasedRegion​(org.eclipse.xtext.util.ITextRegionWithLineInformation region)
        Since:
        2.5
      • isHidden

        protected boolean isHidden​(INode node)
      • findNodeFor

        protected ICompositeNode findNodeFor​(org.eclipse.emf.ecore.EObject semanticObject)
        Returns the smallest node that covers all assigned values of the given object. It handles the semantics of actions and unassigned rule calls.
        Returns:
        the minimal node that covers all assigned values of the given object.
        Since:
        2.3