search scope - defines the set of nodes to which this link can point. The method can return either a sequence<node<>> or ISearchScope interface implementation can be returned from this method.
the model that contains the node with the link. This is just included for convenience - it can be taken from either referenceNode or enclosingNode, since both referenceNode and enclosingNode keep the model too.
IScope interface that shows models, languages and devkits you can see from the code.
the node that contains the actual link, . It can be null when a new node is being created for a concept with smart reference. In this situation smart reference is used to determine what type of node to create in the context of enclosingNode, so the search scope method is called with a null referenceNode.
parent of the node that contains the actual link, null for root nodes. Both referenceNode and enclosingNode cannot be null at the same time.
the concept that this link can refer to. Usually it is a concept of the reference, so it is known statically. If we specialize reference in subconcept and do not define search scope for specialized reference, then linkTarget parameter can be used to determine what reference specialization is required.
validator (since 1.5) - Each reference is checked against it's search scope and if reference goes , after changes in the model, a reference ends up pointing out of the search scope after changes in model the , MPS marks such a reference with the an error message. Sometimes it is not efficient to build the whole search scope just to check if the reference is in scope. The search scope can be big or it may be much easier to check if the given node is in scope than to calculate what nodes are in scope. You can create quick reference check procedure here to speed up reference validation in such situations.
presentation - here you specify how the reference will look like in the editor and in the completion list. Sometimes it is convenient to show reference differently depending on context. For example, in Java language reference all references to the an instance field f should be shown as this.f, if it the field is being shadowed by the local variable declaration with the same name. If By default, if no presentation is not set, then the name of the reference node will be used as its presentation (if provided it is an INamedConcept).
the context of reference usage, the same meaning as in the search scope function.
the node to be presented (referenceNode has a reference to parameterNode of type linkTarget)
true - presentation of existing node, false - for new node (to be created after selection in completion menu)
true - node is presented in the smart reference
true - presentation for editor, false - for completion menu