- Derived from
- Extended by
Abstract base class for Code-X PSI nodes.
Code-X PSI nodes (except CxLibrary, CxNamespace and CxMethodGroup) produce parsable source code, either via object.ToString or by using the ICodeOutput interface. Since Code-X is a subset of standard C#, the source code may also be used with C# development tools.
Often, a PSI node references another PSI node (for example, a type name that references a type declaration). These references must be resolved by using IPsiNode.Resolve. To check for unresolved references (and other problems), the IValidatable interface may be used.
PSI nodes are quasi immutable: once created, modifications may only be performed in specific ways, which are exposed as methods and/or properties in the API. A modification usually influences how references resolve to their target nodes. The respective modification method / property takes care of this, for example by clearing references where necessary.
Parent/child relations between PSI nodes are implemented with strong parent-to-child references and weak child-to-parent references. Therefore, the using code must retain a reference to the root PSI node, to make sure that all weak references remain valid.
Attaches this node to the given parent in.
This node must not have a parent. Use this method to allow orphan nodes to resolve their reference using an existing PSI model.
true, this method calls IPsiNode.Resolve on
Checks if this PSI node can have a parent.
If the behaviour of a PSI node is independent of the parent node that contains it, this property returns
false. In this case, the same PSI node object may be used as a child in multiple parent PSI node objects.
The default implementation returns
Returns the CxCodeUnit that contains this PSI node.
Returns the CxDeclaration that contains this PSI node.
Returns the CxLibrary that contains this PSI node.
Returns the CxMember that contains this PSI node.
Returns the CxNamespace that contains this PSI node.
Returns the CxStatement that contains this PSI node.
Returns the parent CxNode object.
After creating a CxNode object, its parent will always be
null. When a CxNode object is aggregated by creating a parent CxNode object, its parent reference will be set accordingly. If a child object has already been attached to another parent, an independent copy will be created with ICopyable.Copy and that copy will then be aggregated. This way, the principle of immutability for PSI nodes is retained.
- See also
Context value name for the boolean flag that depicts whether to output only the inner content of a CxXmlDocParagraph, omitting the enclosing <para/> tag.
- See also