From 2f38016b983b57bf1609a531cb23493a7ffe67ab Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Wed, 27 Nov 2013 12:17:45 -0800 Subject: [PATCH] Cosmetics. --- .../tests/rewrite/comenthandler/NodeCommentMapTest.java | 4 ++-- .../parser/org/eclipse/cdt/core/dom/ast/IASTComment.java | 2 +- .../org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java | 2 +- .../eclipse/cdt/internal/core/parser/scanner/LocationMap.java | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java index e6d7f3e2aa7..0592f99ff67 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java @@ -124,8 +124,8 @@ public class NodeCommentMapTest extends TestCase { assertEquals(com3, map.getFreestandingCommentsForNode(node1).get(1)); } - //=== InternalComment class for testing - private class Comment extends ASTNode implements IASTComment { + //=== Internal Comment class for testing + private static class Comment extends ASTNode implements IASTComment { private char[] comment; @Override diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTComment.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTComment.java index 48f1047adbf..edd4e20257b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTComment.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTComment.java @@ -7,7 +7,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Emanuel Graf & Leo Buettiker - initial API and implementation + * Emanuel Graf & Leo Buettiker - initial API and implementation ******************************************************************************/ package org.eclipse.cdt.core.dom.ast; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java index 61a70afb099..753f50b3eb1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java @@ -19,7 +19,7 @@ import org.eclipse.cdt.core.dom.ast.INodeFactory; public abstract class NodeFactory implements INodeFactory { @Override public final void setOffsets(IASTNode node, int offset, int endOffset) { - ((ASTNode) node).setOffsetAndLength(offset, endOffset-offset); + ((ASTNode) node).setOffsetAndLength(offset, endOffset - offset); } @Override diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationMap.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationMap.java index a200f7d278e..9c18de4d38e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationMap.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationMap.java @@ -274,10 +274,10 @@ public class LocationMap implements ILocationResolver { CharSequence text = getTrimmedCommentText(input.subSequence(offset, endOffset), isBlockComment); IncludeExportPatterns patterns = fLexerOptions.fIncludeExportPatterns; if (patterns.getIncludeExportPattern() != null - && patterns.getIncludeExportPattern().matcher(text).matches()) { + && patterns.getIncludeExportPattern().matcher(text).matches()) { ((LocationCtxFile) fCurrentContext).setOffsetOfIncludeExport(offset); } else if (patterns.getIncludeBeginExportsPattern() != null - && patterns.getIncludeBeginExportsPattern().matcher(text).matches()) { + && patterns.getIncludeBeginExportsPattern().matcher(text).matches()) { ((LocationCtxFile) fCurrentContext).setInsideIncludeExportBlock(true); } else if (patterns.getIncludeEndExportsPattern() != null && patterns.getIncludeEndExportsPattern().matcher(text).matches()) {