Interface IEObjectDocumentationProviderExtension

  • All Known Implementing Classes:
    MultiLineCommentDocumentationProvider

    public interface IEObjectDocumentationProviderExtension

    Allows to access the nodes that contain the documentation of an EObject and are considered by the IEObjectDocumentationProvider.

    The custom documentation provider may use a list of syntax elements to compute the actual documentation string, e.g. C# style documentation like this

     /// First line
     /// second line
     
    would return the documentation string
     First line
     second line
     
    even though both lines are single line nodes.

    The method getDocumentationNodes(EObject) allows to retrieve all nodes that contributed text to this documentation string. The primary use case is to be able to trace from the concrete source syntax to a possibly generated target file.

    The default implementation MultiLineCommentDocumentationProvider uses only a single node, the closest multi line comment for a given EObject.

    Since:
    2.3
    • Method Detail

      • getDocumentationNodes

        java.util.List<INode> getDocumentationNodes​(org.eclipse.emf.ecore.EObject object)
        Returns the list of all nodes that were used to compute the documentation for the given object.
        Returns:
        a list of nodes or an empty list if the documentation was synthesized or derived from an external location.