Search in sources :

Example 1 with LinkedProposalPositionGroupCore

use of org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore in project eclipse.jdt.ls by eclipse.

the class ExtractConstantRefactoring method createConstantDeclaration.

private void createConstantDeclaration() throws CoreException {
    Type type = getConstantType();
    IExpressionFragment fragment = getSelectedExpression();
    Expression initializer = getSelectedExpression().createCopyTarget(fCuRewrite.getASTRewrite(), true);
    AST ast = fCuRewrite.getAST();
    VariableDeclarationFragment variableDeclarationFragment = ast.newVariableDeclarationFragment();
    variableDeclarationFragment.setName(ast.newSimpleName(fConstantName));
    variableDeclarationFragment.setInitializer(initializer);
    FieldDeclaration fieldDeclaration = ast.newFieldDeclaration(variableDeclarationFragment);
    fieldDeclaration.setType(type);
    Modifier.ModifierKeyword accessModifier = Modifier.ModifierKeyword.toKeyword(fVisibility);
    if (accessModifier != null) {
        fieldDeclaration.modifiers().add(ast.newModifier(accessModifier));
    }
    fieldDeclaration.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));
    fieldDeclaration.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
    // boolean createComments = JavaPreferencesSettings.getCodeGenerationSettings(fCu.getJavaProject()).createComments;
    // if (createComments) {
    String comment = CodeGeneration.getFieldComment(fCu, getConstantTypeName(), fConstantName, StubUtility.getLineDelimiterUsed(fCu));
    if (comment != null && comment.length() > 0 && !"/**\n *\n */".equals(comment)) {
        Javadoc doc = (Javadoc) fCuRewrite.getASTRewrite().createStringPlaceholder(comment, ASTNode.JAVADOC);
        fieldDeclaration.setJavadoc(doc);
    }
    // }
    AbstractTypeDeclaration parent = getContainingTypeDeclarationNode();
    ListRewrite listRewrite = fCuRewrite.getASTRewrite().getListRewrite(parent, parent.getBodyDeclarationsProperty());
    TextEditGroup msg = fCuRewrite.createGroupDescription(RefactoringCoreMessages.ExtractConstantRefactoring_declare_constant);
    if (insertFirst()) {
        listRewrite.insertFirst(fieldDeclaration, msg);
    } else {
        listRewrite.insertAfter(fieldDeclaration, getNodeToInsertConstantDeclarationAfter(), msg);
    }
    if (fLinkedProposalModel != null) {
        ASTRewrite rewrite = fCuRewrite.getASTRewrite();
        LinkedProposalPositionGroupCore nameGroup = fLinkedProposalModel.getPositionGroup(KEY_NAME, true);
        nameGroup.addPosition(rewrite.track(variableDeclarationFragment.getName()), true);
        String[] nameSuggestions = guessConstantNames();
        if (nameSuggestions.length > 0 && !nameSuggestions[0].equals(fConstantName)) {
            nameGroup.addProposal(fConstantName, nameSuggestions.length + 1);
        }
        for (int i = 0; i < nameSuggestions.length; i++) {
            nameGroup.addProposal(nameSuggestions[i], nameSuggestions.length - i);
        }
        LinkedProposalPositionGroupCore typeGroup = fLinkedProposalModel.getPositionGroup(KEY_TYPE, true);
        typeGroup.addPosition(rewrite.track(type), true);
        ITypeBinding typeBinding = guessBindingForReference(fragment.getAssociatedExpression());
        if (typeBinding != null) {
            ITypeBinding[] relaxingTypes = ASTResolving.getNarrowingTypes(ast, typeBinding);
            for (int i = 0; i < relaxingTypes.length; i++) {
                typeGroup.addProposal(relaxingTypes[i], fCuRewrite.getCu(), relaxingTypes.length - i);
            }
        }
        boolean isInterface = parent.resolveBinding() != null && parent.resolveBinding().isInterface();
        ModifierCorrectionSubProcessor.installLinkedVisibilityProposals(fLinkedProposalModel, rewrite, fieldDeclaration.modifiers(), isInterface);
    }
}
Also used : AST(org.eclipse.jdt.core.dom.AST) Javadoc(org.eclipse.jdt.core.dom.Javadoc) LinkedProposalPositionGroupCore(org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore) ListRewrite(org.eclipse.jdt.core.dom.rewrite.ListRewrite) FieldDeclaration(org.eclipse.jdt.core.dom.FieldDeclaration) Type(org.eclipse.jdt.core.dom.Type) IExpressionFragment(org.eclipse.jdt.internal.corext.dom.fragments.IExpressionFragment) Expression(org.eclipse.jdt.core.dom.Expression) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) ASTRewrite(org.eclipse.jdt.core.dom.rewrite.ASTRewrite) IExtendedModifier(org.eclipse.jdt.core.dom.IExtendedModifier) Modifier(org.eclipse.jdt.core.dom.Modifier) TextEditGroup(org.eclipse.text.edits.TextEditGroup) AbstractTypeDeclaration(org.eclipse.jdt.core.dom.AbstractTypeDeclaration)

Example 2 with LinkedProposalPositionGroupCore

use of org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore in project eclipse.jdt.ls by eclipse.

the class ExtractMethodRefactoring method createChange.

@Override
public Change createChange(IProgressMonitor pm) throws CoreException {
    if (fMethodName == null) {
        return null;
    }
    // $NON-NLS-1$
    pm.beginTask("", 2);
    try {
        fAnalyzer.aboutToCreateChange();
        BodyDeclaration declaration = fAnalyzer.getEnclosingBodyDeclaration();
        fRewriter = ASTRewrite.create(declaration.getAST());
        final CompilationUnitChange result = new CompilationUnitChange(RefactoringCoreMessages.ExtractMethodRefactoring_change_name, fCUnit);
        result.setSaveMode(TextFileChange.KEEP_SAVE_STATE);
        result.setDescriptor(new RefactoringChangeDescriptor(getRefactoringDescriptor()));
        MultiTextEdit root = new MultiTextEdit();
        result.setEdit(root);
        ASTNode[] selectedNodes = fAnalyzer.getSelectedNodes();
        fRewriter.setTargetSourceRangeComputer(new SelectionAwareSourceRangeComputer(selectedNodes, fCUnit.getBuffer(), fSelectionStart, fSelectionLength));
        TextEditGroup substituteDesc = new TextEditGroup(Messages.format(RefactoringCoreMessages.ExtractMethodRefactoring_substitute_with_call, BasicElementLabels.getJavaElementName(fMethodName)));
        result.addTextEditGroup(substituteDesc);
        MethodDeclaration mm = createNewMethod(selectedNodes, fCUnit.findRecommendedLineSeparator(), substituteDesc);
        if (fLinkedProposalModel != null) {
            LinkedProposalPositionGroupCore typeGroup = fLinkedProposalModel.getPositionGroup(KEY_TYPE, true);
            typeGroup.addPosition(fRewriter.track(mm.getReturnType2()), false);
            ITypeBinding typeBinding = fAnalyzer.getReturnTypeBinding();
            if (typeBinding != null) {
                ITypeBinding[] relaxingTypes = ASTResolving.getNarrowingTypes(fAST, typeBinding);
                for (int i = 0; i < relaxingTypes.length; i++) {
                    typeGroup.addProposal(relaxingTypes[i], fCUnit, relaxingTypes.length - i);
                }
            }
            LinkedProposalPositionGroupCore nameGroup = fLinkedProposalModel.getPositionGroup(KEY_NAME, true);
            nameGroup.addPosition(fRewriter.track(mm.getName()), false);
            ModifierCorrectionSubProcessor.installLinkedVisibilityProposals(fLinkedProposalModel, fRewriter, mm.modifiers(), false);
        }
        TextEditGroup insertDesc = new TextEditGroup(Messages.format(RefactoringCoreMessages.ExtractMethodRefactoring_add_method, BasicElementLabels.getJavaElementName(fMethodName)));
        result.addTextEditGroup(insertDesc);
        if (fDestination == ASTResolving.findParentType(declaration.getParent())) {
            ChildListPropertyDescriptor desc = (ChildListPropertyDescriptor) declaration.getLocationInParent();
            ListRewrite container = fRewriter.getListRewrite(declaration.getParent(), desc);
            container.insertAfter(mm, declaration, insertDesc);
        } else {
            BodyDeclarationRewrite container = BodyDeclarationRewrite.create(fRewriter, fDestination);
            container.insert(mm, insertDesc);
        }
        replaceDuplicates(result, mm.getModifiers());
        replaceBranches(result);
        if (fImportRewriter.hasRecordedChanges()) {
            TextEdit edit = fImportRewriter.rewriteImports(null);
            root.addChild(edit);
            result.addTextEditGroup(new TextEditGroup(RefactoringCoreMessages.ExtractMethodRefactoring_organize_imports, new TextEdit[] { edit }));
        }
        try {
            Map formatter = this.fFormatterOptions == null ? fCUnit.getOptions(true) : this.fFormatterOptions;
            IDocument document = new Document(fCUnit.getSource());
            root.addChild(fRewriter.rewriteAST(document, formatter));
        } catch (JavaModelException e) {
            root.addChild(fRewriter.rewriteAST());
        }
        return result;
    } finally {
        pm.done();
    }
}
Also used : SelectionAwareSourceRangeComputer(org.eclipse.jdt.ls.core.internal.corext.refactoring.util.SelectionAwareSourceRangeComputer) JavaModelException(org.eclipse.jdt.core.JavaModelException) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) LinkedProposalPositionGroupCore(org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore) ListRewrite(org.eclipse.jdt.core.dom.rewrite.ListRewrite) Document(org.eclipse.jface.text.Document) IDocument(org.eclipse.jface.text.IDocument) RefactoringChangeDescriptor(org.eclipse.ltk.core.refactoring.RefactoringChangeDescriptor) ChildListPropertyDescriptor(org.eclipse.jdt.core.dom.ChildListPropertyDescriptor) BodyDeclarationRewrite(org.eclipse.jdt.internal.corext.dom.BodyDeclarationRewrite) MultiTextEdit(org.eclipse.text.edits.MultiTextEdit) TextEdit(org.eclipse.text.edits.TextEdit) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) ASTNode(org.eclipse.jdt.core.dom.ASTNode) BodyDeclaration(org.eclipse.jdt.core.dom.BodyDeclaration) TextEditGroup(org.eclipse.text.edits.TextEditGroup) Map(java.util.Map) HashMap(java.util.HashMap) MultiTextEdit(org.eclipse.text.edits.MultiTextEdit) IDocument(org.eclipse.jface.text.IDocument) CompilationUnitChange(org.eclipse.jdt.core.refactoring.CompilationUnitChange)

Example 3 with LinkedProposalPositionGroupCore

use of org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore in project eclipse.jdt.ls by eclipse.

the class ExtractMethodRefactoring method createCallNodes.

// ---- Code generation -----------------------------------------------------------------------
private ASTNode[] createCallNodes(SnippetFinder.Match duplicate, int modifiers) {
    List<ASTNode> result = new ArrayList<>(2);
    IVariableBinding[] locals = fAnalyzer.getCallerLocals();
    for (int i = 0; i < locals.length; i++) {
        result.add(createDeclaration(locals[i], null));
    }
    MethodInvocation invocation = fAST.newMethodInvocation();
    invocation.setName(fAST.newSimpleName(fMethodName));
    ASTNode typeNode = ASTResolving.findParentType(fAnalyzer.getEnclosingBodyDeclaration());
    RefactoringStatus status = new RefactoringStatus();
    while (fDestination != typeNode) {
        fAnalyzer.checkInput(status, fMethodName, typeNode);
        if (!status.isOK()) {
            SimpleName destinationTypeName = fAST.newSimpleName(ASTNodes.getEnclosingType(fDestination).getName());
            if ((modifiers & Modifier.STATIC) == 0) {
                ThisExpression thisExpression = fAST.newThisExpression();
                thisExpression.setQualifier(destinationTypeName);
                invocation.setExpression(thisExpression);
            } else {
                invocation.setExpression(destinationTypeName);
            }
            break;
        }
        typeNode = typeNode.getParent();
    }
    List<Expression> arguments = invocation.arguments();
    for (int i = 0; i < fParameterInfos.size(); i++) {
        ParameterInfo parameter = fParameterInfos.get(i);
        arguments.add(ASTNodeFactory.newName(fAST, getMappedName(duplicate, parameter)));
    }
    if (fLinkedProposalModel != null) {
        LinkedProposalPositionGroupCore nameGroup = fLinkedProposalModel.getPositionGroup(KEY_NAME, true);
        nameGroup.addPosition(fRewriter.track(invocation.getName()), true);
    }
    ASTNode call;
    int returnKind = fAnalyzer.getReturnKind();
    switch(returnKind) {
        case ExtractMethodAnalyzer.ACCESS_TO_LOCAL:
            IVariableBinding binding = fAnalyzer.getReturnLocal();
            if (binding != null) {
                VariableDeclarationStatement decl = createDeclaration(getMappedBinding(duplicate, binding), invocation);
                call = decl;
            } else {
                Assignment assignment = fAST.newAssignment();
                assignment.setLeftHandSide(ASTNodeFactory.newName(fAST, getMappedBinding(duplicate, fAnalyzer.getReturnValue()).getName()));
                assignment.setRightHandSide(invocation);
                call = assignment;
            }
            break;
        case ExtractMethodAnalyzer.RETURN_STATEMENT_VALUE:
            ReturnStatement rs = fAST.newReturnStatement();
            rs.setExpression(invocation);
            call = rs;
            break;
        default:
            call = invocation;
    }
    if (call instanceof Expression && !fAnalyzer.isExpressionSelected()) {
        call = fAST.newExpressionStatement((Expression) call);
    }
    result.add(call);
    // return;
    if (returnKind == ExtractMethodAnalyzer.RETURN_STATEMENT_VOID && !fAnalyzer.isLastStatementSelected()) {
        result.add(fAST.newReturnStatement());
    }
    return result.toArray(new ASTNode[result.size()]);
}
Also used : SimpleName(org.eclipse.jdt.core.dom.SimpleName) ArrayList(java.util.ArrayList) RefactoringStatus(org.eclipse.ltk.core.refactoring.RefactoringStatus) LinkedProposalPositionGroupCore(org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore) MethodInvocation(org.eclipse.jdt.core.dom.MethodInvocation) ParameterInfo(org.eclipse.jdt.ls.core.internal.corext.refactoring.ParameterInfo) IVariableBinding(org.eclipse.jdt.core.dom.IVariableBinding) Assignment(org.eclipse.jdt.core.dom.Assignment) ThisExpression(org.eclipse.jdt.core.dom.ThisExpression) ThisExpression(org.eclipse.jdt.core.dom.ThisExpression) Expression(org.eclipse.jdt.core.dom.Expression) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) ASTNode(org.eclipse.jdt.core.dom.ASTNode) ReturnStatement(org.eclipse.jdt.core.dom.ReturnStatement) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement)

Example 4 with LinkedProposalPositionGroupCore

use of org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore in project eclipse.jdt.ls by eclipse.

the class IntroduceParameterRefactoring method replaceSelectedExpression.

private void replaceSelectedExpression(CompilationUnitRewrite cuRewrite) {
    if (!fSourceCU.equals(cuRewrite.getCu())) {
        return;
    // TODO: do for all methodDeclarations and replace matching fragments?
    }
    // cannot use fSelectedExpression here, since it could be from another AST (if method was replaced by overridden):
    Expression expression = (Expression) NodeFinder.perform(cuRewrite.getRoot(), fSelectedExpression.getStartPosition(), fSelectedExpression.getLength());
    ASTNode newExpression = cuRewrite.getRoot().getAST().newSimpleName(fParameter.getNewName());
    String description = RefactoringCoreMessages.IntroduceParameterRefactoring_replace;
    cuRewrite.getASTRewrite().replace(expression.getParent() instanceof ParenthesizedExpression ? expression.getParent() : expression, newExpression, cuRewrite.createGroupDescription(description));
    if (fLinkedProposalModel != null) {
        LinkedProposalPositionGroupCore nameGroup = fLinkedProposalModel.getPositionGroup(fParameter.getNewName(), true);
        nameGroup.addPosition(cuRewrite.getASTRewrite().track(newExpression), false);
    }
}
Also used : ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) Expression(org.eclipse.jdt.core.dom.Expression) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) ASTNode(org.eclipse.jdt.core.dom.ASTNode) LinkedProposalPositionGroupCore(org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore)

Example 5 with LinkedProposalPositionGroupCore

use of org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore in project eclipse.jdt.ls by eclipse.

the class ModifierChangeCorrectionProposal method getRewrite.

@Override
protected ASTRewrite getRewrite() throws CoreException {
    CompilationUnit astRoot = ASTResolving.findParentCompilationUnit(fNode);
    ASTNode boundNode = astRoot.findDeclaringNode(fBinding);
    ASTNode declNode = null;
    if (boundNode != null) {
        // is same CU
        declNode = boundNode;
    } else {
        // setSelectionDescription(selectionDescription);
        CompilationUnit newRoot = ASTResolving.createQuickFixAST(getCompilationUnit(), null);
        declNode = newRoot.findDeclaringNode(fBinding.getKey());
    }
    if (declNode != null) {
        AST ast = declNode.getAST();
        ASTRewrite rewrite = ASTRewrite.create(ast);
        if (declNode.getNodeType() == ASTNode.VARIABLE_DECLARATION_FRAGMENT) {
            VariableDeclarationFragment fragment = (VariableDeclarationFragment) declNode;
            ASTNode parent = declNode.getParent();
            if (parent instanceof FieldDeclaration) {
                FieldDeclaration fieldDecl = (FieldDeclaration) parent;
                if (fieldDecl.fragments().size() > 1 && (fieldDecl.getParent() instanceof AbstractTypeDeclaration)) {
                    // split
                    VariableDeclarationRewrite.rewriteModifiers(fieldDecl, new VariableDeclarationFragment[] { fragment }, fIncludedModifiers, fExcludedModifiers, rewrite, null);
                    return rewrite;
                }
            } else if (parent instanceof VariableDeclarationStatement) {
                VariableDeclarationStatement varDecl = (VariableDeclarationStatement) parent;
                if (varDecl.fragments().size() > 1 && (varDecl.getParent() instanceof Block)) {
                    // split
                    VariableDeclarationRewrite.rewriteModifiers(varDecl, new VariableDeclarationFragment[] { fragment }, fIncludedModifiers, fExcludedModifiers, rewrite, null);
                    return rewrite;
                }
            } else if (parent instanceof VariableDeclarationExpression) {
            // can't separate
            }
            declNode = parent;
        } else if (declNode.getNodeType() == ASTNode.METHOD_DECLARATION) {
            MethodDeclaration methodDecl = (MethodDeclaration) declNode;
            if (!methodDecl.isConstructor()) {
                IMethodBinding methodBinding = methodDecl.resolveBinding();
                if (methodDecl.getBody() == null && methodBinding != null && Modifier.isAbstract(methodBinding.getModifiers()) && Modifier.isStatic(fIncludedModifiers)) {
                    // add body
                    ICompilationUnit unit = getCompilationUnit();
                    String delimiter = unit.findRecommendedLineSeparator();
                    // $NON-NLS-1$
                    String bodyStatement = "";
                    Block body = ast.newBlock();
                    rewrite.set(methodDecl, MethodDeclaration.BODY_PROPERTY, body, null);
                    Type returnType = methodDecl.getReturnType2();
                    if (returnType != null) {
                        Expression expression = ASTNodeFactory.newDefaultExpression(ast, returnType, methodDecl.getExtraDimensions());
                        if (expression != null) {
                            ReturnStatement returnStatement = ast.newReturnStatement();
                            returnStatement.setExpression(expression);
                            bodyStatement = ASTNodes.asFormattedString(returnStatement, 0, delimiter, unit.getOptions(true));
                        }
                    }
                    String placeHolder = CodeGeneration.getMethodBodyContent(unit, methodBinding.getDeclaringClass().getName(), methodBinding.getName(), false, bodyStatement, delimiter);
                    if (placeHolder != null) {
                        ReturnStatement todoNode = (ReturnStatement) rewrite.createStringPlaceholder(placeHolder, ASTNode.RETURN_STATEMENT);
                        body.statements().add(todoNode);
                    }
                }
            }
        }
        ModifierRewrite listRewrite = ModifierRewrite.create(rewrite, declNode);
        PositionInformation trackedDeclNode = listRewrite.setModifiers(fIncludedModifiers, fExcludedModifiers, null);
        // $NON-NLS-1$
        LinkedProposalPositionGroupCore positionGroup = new LinkedProposalPositionGroupCore("group");
        positionGroup.addPosition(trackedDeclNode);
        getLinkedProposalModel().addPositionGroup(positionGroup);
        if (boundNode != null) {
            // only set end position if in same CU
            setEndPosition(rewrite.track(fNode));
        }
        return rewrite;
    }
    return null;
}
Also used : ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) CompilationUnit(org.eclipse.jdt.core.dom.CompilationUnit) IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) AST(org.eclipse.jdt.core.dom.AST) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) ModifierRewrite(org.eclipse.jdt.internal.corext.dom.ModifierRewrite) VariableDeclarationExpression(org.eclipse.jdt.core.dom.VariableDeclarationExpression) PositionInformation(org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore.PositionInformation) LinkedProposalPositionGroupCore(org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore) FieldDeclaration(org.eclipse.jdt.core.dom.FieldDeclaration) Type(org.eclipse.jdt.core.dom.Type) Expression(org.eclipse.jdt.core.dom.Expression) VariableDeclarationExpression(org.eclipse.jdt.core.dom.VariableDeclarationExpression) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) ASTNode(org.eclipse.jdt.core.dom.ASTNode) ReturnStatement(org.eclipse.jdt.core.dom.ReturnStatement) ASTRewrite(org.eclipse.jdt.core.dom.rewrite.ASTRewrite) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) Block(org.eclipse.jdt.core.dom.Block) AbstractTypeDeclaration(org.eclipse.jdt.core.dom.AbstractTypeDeclaration)

Aggregations

LinkedProposalPositionGroupCore (org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore)10 Expression (org.eclipse.jdt.core.dom.Expression)6 AST (org.eclipse.jdt.core.dom.AST)5 ASTNode (org.eclipse.jdt.core.dom.ASTNode)5 ASTRewrite (org.eclipse.jdt.core.dom.rewrite.ASTRewrite)5 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)4 ParenthesizedExpression (org.eclipse.jdt.core.dom.ParenthesizedExpression)4 Type (org.eclipse.jdt.core.dom.Type)4 VariableDeclarationExpression (org.eclipse.jdt.core.dom.VariableDeclarationExpression)3 VariableDeclarationFragment (org.eclipse.jdt.core.dom.VariableDeclarationFragment)3 VariableDeclarationStatement (org.eclipse.jdt.core.dom.VariableDeclarationStatement)3 Map (java.util.Map)2 ICompilationUnit (org.eclipse.jdt.core.ICompilationUnit)2 AbstractTypeDeclaration (org.eclipse.jdt.core.dom.AbstractTypeDeclaration)2 CastExpression (org.eclipse.jdt.core.dom.CastExpression)2 ClassInstanceCreation (org.eclipse.jdt.core.dom.ClassInstanceCreation)2 FieldDeclaration (org.eclipse.jdt.core.dom.FieldDeclaration)2 LambdaExpression (org.eclipse.jdt.core.dom.LambdaExpression)2 MethodDeclaration (org.eclipse.jdt.core.dom.MethodDeclaration)2 PostfixExpression (org.eclipse.jdt.core.dom.PostfixExpression)2