private void convertBody(Statement body, final IBinding indexBinding, final IBinding arrayBinding, final String parameterName, final ASTRewrite rewrite, final TextEditGroup editGroup, final LinkedProposalPositionGroup pg) { final AST ast= body.getAST();
private void convertBody(Statement body, final IBinding indexBinding, final IBinding arrayBinding, final String parameterName, final ASTRewrite rewrite, final TextEditGroup editGroup, final LinkedProposalPositionGroup pg) { final AST ast= body.getAST();
private void convertBody(Statement body, final IBinding indexBinding, final IBinding arrayBinding, final String parameterName, final ASTRewrite rewrite, final TextEditGroup editGroup, final LinkedProposalPositionGroup pg) { final AST ast= body.getAST();
private static boolean getAddElseProposals(IInvocationContext context, ASTNode node, Collection resultingCollections) { Statement statement= ASTResolving.findParentStatement(node); if (!(statement instanceof IfStatement)) { return false; } IfStatement ifStatement= (IfStatement) statement; if (ifStatement.getElseStatement() != null) { return false; } if (resultingCollections == null) { return true; } AST ast= statement.getAST(); ASTRewrite rewrite= ASTRewrite.create(ast); Block body= ast.newBlock(); rewrite.set(ifStatement, IfStatement.ELSE_STATEMENT_PROPERTY, body, null); String label= CorrectionMessages.QuickAssistProcessor_addelseblock_description; Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_ADD); ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 1, image); resultingCollections.add(proposal); return true; }
AST ast = coveringStatement.getAST(); ASTRewrite rewrite = ASTRewrite.create(ast);
AST ast = coveringStatement.getAST(); ASTRewrite rewrite = ASTRewrite.create(ast);
AST ast = coveringStatement.getAST(); ASTRewrite rewrite = ASTRewrite.create(ast); Statement thenStatement= ifStatement.getThenStatement();
AST ast = coveringStatement.getAST(); ASTRewrite rewrite = ASTRewrite.create(ast);
AST ast= statement.getAST(); ASTRewrite rewrite= ASTRewrite.create(ast);
AST ast= statement.getAST(); ASTRewrite rewrite= ASTRewrite.create(ast);
return true; AST ast= statement.getAST();
AST ast= statement.getAST(); ASTRewrite rewrite= ASTRewrite.create(ast);