|| (structure.size() == 1 && structure.get(0).tokenType == TokenNameWHITESPACE)) { WrapExecutor.this.tm.remove(index); structureChanged();
WrapExecutor.this.tm.remove(index); structureChanged();
WrapExecutor.this.tm.remove(index); structureChanged();
private void handleTokenAfter(ASTNode node, int tokenType, boolean spaceBefore, boolean spaceAfter) { if (spaceBefore || spaceAfter) { if (tokenType == TokenNameGREATER) { // there could be ">>" or ">>>" instead, get rid of them int index = this.tm.lastIndexIn(node, -1); for (int i = index; i < index + 2; i++) { Token token = this.tm.get(i); if (token.tokenType == TokenNameRIGHT_SHIFT || token.tokenType == TokenNameUNSIGNED_RIGHT_SHIFT) { this.tm.remove(i); for (int j = 0; j < (token.tokenType == TokenNameRIGHT_SHIFT ? 2 : 3); j++) { this.tm.insert(i + j, new Token(token.originalStart + j, token.originalStart + j, TokenNameGREATER)); } } } } Token token = this.tm.firstTokenAfter(node, tokenType); handleToken(token, spaceBefore, spaceAfter); } }
private void handleTokenAfter(ASTNode node, int tokenType, boolean spaceBefore, boolean spaceAfter) { if (tokenType == TokenNameGREATER) { // there could be ">>" or ">>>" instead, get rid of them int index = this.tm.lastIndexIn(node, -1); for (int i = index; i < index + 2; i++) { Token token = this.tm.get(i); if (token.tokenType == TokenNameRIGHT_SHIFT || token.tokenType == TokenNameUNSIGNED_RIGHT_SHIFT) { this.tm.remove(i); for (int j = 0; j < (token.tokenType == TokenNameRIGHT_SHIFT ? 2 : 3); j++) { this.tm.insert(i + j, new Token(token.originalStart + j, token.originalStart + j, TokenNameGREATER)); } } } } if (spaceBefore || spaceAfter) { Token token = this.tm.firstTokenAfter(node, tokenType); handleToken(token, spaceBefore, spaceAfter); } }
private void handleTokenAfter(ASTNode node, int tokenType, boolean spaceBefore, boolean spaceAfter) { if (tokenType == TokenNameGREATER) { // there could be ">>" or ">>>" instead, get rid of them int index = this.tm.lastIndexIn(node, -1); for (int i = index; i < index + 2; i++) { Token token = this.tm.get(i); if (token.tokenType == TokenNameRIGHT_SHIFT || token.tokenType == TokenNameUNSIGNED_RIGHT_SHIFT) { this.tm.remove(i); for (int j = 0; j < (token.tokenType == TokenNameRIGHT_SHIFT ? 2 : 3); j++) { this.tm.insert(i + j, new Token(token.originalStart + j, token.originalStart + j, TokenNameGREATER)); } } } } if (spaceBefore || spaceAfter) { Token token = this.tm.firstTokenAfter(node, tokenType); handleToken(token, spaceBefore, spaceAfter); } }