org.eclipse.xtext.resource.impl
Class DefaultResourceDescriptionStrategy

java.lang.Object
  extended by org.eclipse.xtext.resource.impl.DefaultResourceDescriptionStrategy
All Implemented Interfaces:
IDefaultResourceDescriptionStrategy
Direct Known Subclasses:
EcoreResourceDescriptionStrategy, Xtend2ResourceDescriptionStrategy, XtextResourceDescriptionStrategy

public class DefaultResourceDescriptionStrategy
extends java.lang.Object
implements IDefaultResourceDescriptionStrategy

By default, all elements with a not null name feature and all cross-resource crossrefs are indexed.

Author:
Jan Koehnlein - Initial contribution and API

Constructor Summary
DefaultResourceDescriptionStrategy()
           
 
Method Summary
 boolean createEObjectDescriptions(org.eclipse.emf.ecore.EObject eObject, IAcceptor<IEObjectDescription> acceptor)
          Calculates the IEObjectDescriptions for eObject and passes them to the acceptor.
protected  IReferenceDescription createReferenceDescription(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.common.util.URI exportedContainerURI, org.eclipse.emf.ecore.EReference eReference, int indexInList, org.eclipse.emf.ecore.EObject target)
           
 boolean createReferenceDescriptions(org.eclipse.emf.ecore.EObject from, org.eclipse.emf.common.util.URI exportedContainerURI, IAcceptor<IReferenceDescription> acceptor)
          Calculates the IReferenceDescriptions for external cross references from eObject and passes them to the acceptor.
 LazyURIEncoder getLazyURIEncoder()
           
 IQualifiedNameProvider getQualifiedNameProvider()
           
protected  boolean isIndexable(org.eclipse.emf.ecore.EReference eReference)
           
protected  boolean isResolvedAndExternal(org.eclipse.emf.ecore.EObject from, org.eclipse.emf.ecore.EObject to)
           
 void setLazyURIEncoder(LazyURIEncoder uriEncoder)
           
 void setQualifiedNameProvider(IQualifiedNameProvider qualifiedNameProvider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResourceDescriptionStrategy

public DefaultResourceDescriptionStrategy()
Method Detail

setQualifiedNameProvider

public void setQualifiedNameProvider(IQualifiedNameProvider qualifiedNameProvider)

getQualifiedNameProvider

public IQualifiedNameProvider getQualifiedNameProvider()

setLazyURIEncoder

public void setLazyURIEncoder(LazyURIEncoder uriEncoder)
Since:
2.0

getLazyURIEncoder

public LazyURIEncoder getLazyURIEncoder()
Since:
2.0

createEObjectDescriptions

public boolean createEObjectDescriptions(org.eclipse.emf.ecore.EObject eObject,
                                         IAcceptor<IEObjectDescription> acceptor)
Description copied from interface: IDefaultResourceDescriptionStrategy
Calculates the IEObjectDescriptions for eObject and passes them to the acceptor.

Specified by:
createEObjectDescriptions in interface IDefaultResourceDescriptionStrategy
Returns:
true if the children of eObject should be traversed.

createReferenceDescriptions

public boolean createReferenceDescriptions(org.eclipse.emf.ecore.EObject from,
                                           org.eclipse.emf.common.util.URI exportedContainerURI,
                                           IAcceptor<IReferenceDescription> acceptor)
Description copied from interface: IDefaultResourceDescriptionStrategy
Calculates the IReferenceDescriptions for external cross references from eObject and passes them to the acceptor.

Specified by:
createReferenceDescriptions in interface IDefaultResourceDescriptionStrategy
Returns:
true if the children of eObject should be traversed.

createReferenceDescription

protected IReferenceDescription createReferenceDescription(org.eclipse.emf.ecore.EObject owner,
                                                           org.eclipse.emf.common.util.URI exportedContainerURI,
                                                           org.eclipse.emf.ecore.EReference eReference,
                                                           int indexInList,
                                                           org.eclipse.emf.ecore.EObject target)
Since:
2.0

isIndexable

protected boolean isIndexable(org.eclipse.emf.ecore.EReference eReference)

isResolvedAndExternal

protected boolean isResolvedAndExternal(org.eclipse.emf.ecore.EObject from,
                                        org.eclipse.emf.ecore.EObject to)