org.eclipse.xtext.documentation.impl
Class MultiLineCommentDocumentationProvider

java.lang.Object
  extended by org.eclipse.xtext.documentation.impl.MultiLineCommentDocumentationProvider
All Implemented Interfaces:
IEObjectDocumentationProvider, IEObjectDocumentationProviderExtension

public class MultiLineCommentDocumentationProvider
extends java.lang.Object
implements IEObjectDocumentationProvider, IEObjectDocumentationProviderExtension

Author:
Christoph Kulla - Initial contribution and API

Field Summary
static java.lang.String END_TAG
           
protected  java.lang.String endTag
           
static java.lang.String LINE_POSTFIX
           
static java.lang.String LINE_PREFIX
           
protected  java.lang.String linePostfix
           
protected  java.lang.String linePrefix
           
static java.lang.String RULE
           
protected  java.lang.String ruleName
           
static java.lang.String START_TAG
           
protected  java.lang.String startTag
           
protected  java.lang.String whitespace
           
static java.lang.String WHITESPACE
           
 
Constructor Summary
MultiLineCommentDocumentationProvider()
           
 
Method Summary
protected  java.lang.String findComment(org.eclipse.emf.ecore.EObject o)
           
 java.lang.String getDocumentation(org.eclipse.emf.ecore.EObject o)
          returns the documentation or null if no documentation is attached to the given EObject.
 java.util.List<INode> getDocumentationNodes(org.eclipse.emf.ecore.EObject object)
          Returns the nearest multi line comment node that precedes the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RULE

public static final java.lang.String RULE
See Also:
Constant Field Values

START_TAG

public static final java.lang.String START_TAG
See Also:
Constant Field Values

END_TAG

public static final java.lang.String END_TAG
See Also:
Constant Field Values

LINE_PREFIX

public static final java.lang.String LINE_PREFIX
See Also:
Constant Field Values

LINE_POSTFIX

public static final java.lang.String LINE_POSTFIX
See Also:
Constant Field Values

WHITESPACE

public static final java.lang.String WHITESPACE
See Also:
Constant Field Values

ruleName

@Inject(optional=true)
protected java.lang.String ruleName
Since:
2.3

startTag

@Inject(optional=true)
protected java.lang.String startTag
Since:
2.3

endTag

@Inject(optional=true)
protected java.lang.String endTag
Since:
2.3

linePrefix

@Inject(optional=true)
protected java.lang.String linePrefix
Since:
2.3

linePostfix

@Inject(optional=true)
protected java.lang.String linePostfix
Since:
2.3

whitespace

@Inject(optional=true)
protected java.lang.String whitespace
Since:
2.3
Constructor Detail

MultiLineCommentDocumentationProvider

public MultiLineCommentDocumentationProvider()
Method Detail

findComment

protected java.lang.String findComment(org.eclipse.emf.ecore.EObject o)

getDocumentationNodes

@NonNull
public java.util.List<INode> getDocumentationNodes(@NonNull
                                                           org.eclipse.emf.ecore.EObject object)
Returns the nearest multi line comment node that precedes the given object.

Specified by:
getDocumentationNodes in interface IEObjectDocumentationProviderExtension
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: IEObjectDocumentationProvider
returns the documentation or null if no documentation is attached to the given EObject.

Specified by:
getDocumentation in interface IEObjectDocumentationProvider