Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2013-03-15 22:31:13 +0000
committerSergey Prigogin2013-03-15 22:31:13 +0000
commit7c31b952e309ff5d93cfd3b2fa2348e24faf2983 (patch)
tree90ef66c8110075edd78cbf746e89af4a8df654fc /core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter
parent56458da8024b444c4c7f16b1ca68c867c59b3b5d (diff)
downloadorg.eclipse.cdt-7c31b952e309ff5d93cfd3b2fa2348e24faf2983.tar.gz
org.eclipse.cdt-7c31b952e309ff5d93cfd3b2fa2348e24faf2983.tar.xz
org.eclipse.cdt-7c31b952e309ff5d93cfd3b2fa2348e24faf2983.zip
Cosmetics.
Diffstat (limited to 'core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter')
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java25
1 files changed, 12 insertions, 13 deletions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java
index e073278a6ee..f8b38a00f31 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java
@@ -464,8 +464,8 @@ public class Scribe {
printIndentationIfNecessary(buffer);
buffer.append(lineSeparator);
}
- lastNumberOfNewLines+= linesNumber;
- line+= linesNumber;
+ lastNumberOfNewLines += linesNumber;
+ line += linesNumber;
column= 1;
needSpace= false;
pendingSpace= false;
@@ -475,8 +475,8 @@ public class Scribe {
printIndentationIfNecessary(buffer);
buffer.append(lineSeparator);
}
- lastNumberOfNewLines+= linesNumber;
- line+= linesNumber;
+ lastNumberOfNewLines += linesNumber;
+ line += linesNumber;
column= 1;
needSpace= false;
pendingSpace= false;
@@ -491,8 +491,8 @@ public class Scribe {
printIndentationIfNecessary(buffer);
buffer.append(lineSeparator);
}
- lastNumberOfNewLines+= realNewLineNumber;
- line+= realNewLineNumber;
+ lastNumberOfNewLines += realNewLineNumber;
+ line += realNewLineNumber;
column= 1;
needSpace= false;
pendingSpace= false;
@@ -777,8 +777,7 @@ public class Scribe {
needSpace= false;
}
if (startOffset + length < currentPosition) {
- // don't move backwards
- return;
+ return; // Don't move backwards
}
boolean savedPreserveNL= preserveNewLines;
boolean savedSkipOverInactive= skipOverInactive;
@@ -994,7 +993,7 @@ public class Scribe {
addReplaceEdit(start, previousStart - 1, String.valueOf(buffer));
} else {
- column+= (nextCharacterStart - previousStart);
+ column += (nextCharacterStart - previousStart);
}
isNewLine= false;
}
@@ -1041,7 +1040,7 @@ public class Scribe {
column= 1;
line++;
} else {
- column+= (nextCharacterStart - previousStart);
+ column += (nextCharacterStart - previousStart);
}
isNewLine= false;
}
@@ -1513,7 +1512,7 @@ public class Scribe {
while (column <= indentationLevel - indentationLevel % tabLength) {
buffer.append('\t');
int complement= tabLength - ((column - 1) % tabLength); // amount of space
- column+= complement;
+ column += complement;
needSpace= false;
}
while (column <= indentationLevel) {
@@ -1540,7 +1539,7 @@ public class Scribe {
if (column <= columnForLeadingIndents) {
if ((column - 1 + tabLength) <= indentationLevel) {
buffer.append('\t');
- column+= tabLength;
+ column += tabLength;
} else if ((column - 1 + indentationSize) <= indentationLevel) {
// print one indentation
for (int i= 0, max= indentationSize; i < max; i++) {
@@ -1563,7 +1562,7 @@ public class Scribe {
while (column <= indentationLevel) {
if ((column - 1 + tabLength) <= indentationLevel) {
buffer.append('\t');
- column+= tabLength;
+ column += tabLength;
} else if ((column - 1 + indentationSize) <= indentationLevel) {
// print one indentation
for (int i= 0, max= indentationSize; i < max; i++) {

Back to the top