Search in sources :

Example 51 with FieldDeclaration

use of org.eclipse.jdt.core.dom.FieldDeclaration in project eclipse.jdt.ls by eclipse.

the class MoveHandler method moveStaticMember.

private static RefactorWorkspaceEdit moveStaticMember(CodeActionParams params, String destinationTypeName, IProgressMonitor monitor) {
    final ICompilationUnit unit = JDTUtils.resolveCompilationUnit(params.getTextDocument().getUri());
    if (unit == null) {
        return new RefactorWorkspaceEdit("Failed to move static member because cannot find the compilation unit associated with " + params.getTextDocument().getUri());
    }
    BodyDeclaration bodyDeclaration = getSelectedMemberDeclaration(unit, params);
    List<IJavaElement> elements = new ArrayList<>();
    if (bodyDeclaration instanceof MethodDeclaration) {
        elements.add(((MethodDeclaration) bodyDeclaration).resolveBinding().getJavaElement());
    } else if (bodyDeclaration instanceof FieldDeclaration) {
        for (Object fragment : ((FieldDeclaration) bodyDeclaration).fragments()) {
            elements.add(((VariableDeclarationFragment) fragment).resolveBinding().getJavaElement());
        }
    } else if (bodyDeclaration instanceof AbstractTypeDeclaration) {
        elements.add(((AbstractTypeDeclaration) bodyDeclaration).resolveBinding().getJavaElement());
    }
    IMember[] members = elements.stream().filter(element -> element instanceof IMember).map(element -> (IMember) element).toArray(IMember[]::new);
    return moveStaticMember(members, destinationTypeName, monitor);
}
Also used : ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) RefactoringAvailabilityTesterCore(org.eclipse.jdt.internal.corext.refactoring.RefactoringAvailabilityTesterCore) Arrays(java.util.Arrays) IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) AbstractTypeDeclaration(org.eclipse.jdt.core.dom.AbstractTypeDeclaration) CreateChangeOperation(org.eclipse.ltk.core.refactoring.CreateChangeOperation) ProjectUtils(org.eclipse.jdt.ls.core.internal.ProjectUtils) CoreException(org.eclipse.core.runtime.CoreException) StringUtils(org.apache.commons.lang3.StringUtils) IPackageFragment(org.eclipse.jdt.core.IPackageFragment) Refactoring(org.eclipse.ltk.core.refactoring.Refactoring) JavaMoveProcessor(org.eclipse.jdt.ls.core.internal.corext.refactoring.reorg.JavaMoveProcessor) OperationCanceledException(org.eclipse.core.runtime.OperationCanceledException) DiagnosticsHelper(org.eclipse.jdt.ls.core.internal.corrections.DiagnosticsHelper) IPath(org.eclipse.core.runtime.IPath) Gson(com.google.gson.Gson) Change(org.eclipse.ltk.core.refactoring.Change) URI(java.net.URI) IClasspathEntry(org.eclipse.jdt.core.IClasspathEntry) ASTNode(org.eclipse.jdt.core.dom.ASTNode) JDTUtils(org.eclipse.jdt.ls.core.internal.JDTUtils) IJavaProject(org.eclipse.jdt.core.IJavaProject) Collection(java.util.Collection) Set(java.util.Set) IReorgDestination(org.eclipse.jdt.internal.corext.refactoring.reorg.IReorgDestination) BodyDeclaration(org.eclipse.jdt.core.dom.BodyDeclaration) Collectors(java.util.stream.Collectors) IConfirmQuery(org.eclipse.jdt.internal.corext.refactoring.reorg.IConfirmQuery) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) Objects(java.util.Objects) IType(org.eclipse.jdt.core.IType) List(java.util.List) Stream(java.util.stream.Stream) ReorgPolicyFactory(org.eclipse.jdt.ls.core.internal.corext.refactoring.reorg.ReorgPolicyFactory) InnovationContext(org.eclipse.jdt.ls.core.internal.corrections.InnovationContext) Optional(java.util.Optional) ChangeUtil(org.eclipse.jdt.ls.core.internal.ChangeUtil) MoveInstanceMethodProcessor(org.eclipse.jdt.internal.corext.refactoring.structure.MoveInstanceMethodProcessor) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) ResourcesPlugin(org.eclipse.core.resources.ResourcesPlugin) RefactorWorkspaceEdit(org.eclipse.jdt.ls.core.internal.handlers.GetRefactorEditHandler.RefactorWorkspaceEdit) JavaModelException(org.eclipse.jdt.core.JavaModelException) SubMonitor(org.eclipse.core.runtime.SubMonitor) CodeGenerationSettings(org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings) MoveStaticMembersProcessor(org.eclipse.jdt.internal.corext.refactoring.structure.MoveStaticMembersProcessor) IMember(org.eclipse.jdt.core.IMember) CheckConditionsOperation(org.eclipse.ltk.core.refactoring.CheckConditionsOperation) MoveRefactoring(org.eclipse.ltk.core.refactoring.participants.MoveRefactoring) ArrayList(java.util.ArrayList) SymbolInformation(org.eclipse.lsp4j.SymbolInformation) IContainer(org.eclipse.core.resources.IContainer) CodeActionParams(org.eclipse.lsp4j.CodeActionParams) ProjectsManager(org.eclipse.jdt.ls.core.internal.managers.ProjectsManager) IProject(org.eclipse.core.resources.IProject) JdtFlags(org.eclipse.jdt.internal.corext.util.JdtFlags) RefactoringStatus(org.eclipse.ltk.core.refactoring.RefactoringStatus) IVariableBinding(org.eclipse.jdt.core.dom.IVariableBinding) ReorgDestinationFactory(org.eclipse.jdt.ls.core.internal.corext.refactoring.reorg.ReorgDestinationFactory) LinkedHashSet(java.util.LinkedHashSet) IPackageFragmentRoot(org.eclipse.jdt.core.IPackageFragmentRoot) ResourceUtils(org.eclipse.jdt.ls.core.internal.ResourceUtils) JSONUtility(org.eclipse.jdt.ls.core.internal.JSONUtility) JavaCore(org.eclipse.jdt.core.JavaCore) LspVariableBinding(org.eclipse.jdt.ls.core.internal.handlers.JdtDomModels.LspVariableBinding) JavaLanguageServerPlugin(org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin) PreferenceManager(org.eclipse.jdt.ls.core.internal.preferences.PreferenceManager) ReorgUtils(org.eclipse.jdt.ls.core.internal.corext.refactoring.reorg.ReorgUtils) IJavaElement(org.eclipse.jdt.core.IJavaElement) WorkspaceEdit(org.eclipse.lsp4j.WorkspaceEdit) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) IReorgQueries(org.eclipse.jdt.internal.corext.refactoring.reorg.IReorgQueries) IResource(org.eclipse.core.resources.IResource) IMethod(org.eclipse.jdt.core.IMethod) MoveInnerToTopRefactoring(org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring) FieldDeclaration(org.eclipse.jdt.core.dom.FieldDeclaration) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) Comparator(java.util.Comparator) IMovePolicy(org.eclipse.jdt.internal.corext.refactoring.reorg.IReorgPolicy.IMovePolicy) ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) IJavaElement(org.eclipse.jdt.core.IJavaElement) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) ArrayList(java.util.ArrayList) IMember(org.eclipse.jdt.core.IMember) FieldDeclaration(org.eclipse.jdt.core.dom.FieldDeclaration) RefactorWorkspaceEdit(org.eclipse.jdt.ls.core.internal.handlers.GetRefactorEditHandler.RefactorWorkspaceEdit) BodyDeclaration(org.eclipse.jdt.core.dom.BodyDeclaration) AbstractTypeDeclaration(org.eclipse.jdt.core.dom.AbstractTypeDeclaration)

Example 52 with FieldDeclaration

use of org.eclipse.jdt.core.dom.FieldDeclaration in project eclipse.jdt.ls by eclipse.

the class MoveHandler method getSelectedMemberDeclaration.

private static BodyDeclaration getSelectedMemberDeclaration(ICompilationUnit unit, CodeActionParams params) {
    int start = DiagnosticsHelper.getStartOffset(unit, params.getRange());
    int end = DiagnosticsHelper.getEndOffset(unit, params.getRange());
    InnovationContext context = new InnovationContext(unit, start, end - start);
    context.setASTRoot(CodeActionHandler.getASTRoot(unit));
    ASTNode node = context.getCoveredNode();
    if (node == null) {
        node = context.getCoveringNode();
    }
    while (node != null && !(node instanceof BodyDeclaration)) {
        node = node.getParent();
    }
    if (node != null && (node instanceof MethodDeclaration || node instanceof FieldDeclaration || node instanceof AbstractTypeDeclaration) && JdtFlags.isStatic((BodyDeclaration) node)) {
        return (BodyDeclaration) node;
    }
    return null;
}
Also used : MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) ASTNode(org.eclipse.jdt.core.dom.ASTNode) BodyDeclaration(org.eclipse.jdt.core.dom.BodyDeclaration) InnovationContext(org.eclipse.jdt.ls.core.internal.corrections.InnovationContext) FieldDeclaration(org.eclipse.jdt.core.dom.FieldDeclaration) AbstractTypeDeclaration(org.eclipse.jdt.core.dom.AbstractTypeDeclaration)

Example 53 with FieldDeclaration

use of org.eclipse.jdt.core.dom.FieldDeclaration in project eclipse.jdt.ls by eclipse.

the class RefactorProposalUtility method getDisplayName.

private static String getDisplayName(ASTNode declaration) {
    if (declaration instanceof MethodDeclaration) {
        IMethodBinding method = ((MethodDeclaration) declaration).resolveBinding();
        if (method != null) {
            String name = method.getName();
            String[] parameters = Stream.of(method.getParameterTypes()).map(type -> type.getName()).toArray(String[]::new);
            return name + "(" + String.join(",", parameters) + ")";
        }
    } else if (declaration instanceof FieldDeclaration) {
        List<String> fieldNames = new ArrayList<>();
        for (Object fragment : ((FieldDeclaration) declaration).fragments()) {
            IVariableBinding variable = ((VariableDeclarationFragment) fragment).resolveBinding();
            if (variable != null) {
                fieldNames.add(variable.getName());
            }
        }
        return String.join(",", fieldNames);
    } else if (declaration instanceof AbstractTypeDeclaration) {
        ITypeBinding type = ((AbstractTypeDeclaration) declaration).resolveBinding();
        if (type != null) {
            return type.getName();
        }
    }
    return null;
}
Also used : IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) ICompilationUnit(org.eclipse.jdt.core.ICompilationUnit) RefactoringAvailabilityTesterCore(org.eclipse.jdt.internal.corext.refactoring.RefactoringAvailabilityTesterCore) Messages(org.eclipse.jdt.ls.core.internal.Messages) Arrays(java.util.Arrays) IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) AbstractTypeDeclaration(org.eclipse.jdt.core.dom.AbstractTypeDeclaration) CoreException(org.eclipse.core.runtime.CoreException) Refactoring(org.eclipse.ltk.core.refactoring.Refactoring) AnonymousClassDeclaration(org.eclipse.jdt.core.dom.AnonymousClassDeclaration) Statement(org.eclipse.jdt.core.dom.Statement) Expression(org.eclipse.jdt.core.dom.Expression) Map(java.util.Map) AssignToVariableAssistProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.AssignToVariableAssistProposal) RefactoringCoreMessages(org.eclipse.jdt.ls.core.internal.corext.refactoring.RefactoringCoreMessages) SimpleName(org.eclipse.jdt.core.dom.SimpleName) Bindings(org.eclipse.jdt.internal.corext.dom.Bindings) RefactoringCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.RefactoringCorrectionProposal) ASTNodes(org.eclipse.jdt.internal.corext.dom.ASTNodes) ASTNode(org.eclipse.jdt.core.dom.ASTNode) JDTUtils(org.eclipse.jdt.ls.core.internal.JDTUtils) IProposalRelevance(org.eclipse.jdt.ls.core.internal.corrections.proposals.IProposalRelevance) Block(org.eclipse.jdt.core.dom.Block) IntroduceParameterRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.IntroduceParameterRefactoring) IBinding(org.eclipse.jdt.core.dom.IBinding) BodyDeclaration(org.eclipse.jdt.core.dom.BodyDeclaration) VariableDeclaration(org.eclipse.jdt.core.dom.VariableDeclaration) IJavaModelMarker(org.eclipse.jdt.core.IJavaModelMarker) IType(org.eclipse.jdt.core.IType) IInvocationContext(org.eclipse.jdt.ls.core.internal.corrections.IInvocationContext) IProblemLocationCore(org.eclipse.jdt.internal.ui.text.correction.IProblemLocationCore) List(java.util.List) Stream(java.util.stream.Stream) PromoteTempToFieldRefactoring(org.eclipse.jdt.internal.corext.refactoring.code.PromoteTempToFieldRefactoring) IProblem(org.eclipse.jdt.core.compiler.IProblem) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) ExpressionStatement(org.eclipse.jdt.core.dom.ExpressionStatement) IField(org.eclipse.jdt.core.IField) LinkedProposalModelCore(org.eclipse.jdt.internal.corext.fix.LinkedProposalModelCore) JavaModelException(org.eclipse.jdt.core.JavaModelException) JavaCodeActionKind(org.eclipse.jdt.ls.core.internal.JavaCodeActionKind) IMember(org.eclipse.jdt.core.IMember) CorrectionMessages(org.eclipse.jdt.ls.core.internal.corrections.CorrectionMessages) ExtractConstantRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractConstantRefactoring) ArrayList(java.util.ArrayList) ExtractTempRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractTempRefactoring) CodeActionParams(org.eclipse.lsp4j.CodeActionParams) JdtFlags(org.eclipse.jdt.internal.corext.util.JdtFlags) IVariableBinding(org.eclipse.jdt.core.dom.IVariableBinding) ASTResolving(org.eclipse.jdt.internal.core.manipulation.dom.ASTResolving) RefactoringAvailabilityTester(org.eclipse.jdt.ls.core.internal.corext.refactoring.RefactoringAvailabilityTester) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) TypeDeclaration(org.eclipse.jdt.core.dom.TypeDeclaration) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) ExtractFieldRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractFieldRefactoring) ExtractMethodRefactoring(org.eclipse.jdt.ls.core.internal.corext.refactoring.code.ExtractMethodRefactoring) CUCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.CUCorrectionProposal) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) IMethod(org.eclipse.jdt.core.IMethod) CodeActionKind(org.eclipse.lsp4j.CodeActionKind) FieldDeclaration(org.eclipse.jdt.core.dom.FieldDeclaration) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) Collections(java.util.Collections) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) List(java.util.List) ArrayList(java.util.ArrayList) IVariableBinding(org.eclipse.jdt.core.dom.IVariableBinding) FieldDeclaration(org.eclipse.jdt.core.dom.FieldDeclaration) AbstractTypeDeclaration(org.eclipse.jdt.core.dom.AbstractTypeDeclaration)

Example 54 with FieldDeclaration

use of org.eclipse.jdt.core.dom.FieldDeclaration in project eap-additional-testsuite by jboss-set.

the class SourceParser method parse.

public static void parse(String str) throws IOException {
    fields.clear();
    methods.clear();
    imports.clear();
    types.clear();
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setSource(readFileToString(str).toCharArray());
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    final CompilationUnit cu = (CompilationUnit) parser.createAST(null);
    cu.accept(new ASTVisitor() {

        Set names = new HashSet();

        int blockCount = 0;

        public boolean visit(FieldDeclaration node) {
            String name = node.fragments().get(0).toString().split("=")[0].trim();
            String type = node.getType().toString();
            if (!node.modifiers().toString().contains("private")) {
                fields.put(name, type);
            }
            ArrayList<String> types0 = new ArrayList<>();
            String type2 = null;
            do {
                if (type.contains("[")) {
                    type = type.replaceAll("\\[\\]", "");
                    if (type.contains("[")) {
                        type = type.substring(0, type.indexOf("["));
                    }
                }
                if (type.contains("<")) {
                    String type3 = type;
                    type = type.substring(0, type.indexOf("<"));
                    if (type3.substring(type3.indexOf("<") + 1).startsWith("<>") || type3.substring(type.indexOf("<") + 1).startsWith("<T>")) {
                        type2 = null;
                    } else if (type3.indexOf("<") >= 0 && type3.indexOf(">") >= 0 && type3.indexOf("<") < type3.indexOf(">")) {
                        type2 = type3.substring(type3.indexOf("<") + 1, type3.lastIndexOf(">"));
                        if (type2.contains(",")) {
                            if (type2.substring(0, type2.indexOf(",")).contains("<")) {
                                types0.add(type2);
                            } else {
                                types0.add(type2.substring(0, type2.indexOf(",")));
                                types0.add(type2.substring(type2.indexOf(",") + 1));
                            }
                        } else {
                            types0.add(type2);
                        }
                    }
                }
                types.addAll(Arrays.asList(type.split(" extends ")));
                if (types0.size() != 0) {
                    type = types0.remove(0);
                } else {
                    type = null;
                }
            } while (type != null);
            return true;
        }

        public boolean visit(MethodDeclaration node) {
            if (node.getName().getIdentifier() != null) {
                MethodInfo2 mf = new MethodInfo2();
                mf.name = node.getName().toString();
                if (node.getReturnType2() != null) {
                    mf.returnType = node.getReturnType2().toString();
                } else {
                    mf.returnType = null;
                }
                List params = node.parameters();
                ArrayList<String> types = new ArrayList<>();
                // System.out.println("params : " + params.toString());
                for (Object s : params) {
                    String type = ((SingleVariableDeclaration) s).getType().toString();
                    if (type.startsWith("class "))
                        type = type.replaceFirst("class ", "");
                    types.add(type);
                }
                // System.out.println("sourceTypes : " + types.toString());
                mf.paramTypes = types;
                methods.put(mf.name, mf);
            }
            return true;
        }

        public boolean visit(ImportDeclaration node) {
            imports.add(node.getName().toString());
            return true;
        }

        public boolean visit(PackageDeclaration node) {
            packageName = node.getName().toString();
            return true;
        }
    });
}
Also used : CompilationUnit(org.eclipse.jdt.core.dom.CompilationUnit) Set(java.util.Set) HashSet(java.util.HashSet) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) SingleVariableDeclaration(org.eclipse.jdt.core.dom.SingleVariableDeclaration) ArrayList(java.util.ArrayList) FieldDeclaration(org.eclipse.jdt.core.dom.FieldDeclaration) ASTVisitor(org.eclipse.jdt.core.dom.ASTVisitor) ImportDeclaration(org.eclipse.jdt.core.dom.ImportDeclaration) ArrayList(java.util.ArrayList) List(java.util.List) ASTParser(org.eclipse.jdt.core.dom.ASTParser) PackageDeclaration(org.eclipse.jdt.core.dom.PackageDeclaration) HashSet(java.util.HashSet)

Example 55 with FieldDeclaration

use of org.eclipse.jdt.core.dom.FieldDeclaration in project che by eclipse.

the class VariableDeclarationFix method createAddFinalOperation.

private static ModifierChangeOperation createAddFinalOperation(SimpleName name, ASTNode decl) {
    if (decl == null)
        return null;
    IBinding binding = name.resolveBinding();
    if (!canAddFinal(binding, decl))
        return null;
    if (decl instanceof SingleVariableDeclaration) {
        return new ModifierChangeOperation(decl, new ArrayList<VariableDeclarationFragment>(), Modifier.FINAL, Modifier.NONE);
    } else if (decl instanceof VariableDeclarationExpression) {
        return new ModifierChangeOperation(decl, new ArrayList<VariableDeclarationFragment>(), Modifier.FINAL, Modifier.NONE);
    } else if (decl instanceof VariableDeclarationFragment) {
        VariableDeclarationFragment frag = (VariableDeclarationFragment) decl;
        decl = decl.getParent();
        if (decl instanceof FieldDeclaration || decl instanceof VariableDeclarationStatement) {
            List<VariableDeclarationFragment> list = new ArrayList<VariableDeclarationFragment>();
            list.add(frag);
            return new ModifierChangeOperation(decl, list, Modifier.FINAL, Modifier.NONE);
        } else if (decl instanceof VariableDeclarationExpression) {
            return new ModifierChangeOperation(decl, new ArrayList<VariableDeclarationFragment>(), Modifier.FINAL, Modifier.NONE);
        }
    }
    return null;
}
Also used : SingleVariableDeclaration(org.eclipse.jdt.core.dom.SingleVariableDeclaration) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) IBinding(org.eclipse.jdt.core.dom.IBinding) VariableDeclarationExpression(org.eclipse.jdt.core.dom.VariableDeclarationExpression) ArrayList(java.util.ArrayList) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) FieldDeclaration(org.eclipse.jdt.core.dom.FieldDeclaration)

Aggregations

FieldDeclaration (org.eclipse.jdt.core.dom.FieldDeclaration)103 VariableDeclarationFragment (org.eclipse.jdt.core.dom.VariableDeclarationFragment)53 ASTNode (org.eclipse.jdt.core.dom.ASTNode)51 MethodDeclaration (org.eclipse.jdt.core.dom.MethodDeclaration)46 AST (org.eclipse.jdt.core.dom.AST)26 AbstractTypeDeclaration (org.eclipse.jdt.core.dom.AbstractTypeDeclaration)26 BodyDeclaration (org.eclipse.jdt.core.dom.BodyDeclaration)26 Type (org.eclipse.jdt.core.dom.Type)24 TypeDeclaration (org.eclipse.jdt.core.dom.TypeDeclaration)22 Block (org.eclipse.jdt.core.dom.Block)17 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)16 SingleVariableDeclaration (org.eclipse.jdt.core.dom.SingleVariableDeclaration)16 VariableDeclarationStatement (org.eclipse.jdt.core.dom.VariableDeclarationStatement)16 ASTRewrite (org.eclipse.jdt.core.dom.rewrite.ASTRewrite)16 ArrayList (java.util.ArrayList)15 SimpleName (org.eclipse.jdt.core.dom.SimpleName)15 CompilationUnit (org.eclipse.jdt.core.dom.CompilationUnit)14 Expression (org.eclipse.jdt.core.dom.Expression)14 ListRewrite (org.eclipse.jdt.core.dom.rewrite.ListRewrite)14 VariableDeclarationExpression (org.eclipse.jdt.core.dom.VariableDeclarationExpression)13