summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxel2013-05-13 17:06:24 (EDT)
committer Sergey Prigogin2013-05-13 20:49:10 (EDT)
commit7d596aa92fdef913ab76ba3226dec767226d8e1a (patch)
treefb96b64770b277fc1e60003fc67423e1fafc1dae
parent385f1c6c9d68c80cb3266c5bc30eb985d240e25a (diff)
downloadorg.eclipse.cdt-7d596aa92fdef913ab76ba3226dec767226d8e1a.zip
org.eclipse.cdt-7d596aa92fdef913ab76ba3226dec767226d8e1a.tar.gz
org.eclipse.cdt-7d596aa92fdef913ab76ba3226dec767226d8e1a.tar.bz2
Change-Id: Iddc1da83ee3bf1f74549d165d08056ddeef93a97 Reviewed-on: https://git.eclipse.org/r/12766 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenter.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenter.java
index f78c870..b891e54 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenter.java
@@ -83,8 +83,12 @@ public class ASTCommenter {
}
private boolean isCommentOnSameLine(IASTNode node) {
- return commentNodeLocation.getStartingLineNumber() ==
- node.getFileLocation().getEndingLineNumber();
+ if (node.getFileLocation() == null) {
+ return false;
+ } else {
+ return commentNodeLocation.getStartingLineNumber() == node.getFileLocation()
+ .getEndingLineNumber();
+ }
}
@Override