public void printNewLine(int insertPosition) { if (this.nlsTagCounter > 0) { return; } if (this.lastNumberOfNewLines >= 1) { // ensure that the scribe is at the beginning of a new line // only if no specific indentation has been previously set if (!this.preserveLineBreakIndentation) { this.column = 1; } this.preserveLineBreakIndentation = false; return; } addInsertEdit(insertPosition, this.lineSeparator); this.line++; this.lastNumberOfNewLines = 1; this.column = 1; this.needSpace = false; this.pendingSpace = false; this.preserveLineBreakIndentation = false; this.lastLineComment.contiguous = false; }
public void printNewLine(int insertPosition) { if (this.nlsTagCounter > 0) { return; } if (this.lastNumberOfNewLines >= 1) { // ensure that the scribe is at the beginning of a new line // only if no specific indentation has been previously set if (!this.preserveLineBreakIndentation) { this.column = 1; } this.preserveLineBreakIndentation = false; return; } addInsertEdit(insertPosition, this.lineSeparator); this.line++; this.lastNumberOfNewLines = 1; this.column = 1; this.needSpace = false; this.pendingSpace = false; this.preserveLineBreakIndentation = false; this.lastLineComment.contiguous = false; }
public void printNewLine(int insertPosition) { if (this.nlsTagCounter > 0) { return; } if (this.lastNumberOfNewLines >= 1) { // ensure that the scribe is at the beginning of a new line // only if no specific indentation has been previously set if (!this.preserveLineBreakIndentation) { this.column = 1; } this.preserveLineBreakIndentation = false; return; } addInsertEdit(insertPosition, this.lineSeparator); this.line++; this.lastNumberOfNewLines = 1; this.column = 1; this.needSpace = false; this.pendingSpace = false; this.preserveLineBreakIndentation = false; this.lastLineComment.contiguous = false; }
private void printEmptyLines(int linesNumber, int insertPosition) { final String buffer = getEmptyLines(linesNumber); if (Util.EMPTY_STRING == buffer) return; addInsertEdit(insertPosition, buffer); }
private void printEmptyLines(int linesNumber, int insertPosition) { final String buffer = getEmptyLines(linesNumber); if (Util.EMPTY_STRING == buffer) return; addInsertEdit(insertPosition, buffer); }
private void printEmptyLines(int linesNumber, int insertPosition) { final String buffer = getEmptyLines(linesNumber); if (Util.EMPTY_STRING == buffer) return; addInsertEdit(insertPosition, buffer); }
void printIndentationIfNecessary() { this.tempBuffer.setLength(0); printIndentationIfNecessary(this.tempBuffer); if (this.tempBuffer.length() > 0) { addInsertEdit(this.scanner.getCurrentTokenStartPosition(), this.tempBuffer.toString()); this.pendingSpace = false; } }
void printIndentationIfNecessary() { this.tempBuffer.setLength(0); printIndentationIfNecessary(this.tempBuffer); if (this.tempBuffer.length() > 0) { addInsertEdit(this.scanner.getCurrentTokenStartPosition(), this.tempBuffer.toString()); this.pendingSpace = false; } }
void printIndentationIfNecessary() { this.tempBuffer.setLength(0); printIndentationIfNecessary(this.tempBuffer); if (this.tempBuffer.length() > 0) { addInsertEdit(this.scanner.getCurrentTokenStartPosition(), this.tempBuffer.toString()); this.pendingSpace = false; } }
private void print(int length, boolean considerSpaceIfAny) { if (this.checkLineWrapping && length + this.column > this.pageWidth) { handleLineTooLong(); } this.lastNumberOfNewLines = 0; if (this.indentationLevel != 0) { printIndentationIfNecessary(); } if (considerSpaceIfAny) { space(); } if (this.pendingSpace) { addInsertEdit(this.scanner.getCurrentTokenStartPosition(), " "); //$NON-NLS-1$ } this.pendingSpace = false; this.column += length; this.needSpace = true; }
private void print(int length, boolean considerSpaceIfAny) { if (this.checkLineWrapping && length + this.column > this.pageWidth) { handleLineTooLong(); } this.lastNumberOfNewLines = 0; if (this.indentationLevel != 0) { printIndentationIfNecessary(); } if (considerSpaceIfAny) { space(); } if (this.pendingSpace) { addInsertEdit(this.scanner.getCurrentTokenStartPosition(), " "); //$NON-NLS-1$ } this.pendingSpace = false; this.needSpace = false; this.column += length; this.needSpace = true; }
private void print(int length, boolean considerSpaceIfAny) { if (this.checkLineWrapping && length + this.column > this.pageWidth) { handleLineTooLong(); } this.lastNumberOfNewLines = 0; if (this.indentationLevel != 0) { printIndentationIfNecessary(); } if (considerSpaceIfAny) { space(); } if (this.pendingSpace) { addInsertEdit(this.scanner.getCurrentTokenStartPosition(), " "); //$NON-NLS-1$ } this.pendingSpace = false; this.column += length; this.needSpace = true; }
printJavadocNewLine(this.tempBuffer); addInsertEdit(nodeStart, this.tempBuffer.toString()); addInsertEdit(node.sourceStart, this.commentIndentation); this.column += this.commentIndentation.length(); addInsertEdit(node.sourceStart, this.commentIndentation); this.column += this.commentIndentation.length();
printJavadocNewLine(this.tempBuffer); addInsertEdit(nodeStart, this.tempBuffer.toString()); addInsertEdit(node.sourceStart, this.commentIndentation); this.column += this.commentIndentation.length(); addInsertEdit(node.sourceStart, this.commentIndentation); this.column += this.commentIndentation.length();
addInsertEdit(currentTokenStartPosition, new String(this.lastLineComment.leadingSpaces)); } else { addInsertEdit(currentTokenStartPosition, " "); //$NON-NLS-1$
addInsertEdit(currentTokenStartPosition, new String(this.lastLineComment.leadingSpaces)); } else { addInsertEdit(currentTokenStartPosition, " "); //$NON-NLS-1$
addInsertEdit(this.scanner.startPosition, " "); //$NON-NLS-1$ this.column++;
addInsertEdit(start, " "); //$NON-NLS-1$
addInsertEdit(start, " "); //$NON-NLS-1$
addInsertEdit(start, " "); //$NON-NLS-1$