List of usage examples for org.eclipse.jdt.core.dom VariableDeclarationExpression getParent
public final ASTNode getParent()
null
if this is the root node. From source file:com.bsiag.eclipse.jdt.java.formatter.SpacePreparator.java
License:Open Source License
@Override public boolean visit(VariableDeclarationExpression node) { ASTNode parent = node.getParent(); if (parent instanceof ForStatement) { handleCommas(node.fragments(), this.options.insert_space_before_comma_in_for_inits, this.options.insert_space_after_comma_in_for_inits); } else if (parent instanceof ExpressionStatement) { handleCommas(node.fragments(), this.options.insert_space_before_comma_in_multiple_local_declarations, this.options.insert_space_after_comma_in_multiple_local_declarations); }//from w ww . j a v a 2s .com this.tm.firstTokenAfter(node.getType(), -1).spaceBefore(); return true; }