Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-04-09 22:48:58 -0400
committerSergey Prigogin2011-04-09 22:48:58 -0400
commit16f230e2a4c54122b7641f80d973df938d79490a (patch)
treec77f2123dd58be04075aa0bab2310adfa5bab5c1 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler
parent3e9fb77a50ffa974efba9745de91b5368363c83d (diff)
downloadorg.eclipse.cdt-16f230e2a4c54122b7641f80d973df938d79490a.tar.gz
org.eclipse.cdt-16f230e2a4c54122b7641f80d973df938d79490a.tar.xz
org.eclipse.cdt-16f230e2a4c54122b7641f80d973df938d79490a.zip
Cosmetics.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenter.java22
1 files changed, 12 insertions, 10 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 e8e2c76f80..25620836f9 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
@@ -192,7 +192,7 @@ public class ASTCommenter {
private static ArrayList<IASTComment> getCommentsInWorkspace(IASTTranslationUnit tu) {
IASTComment[] comments = tu.getComments();
- ArrayList<IASTComment> commentsInWorksapce = new ArrayList<IASTComment>();
+ ArrayList<IASTComment> commentsInWorkspace = new ArrayList<IASTComment>();
if (comments == null || comments.length == 0) {
return null;
@@ -200,15 +200,16 @@ public class ASTCommenter {
for (IASTComment comment : comments) {
if (isInWorkspace(comment)) {
- commentsInWorksapce.add(comment);
+ commentsInWorkspace.add(comment);
}
}
- return commentsInWorksapce;
+ return commentsInWorkspace;
}
- private static ArrayList<IASTComment> removeAllPreprocessorComments(IASTTranslationUnit tu, ArrayList<IASTComment> comments) {
+ private static ArrayList<IASTComment> removeAllPreprocessorComments(IASTTranslationUnit tu,
+ ArrayList<IASTComment> comments) {
IASTPreprocessorStatement[] preprocessorStatements = tu.getAllPreprocessorStatements();
- TreeMap<Integer,String> treeOfPreProcessorLines = new TreeMap<Integer,String>();
+ TreeMap<Integer, String> treeOfPreProcessorLines = new TreeMap<Integer,String>();
TreeMap<String, ArrayList<Integer>> ppOffsetForFiles = new TreeMap<String, ArrayList<Integer>>();
for (IASTPreprocessorStatement statement : preprocessorStatements) {
@@ -229,11 +230,11 @@ public class ASTCommenter {
int comStartLineNumber = OffsetHelper.getStartingLineNumber(comment);
String fileName = comment.getFileLocation().getFileName();
if (treeOfPreProcessorLines.containsKey(comStartLineNumber)
- && treeOfPreProcessorLines.get(comStartLineNumber).equals(fileName
- )) {
- continue;
+ && treeOfPreProcessorLines.get(comStartLineNumber).equals(fileName)) {
+ continue;
}
- if (commentIsAtTheBeginningBeforePreprocessorStatements(comment, ppOffsetForFiles.get(fileName), tu)) {
+ if (commentIsAtTheBeginningBeforePreprocessorStatements(comment,
+ ppOffsetForFiles.get(fileName), tu)) {
continue;
}
commentsInCode.add(comment);
@@ -284,7 +285,8 @@ public class ASTCommenter {
return false;
}
- private static NodeCommentMap addCommentsToCommentMap(IASTTranslationUnit rootNode, ArrayList<IASTComment> comments){
+ private static NodeCommentMap addCommentsToCommentMap(IASTTranslationUnit rootNode,
+ ArrayList<IASTComment> comments){
NodeCommentMap commentMap = new NodeCommentMap();
CommentHandler commHandler = new CommentHandler(comments);

Back to the top