@Override public boolean visit(Assignment node) { int rightSideIndex = this.tm.firstIndexIn(node.getRightHandSide(), -1); if (this.tm.get(rightSideIndex).getLineBreaksBefore() > 0) return true; // must be an array initializer in new line because of brace_position_for_array_initializer int operatorIndex = this.tm.firstIndexBefore(node.getRightHandSide(), -1); while (this.tm.get(operatorIndex).isComment()) operatorIndex--; assert node.getOperator().toString().equals(this.tm.toString(operatorIndex)); this.wrapIndexes.add(this.options.wrap_before_assignment_operator ? operatorIndex : rightSideIndex); this.secondaryWrapIndexes.add(this.options.wrap_before_assignment_operator ? rightSideIndex : operatorIndex); this.wrapParentIndex = operatorIndex - 1; this.wrapGroupEnd = this.tm.lastIndexIn(node.getRightHandSide(), -1); handleWrap(this.options.alignment_for_assignment); return true; }
@Override public boolean visit(Assignment node) { int rightSideIndex = this.tm.firstIndexIn(node.getRightHandSide(), -1); if (this.tm.get(rightSideIndex).getLineBreaksBefore() > 0) return true; // must be an array initializer in new line because of brace_position_for_array_initializer int operatorIndex = this.tm.firstIndexBefore(node.getRightHandSide(), -1); while (this.tm.get(operatorIndex).isComment()) operatorIndex--; assert node.getOperator().toString().equals(this.tm.toString(operatorIndex)); this.wrapIndexes.add(this.options.wrap_before_assignment_operator ? operatorIndex : rightSideIndex); this.secondaryWrapIndexes.add(this.options.wrap_before_assignment_operator ? rightSideIndex : operatorIndex); this.wrapParentIndex = operatorIndex - 1; this.wrapGroupEnd = this.tm.lastIndexIn(node.getRightHandSide(), -1); handleWrap(this.options.alignment_for_assignment); return true; }
@Override public boolean visit(Assignment node) { int rightSideIndex = this.tm.firstIndexIn(node.getRightHandSide(), -1); if (this.tm.get(rightSideIndex).getLineBreaksBefore() > 0) return true; // must be an array initializer in new line because of brace_position_for_array_initializer int operatorIndex = this.tm.firstIndexBefore(node.getRightHandSide(), -1); while (this.tm.get(operatorIndex).isComment()) operatorIndex--; assert node.getOperator().toString().equals(this.tm.toString(operatorIndex)); this.wrapIndexes.add(this.options.wrap_before_assignment_operator ? operatorIndex : rightSideIndex); this.secondaryWrapIndexes.add(this.options.wrap_before_assignment_operator ? rightSideIndex : operatorIndex); this.wrapParentIndex = operatorIndex - 1; this.wrapGroupEnd = this.tm.lastIndexIn(node.getRightHandSide(), -1); handleWrap(this.options.alignment_for_assignment); return true; }
@Override public boolean visit(Assignment node) { int rightSideIndex = this.tm.firstIndexIn(node.getRightHandSide(), -1); if (this.tm.get(rightSideIndex).getLineBreaksBefore() > 0) return true; // must be an array initializer in new line because of brace_position_for_array_initializer int operatorIndex = this.tm.firstIndexBefore(node.getRightHandSide(), -1); while (this.tm.get(operatorIndex).isComment()) operatorIndex--; assert node.getOperator().toString().equals(this.tm.toString(operatorIndex)); this.wrapIndexes.add(this.options.wrap_before_assignment_operator ? operatorIndex : rightSideIndex); this.secondaryWrapIndexes.add(this.options.wrap_before_assignment_operator ? rightSideIndex : operatorIndex); this.wrapParentIndex = operatorIndex - 1; this.wrapGroupEnd = this.tm.lastIndexIn(node.getRightHandSide(), -1); handleWrap(this.options.alignment_for_assignment); return true; }
protected String getLabel(ASTNode n) { if (n instanceof Name) return ((Name) n).getFullyQualifiedName(); if (n instanceof Type) return n.toString(); if (n instanceof Modifier) return n.toString(); if (n instanceof StringLiteral) return ((StringLiteral) n).getEscapedValue(); if (n instanceof NumberLiteral) return ((NumberLiteral) n).getToken(); if (n instanceof CharacterLiteral) return ((CharacterLiteral) n).getEscapedValue(); if (n instanceof BooleanLiteral) return ((BooleanLiteral) n).toString(); if (n instanceof InfixExpression) return ((InfixExpression) n).getOperator().toString(); if (n instanceof PrefixExpression) return ((PrefixExpression) n).getOperator().toString(); if (n instanceof PostfixExpression) return ((PostfixExpression) n).getOperator().toString(); if (n instanceof Assignment) return ((Assignment) n).getOperator().toString(); if (n instanceof TextElement) return n.toString(); if (n instanceof TagElement) return ((TagElement) n).getTagName(); return ""; }
public boolean visit(Assignment node) { node.getLeftHandSide().accept(this); this.buffer.append(node.getOperator().toString()); node.getRightHandSide().accept(this); return false; }
@Override public boolean visit(Assignment node) { handleOperator(node.getOperator().toString(), node.getRightHandSide(), this.options.insert_space_before_assignment_operator, this.options.insert_space_after_assignment_operator); return true; }
public boolean visit(Assignment node) { node.getLeftHandSide().accept(this); this.buffer.append(node.getOperator().toString()); node.getRightHandSide().accept(this); return false; }
public boolean visit(Assignment node) { node.getLeftHandSide().accept(this); this.buffer.append(node.getOperator().toString()); node.getRightHandSide().accept(this); return false; }
@Override public boolean visit(Assignment node) { node.getLeftHandSide().accept(this); this.fBuffer.append(node.getOperator().toString()); node.getRightHandSide().accept(this); return false; }
public boolean visit(Assignment node) { node.getLeftHandSide().accept(this); this.buffer.append(node.getOperator().toString()); node.getRightHandSide().accept(this); return false; }
public boolean visit(Assignment node) { node.getLeftHandSide().accept(this); this.buffer.append(node.getOperator().toString()); node.getRightHandSide().accept(this); return false; }
public boolean visit(Assignment node) { node.getLeftHandSide().accept(this); this.fBuffer.append(node.getOperator().toString()); node.getRightHandSide().accept(this); return false; }
public void handleAssignment(final Assignment node, final ASTNode leftSide, final Type type) { leftSide.accept(this); this.appendToBuffer(node.getOperator().toString()); this.handleRightHandSide(node, type); }
@Override public boolean visit(Assignment node) { handleOperator(node.getOperator().toString(), node.getRightHandSide(), this.options.insert_space_before_assignment_operator, this.options.insert_space_after_assignment_operator); return true; }
@Override public boolean visit(Assignment node) { node.getLeftHandSide().accept(this); this.buffer.append(node.getOperator().toString()); node.getRightHandSide().accept(this); return false; }
@Override public boolean visit(Assignment node) { handleOperator(node.getOperator().toString(), node.getRightHandSide(), this.options.insert_space_before_assignment_operator, this.options.insert_space_after_assignment_operator); return true; }
@Override public boolean visit(Assignment node) { node.getLeftHandSide().accept(this); this.fBuffer.append(node.getOperator().toString()); node.getRightHandSide().accept(this); return false; }
@Override public boolean visit(Assignment node) { handleOperator(node.getOperator().toString(), node.getRightHandSide(), this.options.insert_space_before_assignment_operator, this.options.insert_space_after_assignment_operator); return true; }
public boolean visit(Assignment node) { IValue leftSide = visitChild(node.getLeftHandSide()); IValue rightSide = visitChild(node.getRightHandSide()); ownValue = constructExpressionNode("assignment", leftSide, values.string(node.getOperator().toString()), rightSide); return false; }