ReSharper Platform SDK
 
Because ReSharper Platform SDK undefined is still in development, this documentation may not be entirely accurate and is subject to change.

Composite Node Types

Last modified: 04 July 2023

The interior nodes of the tree have a node type that typically derives from CompositeNodeType. ReSharper doesn't have any strict requirements for the node type of an interior tree node, unless the custom language implements tree node caching, in which case, the node type must implement the ICompositeNodeType interface:

As with TokenNodeType.Create, ICompositeNodeType.Create returns an implementation of ITreeNode that uses ReSharper's own base classes. The Create method is only used by the parser (via the TreeElementFactory.CreateCompositeElement static method) to create an ITreeNode from a known node type.

If a custom language is using ReSharper's base ITreeNode classes, it should also use CompositeNodeType as the base class for all interior tree node types. This base class has no additional functionality over NodeType, and simply provides an abstract method to create the CompositeElement base tree node instance.