1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-16 13:35:22 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2013-03-15 15:31:13 -07:00
parent 56458da802
commit 7c31b952e3

View file

@ -464,8 +464,8 @@ public class Scribe {
printIndentationIfNecessary(buffer); printIndentationIfNecessary(buffer);
buffer.append(lineSeparator); buffer.append(lineSeparator);
} }
lastNumberOfNewLines+= linesNumber; lastNumberOfNewLines += linesNumber;
line+= linesNumber; line += linesNumber;
column= 1; column= 1;
needSpace= false; needSpace= false;
pendingSpace= false; pendingSpace= false;
@ -475,8 +475,8 @@ public class Scribe {
printIndentationIfNecessary(buffer); printIndentationIfNecessary(buffer);
buffer.append(lineSeparator); buffer.append(lineSeparator);
} }
lastNumberOfNewLines+= linesNumber; lastNumberOfNewLines += linesNumber;
line+= linesNumber; line += linesNumber;
column= 1; column= 1;
needSpace= false; needSpace= false;
pendingSpace= false; pendingSpace= false;
@ -491,8 +491,8 @@ public class Scribe {
printIndentationIfNecessary(buffer); printIndentationIfNecessary(buffer);
buffer.append(lineSeparator); buffer.append(lineSeparator);
} }
lastNumberOfNewLines+= realNewLineNumber; lastNumberOfNewLines += realNewLineNumber;
line+= realNewLineNumber; line += realNewLineNumber;
column= 1; column= 1;
needSpace= false; needSpace= false;
pendingSpace= false; pendingSpace= false;
@ -777,8 +777,7 @@ public class Scribe {
needSpace= false; needSpace= false;
} }
if (startOffset + length < currentPosition) { if (startOffset + length < currentPosition) {
// don't move backwards return; // Don't move backwards
return;
} }
boolean savedPreserveNL= preserveNewLines; boolean savedPreserveNL= preserveNewLines;
boolean savedSkipOverInactive= skipOverInactive; boolean savedSkipOverInactive= skipOverInactive;
@ -994,7 +993,7 @@ public class Scribe {
addReplaceEdit(start, previousStart - 1, String.valueOf(buffer)); addReplaceEdit(start, previousStart - 1, String.valueOf(buffer));
} else { } else {
column+= (nextCharacterStart - previousStart); column += (nextCharacterStart - previousStart);
} }
isNewLine= false; isNewLine= false;
} }
@ -1041,7 +1040,7 @@ public class Scribe {
column= 1; column= 1;
line++; line++;
} else { } else {
column+= (nextCharacterStart - previousStart); column += (nextCharacterStart - previousStart);
} }
isNewLine= false; isNewLine= false;
} }
@ -1513,7 +1512,7 @@ public class Scribe {
while (column <= indentationLevel - indentationLevel % tabLength) { while (column <= indentationLevel - indentationLevel % tabLength) {
buffer.append('\t'); buffer.append('\t');
int complement= tabLength - ((column - 1) % tabLength); // amount of space int complement= tabLength - ((column - 1) % tabLength); // amount of space
column+= complement; column += complement;
needSpace= false; needSpace= false;
} }
while (column <= indentationLevel) { while (column <= indentationLevel) {
@ -1540,7 +1539,7 @@ public class Scribe {
if (column <= columnForLeadingIndents) { if (column <= columnForLeadingIndents) {
if ((column - 1 + tabLength) <= indentationLevel) { if ((column - 1 + tabLength) <= indentationLevel) {
buffer.append('\t'); buffer.append('\t');
column+= tabLength; column += tabLength;
} else if ((column - 1 + indentationSize) <= indentationLevel) { } else if ((column - 1 + indentationSize) <= indentationLevel) {
// print one indentation // print one indentation
for (int i= 0, max= indentationSize; i < max; i++) { for (int i= 0, max= indentationSize; i < max; i++) {
@ -1563,7 +1562,7 @@ public class Scribe {
while (column <= indentationLevel) { while (column <= indentationLevel) {
if ((column - 1 + tabLength) <= indentationLevel) { if ((column - 1 + tabLength) <= indentationLevel) {
buffer.append('\t'); buffer.append('\t');
column+= tabLength; column += tabLength;
} else if ((column - 1 + indentationSize) <= indentationLevel) { } else if ((column - 1 + indentationSize) <= indentationLevel) {
// print one indentation // print one indentation
for (int i= 0, max= indentationSize; i < max; i++) { for (int i= 0, max= indentationSize; i < max; i++) {