Interface SReferenceLink
- 
- All Superinterfaces:
- SAbstractLink,- SConceptFeature,- SNamedElement
 
 public interface SReferenceLink extends SAbstractLink Reference links describe relations that do not follow the parent-child relationships pattern. Target nodes can physically lie anywhere in the AST (even in a different model).
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description SNodegetDeclarationNode()Deprecated.StringgetRoleName()Deprecated.SScopegetScope(SNode referenceNode)Builds and returns a scope for this reference in the given context.SScopegetScope(SNode contextNode, SContainmentLink link, int index)This method allows to build a scope for the reference before its node has been registered in the repository.booleanisMultiple()Deprecated.- 
Methods inherited from interface org.jetbrains.mps.openapi.language.SAbstractLinkgetRole, getTargetConcept, isOptional, isReference
 - 
Methods inherited from interface org.jetbrains.mps.openapi.language.SConceptFeaturegetOwner, isValid
 - 
Methods inherited from interface org.jetbrains.mps.openapi.language.SNamedElementgetName
 
- 
 
- 
- 
- 
Method Detail- 
getRoleName@Deprecated String getRoleName() Deprecated.Returns a name of this reference Though in 3.2 the name is still used as id in some cases, it should be treated only as a user-friendly text representation.
 - 
isMultiple@Deprecated boolean isMultiple() Deprecated.Instance nodes can contain more than one target element.- Specified by:
- isMultiplein interface- SAbstractLink
 
 - 
getDeclarationNode@Nullable @Deprecated SNode getDeclarationNode() Deprecated.
 - 
getScopeSScope getScope(SNode referenceNode) Builds and returns a scope for this reference in the given context.- Parameters:
- referenceNode- node containing the reference, registered in the repository
 
 - 
getScopeSScope getScope(SNode contextNode, @Nullable SContainmentLink link, int index) This method allows to build a scope for the reference before its node has been registered in the repository. In this case you must provide the nearest available ancestor node as a context node and the location within it where the reference will be placed. Example: while typing a new statement in the middle of a statement list, the context menu builds a scope before the statement has been created, in order to offer, among other things, all local variables defined up to this point in code. This is achieved by passing the statement list as a context node, "statement" link as the second parameter and the index of the statement within the statement list as the last parameter.- Parameters:
- contextNode- the nearest ancestor of the node containing the reference
- link- containment link in the contextNode
- index- position within the link
 
 
- 
 
-