Class DefaultCommentAssociater
- java.lang.Object
-
- org.eclipse.xtext.parsetree.reconstr.impl.AbstractCommentAssociater
-
- org.eclipse.xtext.parsetree.reconstr.impl.DefaultCommentAssociater
-
- All Implemented Interfaces:
ICommentAssociater
public class DefaultCommentAssociater extends AbstractCommentAssociater
-
-
Constructor Summary
Constructors Constructor Description DefaultCommentAssociater()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddMapping(java.util.Map<ILeafNode,org.eclipse.emf.ecore.EObject> mapping, java.util.List<ILeafNode> currentComments, org.eclipse.emf.ecore.EObject currentEObject)protected voidassociateCommentsWithSemanticEObjects(java.util.Map<ILeafNode,org.eclipse.emf.ecore.EObject> mapping, ICompositeNode rootNode)This implementation associates each comment with the next following semantic token's EObject, except for the case, where a line of the document ends by a semantic element followed by a comment.java.util.Map<ILeafNode,org.eclipse.emf.ecore.EObject>associateCommentsWithSemanticEObjects(org.eclipse.emf.ecore.EObject model, java.util.Set<ICompositeNode> roots)protected org.eclipse.emf.ecore.EObjectgetEObjectForRemainingComments(ICompositeNode rootNode)
-
-
-
Field Detail
-
tokenUtil
@Inject protected TokenUtil tokenUtil
-
-
Method Detail
-
associateCommentsWithSemanticEObjects
public java.util.Map<ILeafNode,org.eclipse.emf.ecore.EObject> associateCommentsWithSemanticEObjects(org.eclipse.emf.ecore.EObject model, java.util.Set<ICompositeNode> roots)
-
associateCommentsWithSemanticEObjects
protected void associateCommentsWithSemanticEObjects(java.util.Map<ILeafNode,org.eclipse.emf.ecore.EObject> mapping, ICompositeNode rootNode)
This implementation associates each comment with the next following semantic token's EObject, except for the case, where a line of the document ends by a semantic element followed by a comment. Then, the comment is associated with this preceding semantic token.
-
addMapping
protected void addMapping(java.util.Map<ILeafNode,org.eclipse.emf.ecore.EObject> mapping, java.util.List<ILeafNode> currentComments, org.eclipse.emf.ecore.EObject currentEObject)
-
getEObjectForRemainingComments
protected org.eclipse.emf.ecore.EObject getEObjectForRemainingComments(ICompositeNode rootNode)
-
-