Package org.eclipse.xtext.linking.lazy
Class LazyURIEncoder
- java.lang.Object
-
- org.eclipse.xtext.linking.lazy.LazyURIEncoder
-
public class LazyURIEncoder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SEP
static java.lang.String
USE_INDEXED_FRAGMENTS_BINDING
static java.lang.String
XTEXT_LINK
-
Constructor Summary
Constructors Constructor Description LazyURIEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendShortFragment(org.eclipse.emf.ecore.EObject obj, java.lang.StringBuilder target)
org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode>
decode(org.eclipse.emf.ecore.resource.Resource res, java.lang.String uriFragment)
decodes the uriFragmentjava.lang.String
encode(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EReference ref, INode node)
encodes the given three parameters into a string, so that they can be retrieved from a resource usingdecode(Resource, String)
org.eclipse.emf.ecore.EReference
fromShortExternalForm(org.eclipse.emf.ecore.EClass clazz, java.lang.String shortForm)
int
getIndex(java.lang.String uriFragment)
protected java.lang.String
getIndexFragment(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EReference ref, INode node)
protected org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode>
getLazyProxyInformation(org.eclipse.emf.ecore.resource.Resource res, java.lang.String uriFragment)
INode
getNode(org.eclipse.emf.ecore.EObject object, java.lang.String fragment)
INode
getNode(INode node, java.lang.String path)
ONLY public to be testablevoid
getRelativePath(java.lang.StringBuilder result, INode parserNode, INode node)
ONLY public to be testableprotected boolean
isAncestor(INode parent, INode child)
boolean
isCrossLinkFragment(org.eclipse.emf.ecore.resource.Resource res, java.lang.String s)
boolean
isUseIndexFragment(org.eclipse.emf.ecore.resource.Resource context)
org.eclipse.emf.ecore.EObject
resolveShortFragment(org.eclipse.emf.ecore.resource.Resource res, java.lang.String shortFragment)
java.lang.String
toShortExternalForm(org.eclipse.emf.ecore.EClass clazz, org.eclipse.emf.ecore.EReference ref)
-
-
-
Field Detail
-
XTEXT_LINK
public static final java.lang.String XTEXT_LINK
- Since:
- 2.3
deprecated use
isCrossLinkFragment(Resource, String)
instead - See Also:
- Constant Field Values
- Noreference:
- This field is not intended to be referenced by clients.
-
SEP
public static final java.lang.String SEP
- Since:
- 2.3
- See Also:
- Constant Field Values
-
USE_INDEXED_FRAGMENTS_BINDING
public static final java.lang.String USE_INDEXED_FRAGMENTS_BINDING
- Since:
- 2.7
- See Also:
- Constant Field Values
-
-
Method Detail
-
isUseIndexFragment
public boolean isUseIndexFragment(org.eclipse.emf.ecore.resource.Resource context)
- Since:
- 2.7
-
encode
public java.lang.String encode(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EReference ref, INode node)
encodes the given three parameters into a string, so that they can be retrieved from a resource usingdecode(Resource, String)
- Parameters:
obj
- the feature holderref
- the cross referencenode
- the node that provided the value for the reference- Returns:
- a portable string that may be used as a
fragment
-
getIndexFragment
protected java.lang.String getIndexFragment(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EReference ref, INode node)
- Since:
- 2.7
-
appendShortFragment
public void appendShortFragment(org.eclipse.emf.ecore.EObject obj, java.lang.StringBuilder target)
-
toShortExternalForm
public java.lang.String toShortExternalForm(org.eclipse.emf.ecore.EClass clazz, org.eclipse.emf.ecore.EReference ref)
-
decode
public org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> decode(org.eclipse.emf.ecore.resource.Resource res, java.lang.String uriFragment)
decodes the uriFragment- Parameters:
res
- the resource that contains the feature holderuriFragment
- the fragment that should be decoded- Returns:
- the decoded information
- See Also:
encode(EObject, EReference, INode)
-
getLazyProxyInformation
protected org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> getLazyProxyInformation(org.eclipse.emf.ecore.resource.Resource res, java.lang.String uriFragment)
- Since:
- 2.7
-
getIndex
public int getIndex(java.lang.String uriFragment)
- Since:
- 2.7
-
resolveShortFragment
public org.eclipse.emf.ecore.EObject resolveShortFragment(org.eclipse.emf.ecore.resource.Resource res, java.lang.String shortFragment)
-
fromShortExternalForm
public org.eclipse.emf.ecore.EReference fromShortExternalForm(org.eclipse.emf.ecore.EClass clazz, java.lang.String shortForm)
-
getRelativePath
public void getRelativePath(java.lang.StringBuilder result, INode parserNode, INode node)
ONLY public to be testable- Noreference:
- This method is not intended to be referenced by clients.
-
getNode
public INode getNode(org.eclipse.emf.ecore.EObject object, java.lang.String fragment)
- Since:
- 2.4
-
isCrossLinkFragment
public boolean isCrossLinkFragment(org.eclipse.emf.ecore.resource.Resource res, java.lang.String s)
-
-