public void exitMemberAlignment(Alignment alignment){ Alignment current = this.memberAlignment; while (current != null){ if (current == alignment) break; current = current.enclosing; } if (current == null) { throw new AbortFormatting("could not find matching alignment: "+alignment); //$NON-NLS-1$ } this.indentationLevel = current.location.outputIndentationLevel; this.numberOfIndentations = current.location.numberOfIndentations; this.formatter.lastLocalDeclarationSourceStart = alignment.location.lastLocalDeclarationSourceStart; this.memberAlignment = current.enclosing; }
public void exitMemberAlignment(Alignment alignment){ Alignment current = this.memberAlignment; while (current != null){ if (current == alignment) break; current = current.enclosing; } if (current == null) { throw new AbortFormatting("could not find matching alignment: "+alignment); //$NON-NLS-1$ } this.indentationLevel = current.location.outputIndentationLevel; this.numberOfIndentations = current.location.numberOfIndentations; this.formatter.lastLocalDeclarationSourceStart = alignment.location.lastLocalDeclarationSourceStart; this.memberAlignment = current.enclosing; }
public void exitMemberAlignment(Alignment alignment){ Alignment current = this.memberAlignment; while (current != null){ if (current == alignment) break; current = current.enclosing; } if (current == null) { throw new AbortFormatting("could not find matching alignment: "+alignment); //$NON-NLS-1$ } this.indentationLevel = current.location.outputIndentationLevel; this.numberOfIndentations = current.location.numberOfIndentations; this.formatter.lastLocalDeclarationSourceStart = alignment.location.lastLocalDeclarationSourceStart; this.memberAlignment = current.enclosing; }
public void exitAlignment(Alignment alignment, boolean discardAlignment){ Alignment current = this.currentAlignment; while (current != null){ if (current == alignment) break; current = current.enclosing; } if (current == null) { throw new AbortFormatting("could not find matching alignment: "+alignment); //$NON-NLS-1$ } this.indentationLevel = alignment.location.outputIndentationLevel; this.numberOfIndentations = alignment.location.numberOfIndentations; this.formatter.lastLocalDeclarationSourceStart = alignment.location.lastLocalDeclarationSourceStart; if (discardAlignment){ this.currentAlignment = alignment.enclosing; if (this.currentAlignment == null) { this.formatter.lastBinaryExpressionAlignmentBreakIndentation = 0; } } }
public void exitAlignment(Alignment alignment, boolean discardAlignment){ Alignment current = this.currentAlignment; while (current != null){ if (current == alignment) break; current = current.enclosing; } if (current == null) { throw new AbortFormatting("could not find matching alignment: "+alignment); //$NON-NLS-1$ } this.indentationLevel = alignment.location.outputIndentationLevel; this.numberOfIndentations = alignment.location.numberOfIndentations; this.formatter.lastLocalDeclarationSourceStart = alignment.location.lastLocalDeclarationSourceStart; if (discardAlignment){ this.currentAlignment = alignment.enclosing; if (this.currentAlignment == null) { this.formatter.lastBinaryExpressionAlignmentBreakIndentation = 0; } } }
public void exitAlignment(Alignment alignment, boolean discardAlignment){ Alignment current = this.currentAlignment; while (current != null){ if (current == alignment) break; current = current.enclosing; } if (current == null) { throw new AbortFormatting("could not find matching alignment: "+alignment); //$NON-NLS-1$ } this.indentationLevel = alignment.location.outputIndentationLevel; this.numberOfIndentations = alignment.location.numberOfIndentations; this.formatter.lastLocalDeclarationSourceStart = alignment.location.lastLocalDeclarationSourceStart; if (discardAlignment){ this.currentAlignment = alignment.enclosing; if (this.currentAlignment == null) { this.formatter.lastBinaryExpressionAlignmentBreakIndentation = 0; } } }
public void printNextToken(int expectedTokenType, boolean considerSpaceIfAny, int emptyLineRules) { // Set brace flag, it's useful for the scribe while preserving line breaks printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT, emptyLineRules); try { this.currentToken = this.scanner.getNextToken(); if (expectedTokenType != this.currentToken) { throw new AbortFormatting("unexpected token type, expecting:"+expectedTokenType+", actual:"+this.currentToken);//$NON-NLS-1$//$NON-NLS-2$ } print(this.scanner.currentPosition - this.scanner.startPosition, considerSpaceIfAny); } catch (InvalidInputException e) { throw new AbortFormatting(e); } }
public void printNextToken(int expectedTokenType, boolean considerSpaceIfAny, int emptyLineRules) { // Set brace flag, it's useful for the scribe while preserving line breaks printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT, emptyLineRules); try { this.currentToken = this.scanner.getNextToken(); if (expectedTokenType != this.currentToken) { throw new AbortFormatting("unexpected token type, expecting:"+expectedTokenType+", actual:"+this.currentToken);//$NON-NLS-1$//$NON-NLS-2$ } print(this.scanner.currentPosition - this.scanner.startPosition, considerSpaceIfAny); } catch (InvalidInputException e) { throw new AbortFormatting(e); } }
public void printNextToken(int[] expectedTokenTypes, boolean considerSpaceIfAny){ printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT); try { this.currentToken = this.scanner.getNextToken(); if (Arrays.binarySearch(expectedTokenTypes, this.currentToken) < 0) { StringBuffer expectations = new StringBuffer(5); for (int i = 0; i < expectedTokenTypes.length; i++){ if (i > 0) { expectations.append(','); } expectations.append(expectedTokenTypes[i]); } throw new AbortFormatting("unexpected token type, expecting:["+expectations.toString()+"], actual:"+this.currentToken);//$NON-NLS-1$//$NON-NLS-2$ } print(this.scanner.currentPosition - this.scanner.startPosition, considerSpaceIfAny); } catch (InvalidInputException e) { throw new AbortFormatting(e); } }
public void printNextToken(int[] expectedTokenTypes, boolean considerSpaceIfAny){ printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT); try { this.currentToken = this.scanner.getNextToken(); if (Arrays.binarySearch(expectedTokenTypes, this.currentToken) < 0) { StringBuffer expectations = new StringBuffer(5); for (int i = 0; i < expectedTokenTypes.length; i++){ if (i > 0) { expectations.append(','); } expectations.append(expectedTokenTypes[i]); } throw new AbortFormatting("unexpected token type, expecting:["+expectations.toString()+"], actual:"+this.currentToken);//$NON-NLS-1$//$NON-NLS-2$ } print(this.scanner.currentPosition - this.scanner.startPosition, considerSpaceIfAny); } catch (InvalidInputException e) { throw new AbortFormatting(e); } }
public void printNextToken(int expectedTokenType, boolean considerSpaceIfAny, int emptyLineRules) { // Set brace flag, it's useful for the scribe while preserving line breaks printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT, emptyLineRules); try { this.currentToken = this.scanner.getNextToken(); if (expectedTokenType != this.currentToken) { throw new AbortFormatting("unexpected token type, expecting:"+expectedTokenType+", actual:"+this.currentToken);//$NON-NLS-1$//$NON-NLS-2$ } print(this.scanner.currentPosition - this.scanner.startPosition, considerSpaceIfAny); } catch (InvalidInputException e) { throw new AbortFormatting(e); } }
public void printNextToken(int[] expectedTokenTypes, boolean considerSpaceIfAny){ printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT); try { this.currentToken = this.scanner.getNextToken(); if (Arrays.binarySearch(expectedTokenTypes, this.currentToken) < 0) { StringBuffer expectations = new StringBuffer(5); for (int i = 0; i < expectedTokenTypes.length; i++){ if (i > 0) { expectations.append(','); } expectations.append(expectedTokenTypes[i]); } throw new AbortFormatting("unexpected token type, expecting:["+expectations.toString()+"], actual:"+this.currentToken);//$NON-NLS-1$//$NON-NLS-2$ } print(this.scanner.currentPosition - this.scanner.startPosition, considerSpaceIfAny); } catch (InvalidInputException e) { throw new AbortFormatting(e); } }
throw new AbortFormatting(e);
throw new AbortFormatting(e);