return false; Statement body= (Statement)p.getStructuralProperty(childD); if (body instanceof Block) { if (!cleanUpCheck) {
return false; Statement body= (Statement)p.getStructuralProperty(childD); if (body instanceof Block) { if (!cleanUpCheck) {
return false; Statement body= (Statement)p.getStructuralProperty(childD); if (body instanceof Block) { if (!cleanUpCheck) {
/** * {@inheritDoc} */ public void rewriteAST(CompilationUnitRewrite cuRewrite, List textEditGroups) throws CoreException { ASTRewrite rewrite= cuRewrite.getASTRewrite(); Block block= (Block)fStatement.getStructuralProperty(fChild); Statement statement= (Statement)block.statements().get(0); Statement moveTarget= (Statement)rewrite.createMoveTarget(statement); TextEditGroup group= createTextEditGroup(FixMessages.ControlStatementsFix_removeBrackets_proposalDescription); textEditGroups.add(group); rewrite.set(fStatement, fChild, moveTarget, group); }
@Override public void rewriteAST(CompilationUnitRewrite cuRewrite, LinkedProposalModel model) throws CoreException { ASTRewrite rewrite= cuRewrite.getASTRewrite(); Block block= (Block)fStatement.getStructuralProperty(fChild); Statement statement= (Statement)block.statements().get(0); Statement moveTarget= (Statement)rewrite.createMoveTarget(statement); TextEditGroup group= createTextEditGroup(FixMessages.ControlStatementsFix_removeBrackets_proposalDescription, cuRewrite); rewrite.set(fStatement, fChild, moveTarget, group); }
@Override public void rewriteAST(CompilationUnitRewrite cuRewrite, LinkedProposalModel model) throws CoreException { ASTRewrite rewrite= cuRewrite.getASTRewrite(); Block block= (Block)fStatement.getStructuralProperty(fChild); Statement statement= (Statement)block.statements().get(0); Statement moveTarget= (Statement)rewrite.createMoveTarget(statement); TextEditGroup group= createTextEditGroup(FixMessages.ControlStatementsFix_removeBrackets_proposalDescription, cuRewrite); rewrite.set(fStatement, fChild, moveTarget, group); }
private static boolean satisfiesPrecondition(Statement controlStatement, ChildPropertyDescriptor childDescriptor, boolean onlyReturnAndThrows, boolean cleanUpCheck) { Object child= controlStatement.getStructuralProperty(childDescriptor);
private static boolean satisfiesPrecondition(Statement controlStatement, ChildPropertyDescriptor childDescriptor, boolean onlyReturnAndThrows, boolean cleanUpCheck) { Object child= controlStatement.getStructuralProperty(childDescriptor);
private static boolean satisfiesPrecondition(Statement controlStatement, ChildPropertyDescriptor childDescriptor, boolean onlyReturnAndThrows, boolean cleanUpCheck) { Object child= controlStatement.getStructuralProperty(childDescriptor);