Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-11-15 17:27:31 -0500
committerSergey Prigogin2011-11-15 17:27:31 -0500
commit0be21a0f1c6dfac770052de833dbd6c87b539aa2 (patch)
tree65bd1f5dfcea879edb6c82644bbd606290fbdb7a /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite
parentad4b9869f008ed3ff2ce28b094ae1a51af16c665 (diff)
downloadorg.eclipse.cdt-0be21a0f1c6dfac770052de833dbd6c87b539aa2.tar.gz
org.eclipse.cdt-0be21a0f1c6dfac770052de833dbd6c87b539aa2.tar.xz
org.eclipse.cdt-0be21a0f1c6dfac770052de833dbd6c87b539aa2.zip
Cosmetics.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/OffsetHelper.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/OffsetHelper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/OffsetHelper.java
index ba7a270190..fca0030ba5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/OffsetHelper.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/OffsetHelper.java
@@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Institute for Software - initial API and implementation
+ * Institute for Software - initial API and implementation
******************************************************************************/
package org.eclipse.cdt.internal.core.dom.rewrite.util;
@@ -19,7 +19,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
/**
* @author Emanuel Graf IFS
- *
*/
public class OffsetHelper {
@@ -32,10 +31,11 @@ public class OffsetHelper {
if (location instanceof IASTMacroExpansionLocation) {
IASTMacroExpansionLocation macroLoc = (IASTMacroExpansionLocation) location;
offset = macroLoc.asFileLocation().getNodeOffset();
- }else {
+ } else {
offset = location.asFileLocation().getNodeOffset();
}
- if(offset < nodeStart) nodeStart = offset;
+ if (offset < nodeStart)
+ nodeStart = offset;
}
} else {
nodeStart = node.getFileLocation().getNodeOffset();
@@ -55,14 +55,13 @@ public class OffsetHelper {
IASTMacroExpansionLocation macroLoc = (IASTMacroExpansionLocation) location;
fileOffset = macroLoc.asFileLocation().getNodeOffset();
length = macroLoc.asFileLocation().getNodeLength();
- }else {
+ } else {
fileOffset = location.asFileLocation().getNodeOffset();
length = location.asFileLocation().getNodeLength();
}
}
} else {
IASTFileLocation loc = node.getFileLocation();
-
fileOffset = loc.getNodeOffset();
length = loc.getNodeLength();
}
@@ -75,7 +74,7 @@ public class OffsetHelper {
}
public static int getLengthIncludingComment(IASTNode node) {
- return OffsetHelper.getEndOffsetIncludingComments(node) - OffsetHelper.getOffsetIncludingComment(node);
+ return getEndOffsetIncludingComments(node) - getOffsetIncludingComment(node);
}
public static int getNodeOffset(ASTNode node) {
@@ -92,6 +91,5 @@ public class OffsetHelper {
public static int getEndingLineNumber(IASTNode node) {
return node.getFileLocation().getEndingLineNumber();
- }
-
+ }
}

Back to the top