1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-20 23:45:23 +02:00

fixing some comments

Change-Id: I020815ce6099d743067974a97b8b63539e408f15
This commit is contained in:
Alena Laskavaia 2016-01-07 20:15:32 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent d3e933501e
commit aa4f014a3a
2 changed files with 24 additions and 40 deletions

View file

@ -30,35 +30,16 @@ public class CodanCommentMap implements ICodanCommentMap {
this.commentedNodeMap = commentedNodeMap; this.commentedNodeMap = commentedNodeMap;
} }
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.codan.core.cxx.model.ICodanCommentMap#
* getTrailingCommentsForNode(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
@Override @Override
public List<IASTComment> getTrailingCommentsForNode(IASTNode node) { public List<IASTComment> getTrailingCommentsForNode(IASTNode node) {
return commentedNodeMap.getTrailingCommentsForNode(node); return commentedNodeMap.getTrailingCommentsForNode(node);
} }
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.codan.core.cxx.model.ICodanCommentMap#
* getLeadingCommentsForNode(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
@Override @Override
public List<IASTComment> getLeadingCommentsForNode(IASTNode node) { public List<IASTComment> getLeadingCommentsForNode(IASTNode node) {
return commentedNodeMap.getLeadingCommentsForNode(node); return commentedNodeMap.getLeadingCommentsForNode(node);
} }
/*
* (non-Javadoc)
*
* @see
* org.eclipse.cdt.codan.core.cxx.model.ICodanCommentMap#getFreestandingForNode
* (org.eclipse.cdt.core.dom.ast.IASTStatement)
*/
@Override @Override
public List<IASTComment> getFreestandingForNode(IASTNode node) { public List<IASTComment> getFreestandingForNode(IASTNode node) {
return commentedNodeMap.getFreestandingCommentsForNode(node); return commentedNodeMap.getFreestandingCommentsForNode(node);

View file

@ -20,11 +20,8 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
*/ */
public interface ICodanCommentMap { public interface ICodanCommentMap {
/** /**
* Returns an Collection of comments for the given node (after the node). * Returns a List of comments for the given node (following the node).
* This list contains all the comments * If no comments are available an empty list is returned.
* which are assigned to this specific node. If no comments are available an
* empty
* collection is returned.
* *
* @param node The key to fetch the associated comments. * @param node The key to fetch the associated comments.
* @return list of comments * @return list of comments
@ -32,42 +29,48 @@ public interface ICodanCommentMap {
public List<IASTComment> getTrailingCommentsForNode(IASTNode node); public List<IASTComment> getTrailingCommentsForNode(IASTNode node);
/** /**
* Returns an Collection of comments for the given node (before the node). * Returns a List of all comments for the given node (preceding the node).
* This list contains all the comments * If no comments are available an empty list is returned.
* which are assigned to this specific node. If no comments are available an
* empty
* collection is returned.
* *
* @param node The key to fetch the associated comments. * @param node The key to fetch the associated comments.
* @return list of comments * @return list of comments
*/ */
public List<IASTComment> getLeadingCommentsForNode(IASTNode node); public List<IASTComment> getLeadingCommentsForNode(IASTNode node);
/** /**
* Returns an ArrayList for the given node. This ArrayList contains all the comments * Returns a List of comments associated with the given node.
* which are assigned to this specific node. If no comments are available an empty * If no comments are available an empty list is returned.
* ArrayList is returned. *
*
* @param node The key to fetch the associated comments. * @param node The key to fetch the associated comments.
* @return ArrayList * @return list of comments
*/ */
public List<IASTComment> getFreestandingForNode(IASTNode node); public List<IASTComment> getFreestandingForNode(IASTNode node);
/** /**
* @param node * Gets last comment from {@link #getLeadingCommentsForNode(IASTNode)}, or
* @return * null if list is empty
*
* @param node - The key to fetch the associated comments.
* @return - A comment node or null if not found.
*/ */
public IASTComment getLastLeadingCommentForNode(IASTNode node); public IASTComment getLastLeadingCommentForNode(IASTNode node);
/** /**
* @param node * Gets first comment from {@link #getTrailingCommentsForNode(IASTNode)} or
* @return * null if list is empty.
*
* @param node - The key to fetch the associated comments.
* @return - A comment node or null if not found.
*/ */
public IASTComment getFirstTrailingCommentForNode(IASTNode node); public IASTComment getFirstTrailingCommentForNode(IASTNode node);
/** /**
* @param node * Gets last comment from {@link #getFreestandingForNode(IASTNode)} or
* @return * null if list is empty.
*
* @param node - The key to fetch the associated comments.
* @return - A comment node or null if not found.
*/ */
public IASTComment getLastFreestandingCommentForNode(IASTNode node); public IASTComment getLastFreestandingCommentForNode(IASTNode node);
} }