Search in sources :

Example 81 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project eclipse.jdt.ui by eclipse-jdt.

the class UnusedCodeFixCore method hasSideEffect.

private static boolean hasSideEffect(SimpleName reference) {
    ASTNode parent = reference.getParent();
    while (parent instanceof QualifiedName) {
        parent = parent.getParent();
    }
    if (parent instanceof FieldAccess) {
        parent = parent.getParent();
    }
    ASTNode node = null;
    int nameParentType = parent.getNodeType();
    if (nameParentType == ASTNode.ASSIGNMENT) {
        Assignment assignment = (Assignment) parent;
        node = assignment.getRightHandSide();
    } else if (nameParentType == ASTNode.SINGLE_VARIABLE_DECLARATION) {
        SingleVariableDeclaration decl = (SingleVariableDeclaration) parent;
        node = decl.getInitializer();
        if (node == null)
            return false;
    } else if (nameParentType == ASTNode.VARIABLE_DECLARATION_FRAGMENT) {
        node = parent;
    } else {
        return false;
    }
    ArrayList<Expression> sideEffects = new ArrayList<>();
    node.accept(new SideEffectFinder(sideEffects));
    return sideEffects.size() > 0;
}
Also used : Assignment(org.eclipse.jdt.core.dom.Assignment) ConditionalExpression(org.eclipse.jdt.core.dom.ConditionalExpression) Expression(org.eclipse.jdt.core.dom.Expression) CastExpression(org.eclipse.jdt.core.dom.CastExpression) VariableDeclarationExpression(org.eclipse.jdt.core.dom.VariableDeclarationExpression) PostfixExpression(org.eclipse.jdt.core.dom.PostfixExpression) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) PrefixExpression(org.eclipse.jdt.core.dom.PrefixExpression) SingleVariableDeclaration(org.eclipse.jdt.core.dom.SingleVariableDeclaration) QualifiedName(org.eclipse.jdt.core.dom.QualifiedName) ASTNode(org.eclipse.jdt.core.dom.ASTNode) ArrayList(java.util.ArrayList) FieldAccess(org.eclipse.jdt.core.dom.FieldAccess)

Example 82 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project eclipse.jdt.ui by eclipse-jdt.

the class JavaPostfixContext method resolveNodeToBinding.

private ITypeBinding resolveNodeToBinding(ASTNode node) {
    if (node instanceof StringLiteral) {
        return ((StringLiteral) node).resolveTypeBinding();
    }
    ITypeBinding[] res = new ITypeBinding[1];
    node.accept(new ASTVisitor() {

        @Override
        public boolean visit(MethodInvocation n) {
            res[0] = n.resolveTypeBinding();
            return false;
        }

        @Override
        public boolean visit(SimpleName n) {
            IBinding b = n.resolveBinding();
            if (b instanceof IVariableBinding) {
                IVariableBinding vb = (IVariableBinding) b;
                res[0] = vb.getType();
            } else if (b instanceof IMethodBinding) {
                IMethodBinding mb = (IMethodBinding) b;
                res[0] = mb.getReturnType();
            }
            return false;
        }

        @Override
        public boolean visit(QualifiedName n) {
            IBinding b = n.resolveBinding();
            if (b instanceof IVariableBinding) {
                IVariableBinding vb = (IVariableBinding) b;
                res[0] = vb.getType();
            }
            return false;
        }

        @Override
        public boolean visit(FieldAccess n) {
            ITypeBinding tmp = n.getName().resolveTypeBinding();
            if (tmp != null) {
                res[0] = tmp;
                return false;
            }
            res[0] = n.getExpression().resolveTypeBinding();
            return false;
        }

        @Override
        public boolean visit(Assignment n) {
            ITypeBinding tmp = n.getLeftHandSide().resolveTypeBinding();
            if (tmp != null) {
                res[0] = tmp;
                return false;
            }
            return true;
        }

        @Override
        public boolean visit(BooleanLiteral n) {
            res[0] = n.resolveTypeBinding();
            return false;
        }

        @Override
        public boolean visit(InfixExpression n) {
            res[0] = n.resolveTypeBinding();
            return false;
        }

        @Override
        public boolean visit(ClassInstanceCreation n) {
            res[0] = n.resolveTypeBinding();
            return false;
        }

        @Override
        public boolean visit(ArrayAccess n) {
            res[0] = n.resolveTypeBinding();
            return false;
        }
    });
    return res[0] != null ? res[0] : null;
}
Also used : IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) ClassInstanceCreation(org.eclipse.jdt.core.dom.ClassInstanceCreation) BooleanLiteral(org.eclipse.jdt.core.dom.BooleanLiteral) SimpleName(org.eclipse.jdt.core.dom.SimpleName) IBinding(org.eclipse.jdt.core.dom.IBinding) QualifiedName(org.eclipse.jdt.core.dom.QualifiedName) MethodInvocation(org.eclipse.jdt.core.dom.MethodInvocation) IVariableBinding(org.eclipse.jdt.core.dom.IVariableBinding) ASTVisitor(org.eclipse.jdt.core.dom.ASTVisitor) Assignment(org.eclipse.jdt.core.dom.Assignment) ArrayAccess(org.eclipse.jdt.core.dom.ArrayAccess) StringLiteral(org.eclipse.jdt.core.dom.StringLiteral) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) InfixExpression(org.eclipse.jdt.core.dom.InfixExpression) FieldAccess(org.eclipse.jdt.core.dom.FieldAccess) SuperFieldAccess(org.eclipse.jdt.core.dom.SuperFieldAccess)

Example 83 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project eclipse.jdt.ui by eclipse-jdt.

the class SurroundWithTryCatchRefactoring method createTryCatchStatement.

private void createTryCatchStatement(org.eclipse.jdt.core.IBuffer buffer, String lineDelimiter) throws CoreException {
    List<Statement> result = new ArrayList<>(1);
    TryStatement tryStatement = getAST().newTryStatement();
    ITypeBinding[] exceptions = fAnalyzer.getExceptions();
    ImportRewriteContext context = new ContextSensitiveImportRewriteContext(fAnalyzer.getEnclosingBodyDeclaration(), fImportRewrite);
    if (!fIsMultiCatch) {
        for (int i = 0; i < exceptions.length; i++) {
            ITypeBinding exception = exceptions[i];
            CatchClause catchClause = getAST().newCatchClause();
            tryStatement.catchClauses().add(catchClause);
            SingleVariableDeclaration decl = getAST().newSingleVariableDeclaration();
            String varName = StubUtility.getExceptionVariableName(fCUnit.getJavaProject());
            String name = fScope.createName(varName, false);
            decl.setName(getAST().newSimpleName(name));
            Type type = fImportRewrite.addImport(exception, getAST(), context, TypeLocation.EXCEPTION);
            decl.setType(type);
            catchClause.setException(decl);
            Statement st = getCatchBody(ASTNodes.getQualifiedTypeName(type), name, lineDelimiter);
            if (st != null) {
                catchClause.getBody().statements().add(st);
            }
            fLinkedProposalModel.getPositionGroup(GROUP_EXC_TYPE + i, true).addPosition(fRewriter.track(decl.getType()), i == 0);
            fLinkedProposalModel.getPositionGroup(GROUP_EXC_NAME + i, true).addPosition(fRewriter.track(decl.getName()), false);
        }
    } else {
        List<ITypeBinding> filteredExceptions = filterSubtypeExceptions(exceptions);
        CatchClause catchClause = getAST().newCatchClause();
        SingleVariableDeclaration decl = getAST().newSingleVariableDeclaration();
        String varName = StubUtility.getExceptionVariableName(fCUnit.getJavaProject());
        String name = fScope.createName(varName, false);
        decl.setName(getAST().newSimpleName(name));
        UnionType unionType = getAST().newUnionType();
        List<Type> types = unionType.types();
        int i = 0;
        for (ITypeBinding exception : filteredExceptions) {
            Type type = fImportRewrite.addImport(exception, getAST(), context, TypeLocation.EXCEPTION);
            types.add(type);
            fLinkedProposalModel.getPositionGroup(GROUP_EXC_TYPE + i, true).addPosition(fRewriter.track(type), i == 0);
            i++;
        }
        decl.setType(unionType);
        catchClause.setException(decl);
        fLinkedProposalModel.getPositionGroup(GROUP_EXC_NAME + 0, true).addPosition(fRewriter.track(decl.getName()), false);
        // $NON-NLS-1$
        Statement st = getCatchBody("Exception", name, lineDelimiter);
        if (st != null) {
            catchClause.getBody().statements().add(st);
        }
        tryStatement.catchClauses().add(catchClause);
    }
    List<ASTNode> variableDeclarations = getSpecialVariableDeclarationStatements();
    ListRewrite statements = fRewriter.getListRewrite(tryStatement.getBody(), Block.STATEMENTS_PROPERTY);
    boolean selectedNodeRemoved = false;
    ASTNode expressionStatement = null;
    for (ASTNode node : fSelectedNodes) {
        if (node instanceof VariableDeclarationStatement && variableDeclarations.contains(node)) {
            AST ast = getAST();
            VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
            // Create a copy and remove the initializer
            VariableDeclarationStatement copy = (VariableDeclarationStatement) ASTNode.copySubtree(ast, statement);
            List<IExtendedModifier> modifiers = copy.modifiers();
            for (Iterator<IExtendedModifier> iter = modifiers.iterator(); iter.hasNext(); ) {
                IExtendedModifier modifier = iter.next();
                if (modifier.isModifier() && Modifier.isFinal(((Modifier) modifier).getKeyword().toFlagValue())) {
                    iter.remove();
                }
            }
            List<VariableDeclarationFragment> fragments = copy.fragments();
            for (VariableDeclarationFragment fragment : fragments) {
                fragment.setInitializer(null);
            }
            // "var" type cannot have null initializer, so change to inferred type
            if (ASTNodes.isVarType(statement, fRootNode)) {
                ITypeBinding binding = statement.getType().resolveBinding();
                if (binding != null) {
                    Type varType = fImportRewrite.addImport(binding, getAST(), context, TypeLocation.LOCAL_VARIABLE);
                    copy.setType(varType);
                }
            }
            CompilationUnit root = (CompilationUnit) statement.getRoot();
            int extendedStart = root.getExtendedStartPosition(statement);
            // we have a leading comment and the comment is covered by the selection
            if (extendedStart != statement.getStartPosition() && extendedStart >= fSelection.getOffset()) {
                String commentToken = buffer.getText(extendedStart, statement.getStartPosition() - extendedStart);
                commentToken = Strings.trimTrailingTabsAndSpaces(commentToken);
                Type type = statement.getType();
                String typeName = buffer.getText(type.getStartPosition(), type.getLength());
                copy.setType((Type) fRewriter.createStringPlaceholder(commentToken + typeName, type.getNodeType()));
            }
            result.add(copy);
            // convert the fragments into expression statements
            fragments = statement.fragments();
            if (!fragments.isEmpty()) {
                List<ExpressionStatement> newExpressionStatements = new ArrayList<>();
                for (VariableDeclarationFragment fragment : fragments) {
                    Expression initializer = fragment.getInitializer();
                    if (initializer != null) {
                        Assignment assignment = ast.newAssignment();
                        assignment.setLeftHandSide((Expression) fRewriter.createCopyTarget(fragment.getName()));
                        assignment.setRightHandSide((Expression) fRewriter.createCopyTarget(initializer));
                        newExpressionStatements.add(ast.newExpressionStatement(assignment));
                    }
                }
                if (!newExpressionStatements.isEmpty()) {
                    if (fSelectedNodes.length == 1) {
                        expressionStatement = fRewriter.createGroupNode(newExpressionStatements.toArray(new ASTNode[newExpressionStatements.size()]));
                    } else {
                        fRewriter.replace(statement, fRewriter.createGroupNode(newExpressionStatements.toArray(new ASTNode[newExpressionStatements.size()])), null);
                    }
                } else {
                    fRewriter.remove(statement, null);
                    selectedNodeRemoved = true;
                }
            } else {
                fRewriter.remove(statement, null);
                selectedNodeRemoved = true;
            }
        }
    }
    result.add(tryStatement);
    ASTNode replacementNode;
    if (result.size() == 1) {
        replacementNode = result.get(0);
    } else {
        replacementNode = fRewriter.createGroupNode(result.toArray(new ASTNode[result.size()]));
    }
    ASTNode node = fSelectedNodes[0];
    List<ASTNode> nodesInRange = new ArrayList<>();
    // need references added inside try/catch statement
    if (JavaModelUtil.is16OrHigher(fCUnit.getJavaProject())) {
        if (node instanceof Block || node.getLocationInParent() == Block.STATEMENTS_PROPERTY) {
            ASTNode parentBodyDeclaration = (node instanceof Block) ? node : ASTNodes.getFirstAncestorOrNull(node, Block.class);
            int start = fSelectedNodes[0].getStartPosition();
            ASTNode lastSelectedNode = fSelectedNodes[fSelectedNodes.length - 1];
            int end = lastSelectedNode.getStartPosition() + lastSelectedNode.getLength();
            for (ASTNode astNode : fSelectedNodes) {
                if (!variableDeclarations.contains(astNode)) {
                    int endPosition = findEndPosition(astNode);
                    end = Math.max(end, endPosition);
                }
            }
            // recursive loop to find all nodes affected by wrapping in try block
            nodesInRange = findNodesInRange(parentBodyDeclaration, start, end);
            int oldEnd = end;
            int newEnd = end;
            while (true) {
                newEnd = oldEnd;
                for (ASTNode astNode : nodesInRange) {
                    if (!variableDeclarations.contains(astNode)) {
                        int endPosition = findEndPosition(astNode);
                        newEnd = Math.max(newEnd, endPosition);
                    }
                }
                if (newEnd > oldEnd) {
                    oldEnd = newEnd;
                    nodesInRange = findNodesInRange(parentBodyDeclaration, start, newEnd);
                    continue;
                }
                break;
            }
            nodesInRange.removeAll(Arrays.asList(fSelectedNodes));
        }
    }
    if (fSelectedNodes.length == 1 && nodesInRange.isEmpty()) {
        ASTNode selectedNode = fSelectedNodes[0];
        if (selectedNode instanceof MethodReference) {
            MethodReference methodReference = (MethodReference) selectedNode;
            IMethodBinding functionalMethod = QuickAssistProcessorUtil.getFunctionalMethodForMethodReference(methodReference);
            // functionalMethod is non-null and non-generic. See ExceptionAnalyzer.handleMethodReference(MethodReference node).
            Assert.isTrue(functionalMethod != null && !functionalMethod.isGenericMethod());
            LambdaExpression lambda = QuickAssistProcessorUtil.convertMethodRefernceToLambda(methodReference, functionalMethod, fRootNode, fRewriter, null, true);
            ASTNode statementInBlock = (ASTNode) ((Block) lambda.getBody()).statements().get(0);
            fRewriter.replace(statementInBlock, replacementNode, null);
            statements.insertLast(statementInBlock, null);
            return;
        }
        LambdaExpression enclosingLambda = ASTResolving.findEnclosingLambdaExpression(selectedNode);
        if (enclosingLambda != null && selectedNode.getLocationInParent() == LambdaExpression.BODY_PROPERTY && enclosingLambda.resolveMethodBinding() != null) {
            QuickAssistProcessorUtil.changeLambdaBodyToBlock(enclosingLambda, getAST(), fRewriter);
            Block blockBody = (Block) fRewriter.get(enclosingLambda, LambdaExpression.BODY_PROPERTY);
            ASTNode statementInBlock = (ASTNode) blockBody.statements().get(0);
            fRewriter.replace(statementInBlock, replacementNode, null);
            statements.insertLast(statementInBlock, null);
            return;
        }
        if (expressionStatement != null) {
            statements.insertLast(expressionStatement, null);
        } else {
            if (!selectedNodeRemoved)
                statements.insertLast(fRewriter.createMoveTarget(selectedNode), null);
        }
        fRewriter.replace(selectedNode, replacementNode, null);
    } else {
        ListRewrite source = fRewriter.getListRewrite(fSelectedNodes[0].getParent(), (ChildListPropertyDescriptor) fSelectedNodes[0].getLocationInParent());
        ASTNode toMove = source.createMoveTarget(fSelectedNodes[0], (nodesInRange.isEmpty() ? fSelectedNodes[fSelectedNodes.length - 1] : nodesInRange.get(nodesInRange.size() - 1)), replacementNode, null);
        statements.insertLast(toMove, null);
    }
}
Also used : IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) UnionType(org.eclipse.jdt.core.dom.UnionType) ArrayList(java.util.ArrayList) ListRewrite(org.eclipse.jdt.core.dom.rewrite.ListRewrite) IExtendedModifier(org.eclipse.jdt.core.dom.IExtendedModifier) Assignment(org.eclipse.jdt.core.dom.Assignment) TryStatement(org.eclipse.jdt.core.dom.TryStatement) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) ASTNode(org.eclipse.jdt.core.dom.ASTNode) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) CompilationUnit(org.eclipse.jdt.core.dom.CompilationUnit) AST(org.eclipse.jdt.core.dom.AST) Statement(org.eclipse.jdt.core.dom.Statement) ExpressionStatement(org.eclipse.jdt.core.dom.ExpressionStatement) TryStatement(org.eclipse.jdt.core.dom.TryStatement) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) SingleVariableDeclaration(org.eclipse.jdt.core.dom.SingleVariableDeclaration) CatchClause(org.eclipse.jdt.core.dom.CatchClause) ContextSensitiveImportRewriteContext(org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext) UnionType(org.eclipse.jdt.core.dom.UnionType) Type(org.eclipse.jdt.core.dom.Type) ImportRewriteContext(org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext) ContextSensitiveImportRewriteContext(org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext) Expression(org.eclipse.jdt.core.dom.Expression) LambdaExpression(org.eclipse.jdt.core.dom.LambdaExpression) ExpressionStatement(org.eclipse.jdt.core.dom.ExpressionStatement) Block(org.eclipse.jdt.core.dom.Block) MethodReference(org.eclipse.jdt.core.dom.MethodReference) LambdaExpression(org.eclipse.jdt.core.dom.LambdaExpression)

Example 84 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project eclipse.jdt.ui by eclipse-jdt.

the class BindingLabels18Test method testCaptureBinding18.

@Test
public void testCaptureBinding18() throws CoreException {
    IJavaProject javaProject = JavaProjectHelper.createJavaProject("P", "bin");
    try {
        JavaProjectHelper.addRTJar12(javaProject, false);
        JavaProjectHelper.set12CompilerOptions(javaProject, false);
        IPackageFragmentRoot sourceFolder = JavaProjectHelper.addSourceContainer(javaProject, "src");
        IPackageFragment pack1 = sourceFolder.createPackageFragment("p", false, null);
        StringBuilder buf = new StringBuilder();
        buf.append("package p;\n");
        buf.append("\n");
        buf.append("import java.util.List;\n");
        buf.append("\n");
        buf.append("public class Test {\n");
        buf.append("\n");
        buf.append("	protected <E extends Comparable<E>> List<E> createEmptySet() {\n");
        buf.append("		return null;\n");
        buf.append("	}\n");
        buf.append("\n");
        buf.append("	public void emptySet() {\n");
        buf.append("		s = createEmptySet();\n");
        buf.append("	}\n");
        buf.append("\n");
        buf.append("}");
        String content = buf.toString();
        ICompilationUnit cu = pack1.createCompilationUnit("Test.java", content, false, null);
        IJavaElement enclElement = cu.getTypes()[0].getMethods()[1];
        class MyASTRequestor extends ASTRequestor {

            CompilationUnit ast;

            @Override
            public void acceptAST(ICompilationUnit source, CompilationUnit unit) {
                this.ast = unit;
            }
        }
        ASTParser parser = ASTParser.newParser(AST.getJLSLatest());
        parser.setResolveBindings(true);
        parser.setBindingsRecovery(true);
        parser.setProject(javaProject);
        MyASTRequestor requestor = new MyASTRequestor();
        parser.createASTs(new ICompilationUnit[] { cu }, new String[0], requestor, null);
        MethodDeclaration method = ((TypeDeclaration) requestor.ast.types().get(0)).getMethods()[1];
        Assignment assignment = (Assignment) ((ExpressionStatement) method.getBody().statements().get(0)).getExpression();
        Name name = (Name) assignment.getLeftHandSide();
        ITypeBinding binding = ASTResolving.guessBindingForReference(name);
        String lab = JavaElementLinks.getBindingLabel(binding, enclElement, JavaElementLabels.ALL_DEFAULT, true);
        assertLinkMatch(lab, "{{java.util|List}}<?>");
    } finally {
        JavaProjectHelper.delete(javaProject);
    }
}
Also used : ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) CompilationUnit(org.eclipse.jdt.core.dom.CompilationUnit) ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) IJavaElement(org.eclipse.jdt.core.IJavaElement) IPackageFragment(org.eclipse.jdt.core.IPackageFragment) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) IPackageFragmentRoot(org.eclipse.jdt.core.IPackageFragmentRoot) Name(org.eclipse.jdt.core.dom.Name) Assignment(org.eclipse.jdt.core.dom.Assignment) IJavaProject(org.eclipse.jdt.core.IJavaProject) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) ASTRequestor(org.eclipse.jdt.core.dom.ASTRequestor) ASTParser(org.eclipse.jdt.core.dom.ASTParser) Test(org.junit.Test)

Example 85 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project eclipse.jdt.ui by eclipse-jdt.

the class MoveInnerToTopRefactoring method setEnclosingInstanceFieldInConstructor.

private void setEnclosingInstanceFieldInConstructor(ASTRewrite rewrite, MethodDeclaration decl) throws JavaModelException {
    final AST ast = decl.getAST();
    final Block body = decl.getBody();
    final List<Statement> statements = body.statements();
    if (statements.isEmpty()) {
        final Assignment assignment = ast.newAssignment();
        assignment.setLeftHandSide(createReadAccessExpressionForEnclosingInstance(ast));
        assignment.setRightHandSide(ast.newSimpleName(getNameForEnclosingInstanceConstructorParameter()));
        rewrite.getListRewrite(body, Block.STATEMENTS_PROPERTY).insertFirst(ast.newExpressionStatement(assignment), null);
    } else {
        final Statement first = statements.get(0);
        if (first instanceof ConstructorInvocation) {
            rewrite.getListRewrite(first, ConstructorInvocation.ARGUMENTS_PROPERTY).insertFirst(ast.newSimpleName(fEnclosingInstanceFieldName), null);
        } else {
            int index = 0;
            if (first instanceof SuperConstructorInvocation)
                index++;
            final Assignment assignment = ast.newAssignment();
            assignment.setLeftHandSide(createReadAccessExpressionForEnclosingInstance(ast));
            assignment.setRightHandSide(ast.newSimpleName(getNameForEnclosingInstanceConstructorParameter()));
            rewrite.getListRewrite(body, Block.STATEMENTS_PROPERTY).insertAt(ast.newExpressionStatement(assignment), index, null);
        }
    }
}
Also used : Assignment(org.eclipse.jdt.core.dom.Assignment) AST(org.eclipse.jdt.core.dom.AST) SuperConstructorInvocation(org.eclipse.jdt.core.dom.SuperConstructorInvocation) ConstructorInvocation(org.eclipse.jdt.core.dom.ConstructorInvocation) Statement(org.eclipse.jdt.core.dom.Statement) TypeDeclarationStatement(org.eclipse.jdt.core.dom.TypeDeclarationStatement) Block(org.eclipse.jdt.core.dom.Block) SuperConstructorInvocation(org.eclipse.jdt.core.dom.SuperConstructorInvocation)

Aggregations

Assignment (org.eclipse.jdt.core.dom.Assignment)229 Expression (org.eclipse.jdt.core.dom.Expression)115 SimpleName (org.eclipse.jdt.core.dom.SimpleName)94 VariableDeclarationFragment (org.eclipse.jdt.core.dom.VariableDeclarationFragment)91 ASTNode (org.eclipse.jdt.core.dom.ASTNode)84 AST (org.eclipse.jdt.core.dom.AST)69 MethodDeclaration (org.eclipse.jdt.core.dom.MethodDeclaration)64 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)63 VariableDeclarationExpression (org.eclipse.jdt.core.dom.VariableDeclarationExpression)63 CastExpression (org.eclipse.jdt.core.dom.CastExpression)62 MethodInvocation (org.eclipse.jdt.core.dom.MethodInvocation)61 ExpressionStatement (org.eclipse.jdt.core.dom.ExpressionStatement)60 InfixExpression (org.eclipse.jdt.core.dom.InfixExpression)59 VariableDeclarationStatement (org.eclipse.jdt.core.dom.VariableDeclarationStatement)58 Statement (org.eclipse.jdt.core.dom.Statement)55 PrefixExpression (org.eclipse.jdt.core.dom.PrefixExpression)49 ParenthesizedExpression (org.eclipse.jdt.core.dom.ParenthesizedExpression)48 Block (org.eclipse.jdt.core.dom.Block)43 FieldAccess (org.eclipse.jdt.core.dom.FieldAccess)43 IVariableBinding (org.eclipse.jdt.core.dom.IVariableBinding)41