Search in sources :

Example 1 with RefactoringCorrectionProposal

use of org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal in project eclipse.jdt.ls by eclipse.

the class QuickAssistProcessor method getExtractMethodProposal.

private static boolean getExtractMethodProposal(IInvocationContext context, ASTNode coveringNode, boolean problemsAtLocation, Collection<CUCorrectionProposal> proposals) throws CoreException {
    if (!(coveringNode instanceof Expression) && !(coveringNode instanceof Statement) && !(coveringNode instanceof Block)) {
        return false;
    }
    if (coveringNode instanceof Block) {
        List<Statement> statements = ((Block) coveringNode).statements();
        int startIndex = getIndex(context.getSelectionOffset(), statements);
        if (startIndex == -1) {
            return false;
        }
        int endIndex = getIndex(context.getSelectionOffset() + context.getSelectionLength(), statements);
        if (endIndex == -1 || endIndex <= startIndex) {
            return false;
        }
    }
    if (proposals == null) {
        return true;
    }
    final ICompilationUnit cu = context.getCompilationUnit();
    final ExtractMethodRefactoring extractMethodRefactoring = new ExtractMethodRefactoring(context.getASTRoot(), context.getSelectionOffset(), context.getSelectionLength());
    String uniqueMethodName = getUniqueMethodName(coveringNode, "extracted");
    extractMethodRefactoring.setMethodName(uniqueMethodName);
    if (extractMethodRefactoring.checkInitialConditions(new NullProgressMonitor()).isOK()) {
        String label = CorrectionMessages.QuickAssistProcessor_extractmethod_description;
        LinkedProposalModel linkedProposalModel = new LinkedProposalModel();
        extractMethodRefactoring.setLinkedProposalModel(linkedProposalModel);
        int relevance = problemsAtLocation ? IProposalRelevance.EXTRACT_METHOD_ERROR : IProposalRelevance.EXTRACT_METHOD;
        RefactoringCorrectionProposal proposal = new RefactoringCorrectionProposal(label, cu, extractMethodRefactoring, relevance);
        proposal.setLinkedProposalModel(linkedProposalModel);
        proposals.add(proposal);
    }
    return true;
}
Also used : ExtractMethodRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractMethodRefactoring) ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) ThisExpression(org.eclipse.jdt.core.dom.ThisExpression) Expression(org.eclipse.jdt.core.dom.Expression) LambdaExpression(org.eclipse.jdt.core.dom.LambdaExpression) Statement(org.eclipse.jdt.core.dom.Statement) ExpressionStatement(org.eclipse.jdt.core.dom.ExpressionStatement) TryStatement(org.eclipse.jdt.core.dom.TryStatement) ReturnStatement(org.eclipse.jdt.core.dom.ReturnStatement) LinkedProposalModel(org.eclipse.jdt.ls.core.internal.corext.fix.LinkedProposalModel) Block(org.eclipse.jdt.core.dom.Block) RefactoringCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal)

Example 2 with RefactoringCorrectionProposal

use of org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal in project eclipse.jdt.ls by eclipse.

the class RefactorProcessor method getInlineProposal.

private boolean getInlineProposal(IInvocationContext context, ASTNode node, Collection<ChangeCorrectionProposal> resultingCollections) {
    if (resultingCollections == null) {
        return false;
    }
    if (!(node instanceof SimpleName)) {
        return false;
    }
    SimpleName name = (SimpleName) node;
    IBinding binding = name.resolveBinding();
    try {
        if (binding instanceof IVariableBinding) {
            IVariableBinding varBinding = (IVariableBinding) binding;
            if (varBinding.isParameter()) {
                return false;
            }
            if (varBinding.isField()) {
                // Inline Constant (static final field)
                if (RefactoringAvailabilityTesterCore.isInlineConstantAvailable((IField) varBinding.getJavaElement())) {
                    InlineConstantRefactoring refactoring = new InlineConstantRefactoring(context.getCompilationUnit(), context.getASTRoot(), context.getSelectionOffset(), context.getSelectionLength());
                    if (refactoring != null && refactoring.checkInitialConditions(new NullProgressMonitor()).isOK() && refactoring.getReferences(new NullProgressMonitor(), new RefactoringStatus()).length > 0) {
                        refactoring.setRemoveDeclaration(refactoring.isDeclarationSelected());
                        refactoring.setReplaceAllReferences(refactoring.isDeclarationSelected());
                        CheckConditionsOperation check = new CheckConditionsOperation(refactoring, CheckConditionsOperation.FINAL_CONDITIONS);
                        final CreateChangeOperation create = new CreateChangeOperation(check, RefactoringStatus.FATAL);
                        create.run(new NullProgressMonitor());
                        String label = ActionMessages.InlineConstantRefactoringAction_label;
                        int relevance = IProposalRelevance.INLINE_LOCAL;
                        ChangeCorrectionProposal proposal = new ChangeCorrectionProposal(label, CodeActionKind.RefactorInline, create.getChange(), relevance);
                        resultingCollections.add(proposal);
                        return true;
                    }
                }
                return false;
            }
            ASTNode decl = context.getASTRoot().findDeclaringNode(varBinding);
            if (!(decl instanceof VariableDeclarationFragment) || decl.getLocationInParent() != VariableDeclarationStatement.FRAGMENTS_PROPERTY) {
                return false;
            }
            // Inline Local Variable
            if (binding.getJavaElement() instanceof ILocalVariable && RefactoringAvailabilityTesterCore.isInlineTempAvailable((ILocalVariable) binding.getJavaElement())) {
                InlineTempRefactoring refactoring = new InlineTempRefactoring((VariableDeclaration) decl);
                boolean status;
                try {
                    status = refactoring.checkAllConditions(new NullProgressMonitor()).isOK();
                } catch (Exception e) {
                    // ignore
                    status = false;
                }
                if (status && refactoring.getReferences().length > 0) {
                    String label = CorrectionMessages.QuickAssistProcessor_inline_local_description;
                    int relevance = IProposalRelevance.INLINE_LOCAL;
                    RefactoringCorrectionProposal proposal = new RefactoringCorrectionProposal(label, CodeActionKind.RefactorInline, context.getCompilationUnit(), refactoring, relevance);
                    resultingCollections.add(proposal);
                    return true;
                }
            }
        } else if (binding instanceof IMethodBinding) {
            // Inline Method
            if (RefactoringAvailabilityTesterCore.isInlineMethodAvailable((IMethod) binding.getJavaElement())) {
                InlineMethodRefactoring refactoring = InlineMethodRefactoring.create(context.getCompilationUnit(), context.getASTRoot(), context.getSelectionOffset(), context.getSelectionLength());
                if (refactoring != null && refactoring.checkInitialConditions(new NullProgressMonitor()).isOK()) {
                    CheckConditionsOperation check = new CheckConditionsOperation(refactoring, CheckConditionsOperation.FINAL_CONDITIONS);
                    final CreateChangeOperation create = new CreateChangeOperation(check, RefactoringStatus.FATAL);
                    create.run(new NullProgressMonitor());
                    String label = ActionMessages.InlineMethodRefactoringAction_label;
                    int relevance = IProposalRelevance.INLINE_LOCAL;
                    ChangeCorrectionProposal proposal = new ChangeCorrectionProposal(label, CodeActionKind.RefactorInline, create.getChange(), relevance);
                    resultingCollections.add(proposal);
                    return true;
                }
            }
        }
    } catch (CoreException e) {
        JavaLanguageServerPlugin.log(e);
    }
    return false;
}
Also used : IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) InlineMethodRefactoring(org.eclipse.jdt.internal.corext.refactoring.code.InlineMethodRefactoring) InlineConstantRefactoring(org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring) SimpleName(org.eclipse.jdt.core.dom.SimpleName) IBinding(org.eclipse.jdt.core.dom.IBinding) RefactoringStatus(org.eclipse.ltk.core.refactoring.RefactoringStatus) IVariableBinding(org.eclipse.jdt.core.dom.IVariableBinding) RefactoringCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal) TypeChangeCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.TypeChangeCorrectionProposal) ChangeCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.ChangeCorrectionProposal) CoreException(org.eclipse.core.runtime.CoreException) JavaModelException(org.eclipse.jdt.core.JavaModelException) ILocalVariable(org.eclipse.jdt.core.ILocalVariable) CreateChangeOperation(org.eclipse.ltk.core.refactoring.CreateChangeOperation) CoreException(org.eclipse.core.runtime.CoreException) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) CheckConditionsOperation(org.eclipse.ltk.core.refactoring.CheckConditionsOperation) ASTNode(org.eclipse.jdt.core.dom.ASTNode) InlineTempRefactoring(org.eclipse.jdt.internal.corext.refactoring.code.InlineTempRefactoring) IMethod(org.eclipse.jdt.core.IMethod)

Example 3 with RefactoringCorrectionProposal

use of org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal in project eclipse.jdt.ls by eclipse.

the class RefactorProcessor method getConvertAnonymousToNestedProposal.

public static RefactoringCorrectionProposal getConvertAnonymousToNestedProposal(CodeActionParams params, IInvocationContext context, final ASTNode node, boolean returnAsCommand) throws CoreException {
    String label = CorrectionMessages.QuickAssistProcessor_convert_anonym_to_nested;
    ClassInstanceCreation cic = getClassInstanceCreation(node);
    if (cic == null) {
        return null;
    }
    final AnonymousClassDeclaration anonymTypeDecl = cic.getAnonymousClassDeclaration();
    if (anonymTypeDecl == null || anonymTypeDecl.resolveBinding() == null) {
        return null;
    }
    final ConvertAnonymousToNestedRefactoring refactoring = new ConvertAnonymousToNestedRefactoring(anonymTypeDecl);
    if (!refactoring.checkInitialConditions(new NullProgressMonitor()).isOK()) {
        return null;
    }
    if (returnAsCommand) {
        return new RefactoringCorrectionCommandProposal(label, CodeActionKind.Refactor, context.getCompilationUnit(), IProposalRelevance.CONVERT_ANONYMOUS_TO_NESTED, RefactorProposalUtility.APPLY_REFACTORING_COMMAND_ID, Arrays.asList(CONVERT_ANONYMOUS_CLASS_TO_NESTED_COMMAND, params));
    }
    String extTypeName = ASTNodes.getTypeName(cic.getType());
    ITypeBinding anonymTypeBinding = anonymTypeDecl.resolveBinding();
    String className;
    if (anonymTypeBinding.getInterfaces().length == 0) {
        className = Messages.format(CorrectionMessages.QuickAssistProcessor_name_extension_from_interface, extTypeName);
    } else {
        className = Messages.format(CorrectionMessages.QuickAssistProcessor_name_extension_from_class, extTypeName);
    }
    String[][] existingTypes = ((IType) anonymTypeBinding.getJavaElement()).resolveType(className);
    int i = 1;
    while (existingTypes != null) {
        i++;
        existingTypes = ((IType) anonymTypeBinding.getJavaElement()).resolveType(className + i);
    }
    refactoring.setClassName(i == 1 ? className : className + i);
    LinkedProposalModelCore linkedProposalModel = new LinkedProposalModelCore();
    refactoring.setLinkedProposalModel(linkedProposalModel);
    final ICompilationUnit cu = context.getCompilationUnit();
    RefactoringCorrectionProposal proposal = new RefactoringCorrectionProposal(label, CodeActionKind.Refactor, cu, refactoring, IProposalRelevance.CONVERT_ANONYMOUS_TO_NESTED);
    proposal.setLinkedProposalModel(linkedProposalModel);
    return proposal;
}
Also used : ClassInstanceCreation(org.eclipse.jdt.core.dom.ClassInstanceCreation) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) ConvertAnonymousToNestedRefactoring(org.eclipse.jdt.internal.corext.refactoring.code.ConvertAnonymousToNestedRefactoring) AnonymousClassDeclaration(org.eclipse.jdt.core.dom.AnonymousClassDeclaration) RefactoringCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal) IType(org.eclipse.jdt.core.IType) LinkedProposalModelCore(org.eclipse.jdt.internal.corext.fix.LinkedProposalModelCore) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) RefactoringCorrectionCommandProposal(org.eclipse.jdt.ls.core.internal.text.correction.RefactoringCorrectionCommandProposal)

Example 4 with RefactoringCorrectionProposal

use of org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal in project eclipse.jdt.ls by eclipse.

the class RefactorProposalUtility method getExtractMethodProposal.

private static CUCorrectionProposal getExtractMethodProposal(CodeActionParams params, IInvocationContext context, ASTNode coveringNode, boolean problemsAtLocation, Map formattingOptions, boolean returnAsCommand, boolean inferSelectionSupport) throws CoreException {
    if (!(coveringNode instanceof Expression) && !(coveringNode instanceof Statement) && !(coveringNode instanceof Block)) {
        return null;
    }
    if (coveringNode instanceof Block) {
        List<Statement> statements = ((Block) coveringNode).statements();
        int startIndex = getIndex(context.getSelectionOffset(), statements);
        if (startIndex == -1) {
            return null;
        }
        int endIndex = getIndex(context.getSelectionOffset() + context.getSelectionLength(), statements);
        if (endIndex == -1 || endIndex <= startIndex) {
            return null;
        }
    }
    final ICompilationUnit cu = context.getCompilationUnit();
    final ExtractMethodRefactoring extractMethodRefactoring = new ExtractMethodRefactoring(context.getASTRoot(), context.getSelectionOffset(), context.getSelectionLength(), formattingOptions);
    String uniqueMethodName = getUniqueMethodName(coveringNode, "extracted");
    extractMethodRefactoring.setMethodName(uniqueMethodName);
    String label = CorrectionMessages.QuickAssistProcessor_extractmethod_description;
    int relevance = problemsAtLocation ? IProposalRelevance.EXTRACT_METHOD_ERROR : IProposalRelevance.EXTRACT_METHOD;
    if (context.getSelectionLength() == 0) {
        if (!inferSelectionSupport) {
            return null;
        }
        ASTNode parent = coveringNode;
        while (parent != null && parent instanceof Expression) {
            if (parent instanceof ParenthesizedExpression) {
                parent = parent.getParent();
                continue;
            }
            ExtractMethodRefactoring refactoring = new ExtractMethodRefactoring(context.getASTRoot(), parent.getStartPosition(), parent.getLength(), formattingOptions);
            if (refactoring.checkInferConditions(new NullProgressMonitor()).isOK()) {
                return new CUCorrectionCommandProposal(label, JavaCodeActionKind.REFACTOR_EXTRACT_METHOD, cu, relevance, APPLY_REFACTORING_COMMAND_ID, Arrays.asList(EXTRACT_METHOD_COMMAND, params));
            }
            parent = parent.getParent();
        }
        return null;
    } else if (extractMethodRefactoring.checkInitialConditions(new NullProgressMonitor()).isOK()) {
        if (returnAsCommand) {
            return new CUCorrectionCommandProposal(label, JavaCodeActionKind.REFACTOR_EXTRACT_METHOD, cu, relevance, APPLY_REFACTORING_COMMAND_ID, Arrays.asList(EXTRACT_METHOD_COMMAND, params));
        }
        LinkedProposalModelCore linkedProposalModel = new LinkedProposalModelCore();
        extractMethodRefactoring.setLinkedProposalModel(linkedProposalModel);
        RefactoringCorrectionProposal proposal = new RefactoringCorrectionProposal(label, JavaCodeActionKind.REFACTOR_EXTRACT_METHOD, cu, extractMethodRefactoring, relevance);
        proposal.setLinkedProposalModel(linkedProposalModel);
        return proposal;
    }
    return null;
}
Also used : ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) Statement(org.eclipse.jdt.core.dom.Statement) ExpressionStatement(org.eclipse.jdt.core.dom.ExpressionStatement) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) RefactoringCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal) ExtractMethodRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractMethodRefactoring) LinkedProposalModelCore(org.eclipse.jdt.internal.corext.fix.LinkedProposalModelCore) Expression(org.eclipse.jdt.core.dom.Expression) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) ASTNode(org.eclipse.jdt.core.dom.ASTNode) Block(org.eclipse.jdt.core.dom.Block)

Example 5 with RefactoringCorrectionProposal

use of org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal in project eclipse.jdt.ls by eclipse.

the class RefactorProposalUtility method getExtractConstantProposal.

private static CUCorrectionProposal getExtractConstantProposal(CodeActionParams params, IInvocationContext context, boolean problemsAtLocation, Map formatterOptions, boolean returnAsCommand, boolean inferSelectionSupport) throws CoreException {
    final ICompilationUnit cu = context.getCompilationUnit();
    String label = CorrectionMessages.QuickAssistProcessor_extract_to_constant_description;
    int relevance;
    if (context.getSelectionLength() == 0) {
        relevance = IProposalRelevance.EXTRACT_CONSTANT_ZERO_SELECTION;
    } else if (problemsAtLocation) {
        relevance = IProposalRelevance.EXTRACT_CONSTANT_ERROR;
    } else {
        relevance = IProposalRelevance.EXTRACT_CONSTANT;
    }
    if (inferSelectionSupport && context.getSelectionLength() == 0) {
        ASTNode parent = context.getCoveringNode();
        while (parent != null && parent instanceof Expression) {
            if (parent instanceof ParenthesizedExpression) {
                parent = parent.getParent();
                continue;
            }
            ExtractConstantRefactoring refactoring = new ExtractConstantRefactoring(context.getASTRoot(), parent.getStartPosition(), parent.getLength());
            if (refactoring.checkInitialConditions(new NullProgressMonitor()).isOK()) {
                return new CUCorrectionCommandProposal(label, JavaCodeActionKind.REFACTOR_EXTRACT_CONSTANT, cu, relevance, APPLY_REFACTORING_COMMAND_ID, Arrays.asList(EXTRACT_CONSTANT_COMMAND, params));
            }
            parent = parent.getParent();
        }
        return null;
    }
    ExtractConstantRefactoring extractConstRefactoring = new ExtractConstantRefactoring(context.getASTRoot(), context.getSelectionOffset(), context.getSelectionLength(), formatterOptions);
    if (extractConstRefactoring.checkInitialConditions(new NullProgressMonitor()).isOK()) {
        if (returnAsCommand) {
            return new CUCorrectionCommandProposal(label, JavaCodeActionKind.REFACTOR_EXTRACT_CONSTANT, cu, relevance, APPLY_REFACTORING_COMMAND_ID, Arrays.asList(EXTRACT_CONSTANT_COMMAND, params));
        }
        LinkedProposalModelCore linkedProposalModel = new LinkedProposalModelCore();
        extractConstRefactoring.setLinkedProposalModel(linkedProposalModel);
        extractConstRefactoring.setCheckResultForCompileProblems(false);
        RefactoringCorrectionProposal proposal = new RefactoringCorrectionProposal(label, JavaCodeActionKind.REFACTOR_EXTRACT_CONSTANT, cu, extractConstRefactoring, relevance) {

            @Override
            protected void init(Refactoring refactoring) throws CoreException {
                ExtractConstantRefactoring etr = (ExtractConstantRefactoring) refactoring;
                // expensive
                etr.setConstantName(etr.guessConstantName());
            }
        };
        proposal.setLinkedProposalModel(linkedProposalModel);
        return proposal;
    }
    return null;
}
Also used : ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) LinkedProposalModelCore(org.eclipse.jdt.internal.corext.fix.LinkedProposalModelCore) Expression(org.eclipse.jdt.core.dom.Expression) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) ASTNode(org.eclipse.jdt.core.dom.ASTNode) ExtractConstantRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractConstantRefactoring) RefactoringCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal) Refactoring(org.eclipse.ltk.core.refactoring.Refactoring) IntroduceParameterRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.IntroduceParameterRefactoring) PromoteTempToFieldRefactoring(org.eclipse.jdt.internal.corext.refactoring.code.PromoteTempToFieldRefactoring) ExtractConstantRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractConstantRefactoring) ExtractTempRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractTempRefactoring) ExtractFieldRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractFieldRefactoring) ExtractMethodRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractMethodRefactoring)

Aggregations

RefactoringCorrectionProposal (org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal)13 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)11 ICompilationUnit (org.eclipse.jdt.core.ICompilationUnit)10 LinkedProposalModelCore (org.eclipse.jdt.internal.corext.fix.LinkedProposalModelCore)9 ASTNode (org.eclipse.jdt.core.dom.ASTNode)8 ExtractMethodRefactoring (org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractMethodRefactoring)8 Expression (org.eclipse.jdt.core.dom.Expression)7 IntroduceParameterRefactoring (org.eclipse.jdt.ls.core.internal.corext.refactoring.code.IntroduceParameterRefactoring)7 ExtractConstantRefactoring (org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractConstantRefactoring)6 ExtractTempRefactoring (org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractTempRefactoring)6 Refactoring (org.eclipse.ltk.core.refactoring.Refactoring)6 ParenthesizedExpression (org.eclipse.jdt.core.dom.ParenthesizedExpression)5 PromoteTempToFieldRefactoring (org.eclipse.jdt.internal.corext.refactoring.code.PromoteTempToFieldRefactoring)5 ExtractFieldRefactoring (org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractFieldRefactoring)5 CoreException (org.eclipse.core.runtime.CoreException)2 Block (org.eclipse.jdt.core.dom.Block)2 ExpressionStatement (org.eclipse.jdt.core.dom.ExpressionStatement)2 IBinding (org.eclipse.jdt.core.dom.IBinding)2 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)2 IVariableBinding (org.eclipse.jdt.core.dom.IVariableBinding)2