Class MultiLineCommentDocumentationProvider
- java.lang.Object
-
- org.eclipse.xtext.documentation.impl.AbstractMultiLineCommentProvider
-
- org.eclipse.xtext.documentation.impl.MultiLineCommentDocumentationProvider
-
- All Implemented Interfaces:
IEObjectDocumentationProvider,IEObjectDocumentationProviderExtension
public class MultiLineCommentDocumentationProvider extends AbstractMultiLineCommentProvider implements IEObjectDocumentationProvider, IEObjectDocumentationProviderExtension
The default implementation of the documentation provider foremf objectsbased on Xtext languages. It uses a single ML_COMMENT token by default to return the contained text as the documentation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtext.documentation.impl.AbstractMultiLineCommentProvider
AbstractMultiLineCommentProvider.MultiLineCommentProviderProperties
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.regex.PatterncommentStartTagRegex-
Fields inherited from class org.eclipse.xtext.documentation.impl.AbstractMultiLineCommentProvider
END_TAG, endTag, endTagRegex, LINE_POSTFIX, LINE_PREFIX, linePostfix, linePostfixRegex, linePrefix, linePrefixRegex, RULE, ruleName, START_TAG, startTag, startTagRegex, tagsAndPrefixRegex, whitespace, WHITESPACE, WS_RULE, wsRuleName
-
-
Constructor Summary
Constructors Constructor Description MultiLineCommentDocumentationProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringfindComment(org.eclipse.emf.ecore.EObject o)java.lang.StringgetDocumentation(org.eclipse.emf.ecore.EObject o)returns the documentation ornullif no documentation is attached to the givenEObject.java.util.List<INode>getDocumentationNodes(org.eclipse.emf.ecore.EObject object)Returns the nearest multi line comment node that precedes the given object.voidinjectProperties(AbstractMultiLineCommentProvider.MultiLineCommentProviderProperties properties)-
Methods inherited from class org.eclipse.xtext.documentation.impl.AbstractMultiLineCommentProvider
getTextFromMultilineComment
-
-
-
-
Method Detail
-
findComment
protected java.lang.String findComment(org.eclipse.emf.ecore.EObject o)
-
getDocumentationNodes
public java.util.List<INode> getDocumentationNodes(org.eclipse.emf.ecore.EObject object)
Returns the nearest multi line comment node that precedes the given object.- Specified by:
getDocumentationNodesin interfaceIEObjectDocumentationProviderExtension- Returns:
- a list with exactly one node or an empty list if the object is undocumented.
- Since:
- 2.3
-
getDocumentation
public java.lang.String getDocumentation(org.eclipse.emf.ecore.EObject o)
Description copied from interface:IEObjectDocumentationProviderreturns the documentation ornullif no documentation is attached to the givenEObject.- Specified by:
getDocumentationin interfaceIEObjectDocumentationProvider
-
injectProperties
@Inject public void injectProperties(AbstractMultiLineCommentProvider.MultiLineCommentProviderProperties properties)
- Overrides:
injectPropertiesin classAbstractMultiLineCommentProvider- Since:
- 2.5
-
-