Search in sources :

Example 6 with ArrayInitializer

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

the class CallInliner method computeRealArguments.

private void computeRealArguments() {
    List<Expression> arguments = Invocations.getArguments(fInvocation);
    Set<Expression> canNotInline = crossCheckArguments(arguments);
    boolean needsVarargBoxing = needsVarargBoxing(arguments);
    int varargIndex = fSourceProvider.getVarargIndex();
    AST ast = fInvocation.getAST();
    Expression[] realArguments = new Expression[needsVarargBoxing ? varargIndex + 1 : arguments.size()];
    for (int i = 0; i < (needsVarargBoxing ? varargIndex : arguments.size()); i++) {
        Expression expression = arguments.get(i);
        ParameterData parameter = fSourceProvider.getParameterData(i);
        if (canInline(expression, parameter) && !canNotInline.contains(expression)) {
            realArguments[i] = expression;
        } else {
            String name = fInvocationScope.createName(parameter.getName(), true);
            realArguments[i] = ast.newSimpleName(name);
            VariableDeclarationStatement local = createLocalDeclaration(parameter.getTypeBinding(), name, (Expression) fRewrite.createCopyTarget(expression));
            if (parameter.isFinal()) {
                local.modifiers().add(fInvocation.getAST().newModifier(ModifierKeyword.FINAL_KEYWORD));
            }
            fLocals.add(local);
        }
    }
    if (needsVarargBoxing) {
        ParameterData parameter = fSourceProvider.getParameterData(varargIndex);
        String name = fInvocationScope.createName(parameter.getName(), true);
        realArguments[varargIndex] = ast.newSimpleName(name);
        Type type = fImportRewrite.addImport(parameter.getTypeBinding(), ast);
        VariableDeclarationFragment fragment = ast.newVariableDeclarationFragment();
        fragment.setName(ast.newSimpleName(name));
        ArrayInitializer initializer = ast.newArrayInitializer();
        for (int i = varargIndex; i < arguments.size(); i++) {
            initializer.expressions().add(fRewrite.createCopyTarget(arguments.get(i)));
        }
        fragment.setInitializer(initializer);
        VariableDeclarationStatement decl = ast.newVariableDeclarationStatement(fragment);
        decl.setType(type);
        fLocals.add(decl);
    }
    fContext.compilationUnit = fCUnit;
    fContext.arguments = realArguments;
}
Also used : AST(org.eclipse.jdt.core.dom.AST) Type(org.eclipse.jdt.core.dom.Type) TType(org.eclipse.jdt.internal.corext.refactoring.typeconstraints.types.TType) ThisExpression(org.eclipse.jdt.core.dom.ThisExpression) Expression(org.eclipse.jdt.core.dom.Expression) CastExpression(org.eclipse.jdt.core.dom.CastExpression) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) ArrayInitializer(org.eclipse.jdt.core.dom.ArrayInitializer)

Example 7 with ArrayInitializer

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

the class InlineTempRefactoring method getModifiedInitializerSource.

private Expression getModifiedInitializerSource(CompilationUnitRewrite rewrite, SimpleName reference) throws JavaModelException {
    VariableDeclaration varDecl = getVariableDeclaration();
    Expression initializer = varDecl.getInitializer();
    ASTNode referenceContext = reference.getParent();
    if (Invocations.isResolvedTypeInferredFromExpectedType(initializer)) {
        if (!(referenceContext instanceof VariableDeclarationFragment || referenceContext instanceof SingleVariableDeclaration || referenceContext instanceof Assignment)) {
            ITypeBinding[] typeArguments = Invocations.getInferredTypeArguments(initializer);
            if (typeArguments != null) {
                String newSource = createParameterizedInvocation(initializer, typeArguments, rewrite);
                return (Expression) rewrite.getASTRewrite().createStringPlaceholder(newSource, initializer.getNodeType());
            }
        }
    }
    Expression copy = (Expression) rewrite.getASTRewrite().createCopyTarget(initializer);
    AST ast = rewrite.getAST();
    if (NecessaryParenthesesChecker.needsParentheses(initializer, reference.getParent(), reference.getLocationInParent())) {
        ParenthesizedExpression parenthesized = ast.newParenthesizedExpression();
        parenthesized.setExpression(copy);
        copy = parenthesized;
    }
    ITypeBinding explicitCast = ASTNodes.getExplicitCast(initializer, reference);
    if (explicitCast != null) {
        CastExpression cast = ast.newCastExpression();
        if (NecessaryParenthesesChecker.needsParentheses(copy, cast, CastExpression.EXPRESSION_PROPERTY)) {
            ParenthesizedExpression parenthesized = ast.newParenthesizedExpression();
            parenthesized.setExpression(copy);
            copy = parenthesized;
        }
        cast.setExpression(copy);
        ImportRewriteContext context = new ContextSensitiveImportRewriteContext(reference, rewrite.getImportRewrite());
        cast.setType(rewrite.getImportRewrite().addImport(explicitCast, ast, context));
        copy = cast;
    } else if (initializer instanceof ArrayInitializer && ASTNodes.getDimensions(varDecl) > 0) {
        ArrayType newType = (ArrayType) ASTNodeFactory.newType(ast, varDecl);
        ArrayCreation newArrayCreation = ast.newArrayCreation();
        newArrayCreation.setType(newType);
        newArrayCreation.setInitializer((ArrayInitializer) copy);
        return newArrayCreation;
    }
    return copy;
}
Also used : ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) AST(org.eclipse.jdt.core.dom.AST) SingleVariableDeclaration(org.eclipse.jdt.core.dom.SingleVariableDeclaration) Assignment(org.eclipse.jdt.core.dom.Assignment) ArrayType(org.eclipse.jdt.core.dom.ArrayType) ContextSensitiveImportRewriteContext(org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext) ImportRewriteContext(org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext) ContextSensitiveImportRewriteContext(org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext) Expression(org.eclipse.jdt.core.dom.Expression) CastExpression(org.eclipse.jdt.core.dom.CastExpression) VariableDeclarationExpression(org.eclipse.jdt.core.dom.VariableDeclarationExpression) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) ASTNode(org.eclipse.jdt.core.dom.ASTNode) ArrayCreation(org.eclipse.jdt.core.dom.ArrayCreation) VariableDeclaration(org.eclipse.jdt.core.dom.VariableDeclaration) SingleVariableDeclaration(org.eclipse.jdt.core.dom.SingleVariableDeclaration) CastExpression(org.eclipse.jdt.core.dom.CastExpression) ArrayInitializer(org.eclipse.jdt.core.dom.ArrayInitializer)

Example 8 with ArrayInitializer

use of org.eclipse.jdt.core.dom.ArrayInitializer in project xtext-xtend by eclipse.

the class JavaASTFlattener method visit.

@Override
public boolean visit(final ArrayCreation node) {
    ArrayType at = node.getType();
    int dims = at.getDimensions();
    if ((dims > 1)) {
        StringConcatenation _builder = new StringConcatenation();
        _builder.append("/* FIXME Only one dimensional arrays are supported. ");
        _builder.append(node);
        _builder.append("*/");
        this.appendToBuffer(_builder.toString());
        this.addProblem(node, "Only one dimension arrays are supported.");
        return false;
    }
    ArrayInitializer _initializer = node.getInitializer();
    boolean _tripleNotEquals = (_initializer != null);
    if (_tripleNotEquals) {
        if (this.fallBackStrategy) {
            this.appendToBuffer("(");
        }
        node.getInitializer().accept(this);
        if (this.fallBackStrategy) {
            this.appendToBuffer(" as ");
            at.accept(this);
            this.appendToBuffer(")");
        }
    } else {
        StringConcatenation _builder_1 = new StringConcatenation();
        _builder_1.append("new");
        String _xifexpression = null;
        boolean _isPrimitiveType = node.getType().getElementType().isPrimitiveType();
        if (_isPrimitiveType) {
            Type _elementType = node.getType().getElementType();
            _xifexpression = StringExtensions.toFirstUpper(((PrimitiveType) _elementType).getPrimitiveTypeCode().toString());
        }
        _builder_1.append(_xifexpression);
        _builder_1.append("ArrayOfSize(");
        this.appendToBuffer(_builder_1.toString());
        List _dimensions = node.dimensions();
        ((Expression[]) Conversions.unwrapArray(((Iterable<Expression>) _dimensions), Expression.class))[0].accept(this);
        this.appendToBuffer(")");
    }
    return false;
}
Also used : ArrayType(org.eclipse.jdt.core.dom.ArrayType) ParameterizedType(org.eclipse.jdt.core.dom.ParameterizedType) WildcardType(org.eclipse.jdt.core.dom.WildcardType) QualifiedType(org.eclipse.jdt.core.dom.QualifiedType) PrimitiveType(org.eclipse.jdt.core.dom.PrimitiveType) ArrayType(org.eclipse.jdt.core.dom.ArrayType) SimpleType(org.eclipse.jdt.core.dom.SimpleType) Type(org.eclipse.jdt.core.dom.Type) InstanceofExpression(org.eclipse.jdt.core.dom.InstanceofExpression) ThisExpression(org.eclipse.jdt.core.dom.ThisExpression) 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) PrefixExpression(org.eclipse.jdt.core.dom.PrefixExpression) ConditionalExpression(org.eclipse.jdt.core.dom.ConditionalExpression) InfixExpression(org.eclipse.jdt.core.dom.InfixExpression) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) ArrayList(java.util.ArrayList) List(java.util.List) ArrayInitializer(org.eclipse.jdt.core.dom.ArrayInitializer)

Example 9 with ArrayInitializer

use of org.eclipse.jdt.core.dom.ArrayInitializer in project AutoRefactor by JnRouvignac.

the class CFGBuilder method addVariableAccess.

/**
 * @return whether the current variable access can throw an exception.
 */
@SuppressWarnings("unchecked")
private boolean addVariableAccess(CFGBasicBlock basicBlock, Expression node, int flags, ThrowerBlocks throwers) {
    if (node == null) {
        return false;
    }
    switch(node.getNodeType()) {
        case ARRAY_ACCESS:
            ArrayAccess aa = (ArrayAccess) node;
            addVariableAccess(basicBlock, aa.getArray(), flags, throwers);
            addVariableAccess(basicBlock, aa.getIndex(), flags, throwers);
            throwers.addThrow(aa, newException(node, "java.lang.ArrayIndexOutOfBoundsException"));
            return true;
        case ARRAY_CREATION:
            ArrayCreation ac = (ArrayCreation) node;
            boolean acMightThrow1 = addVariableAccess(basicBlock, ac.getInitializer(), flags, throwers);
            boolean acMightThrow2 = addVariableAccesses(basicBlock, ac.dimensions(), flags, throwers);
            return acMightThrow1 || acMightThrow2;
        case ARRAY_INITIALIZER:
            ArrayInitializer ai = (ArrayInitializer) node;
            return addVariableAccesses(basicBlock, ai.expressions(), flags, throwers);
        case ASSIGNMENT:
            Assignment a = (Assignment) node;
            boolean aMightThrow1 = addVariableAccess(basicBlock, a.getLeftHandSide(), WRITE, throwers);
            boolean aMightThrow2 = addVariableAccess(basicBlock, a.getRightHandSide(), READ, throwers);
            return aMightThrow1 || aMightThrow2;
        case BOOLEAN_LITERAL:
        case CHARACTER_LITERAL:
        case NULL_LITERAL:
        case NUMBER_LITERAL:
        case STRING_LITERAL:
        case TYPE_LITERAL:
            // nothing to do
            return false;
        case CAST_EXPRESSION:
            CastExpression cae = (CastExpression) node;
            return addVariableAccess(basicBlock, cae.getExpression(), flags, throwers);
        case CLASS_INSTANCE_CREATION:
            ClassInstanceCreation cic = (ClassInstanceCreation) node;
            addVariableAccess(basicBlock, cic.getExpression(), flags, throwers);
            addVariableAccesses(basicBlock, cic.arguments(), flags, throwers);
            IMethodBinding cicBinding = cic.resolveConstructorBinding();
            if (cicBinding != null) {
                ITypeBinding[] declaredThrows = cicBinding.getExceptionTypes();
                throwers.addThrow(cic, declaredThrows);
                return declaredThrows.length > 0;
            }
            return false;
        case CONDITIONAL_EXPRESSION:
            ConditionalExpression coe = (ConditionalExpression) node;
            boolean mightThrow1 = addVariableAccess(basicBlock, coe.getExpression(), flags, throwers);
            boolean mightThrow2 = addVariableAccess(basicBlock, coe.getThenExpression(), flags, throwers);
            boolean mightThrow3 = addVariableAccess(basicBlock, coe.getElseExpression(), flags, throwers);
            return mightThrow1 || mightThrow2 || mightThrow3;
        case FIELD_ACCESS:
            FieldAccess fa = (FieldAccess) node;
            boolean mightThrow = addVariableAccess(basicBlock, fa.getExpression(), flags, throwers);
            basicBlock.addVariableAccess(new VariableAccess(fa, flags));
            if (is(flags, READ)) {
                throwers.addThrow(fa, newException(node, "java.lang.NullPointerException"));
                mightThrow = true;
            }
            return mightThrow;
        case INFIX_EXPRESSION:
            InfixExpression ie = (InfixExpression) node;
            boolean ieMightThrow1 = addVariableAccess(basicBlock, ie.getLeftOperand(), flags, throwers);
            boolean ieMightThrow2 = addVariableAccess(basicBlock, ie.getRightOperand(), flags, throwers);
            return ieMightThrow1 || ieMightThrow2;
        case INSTANCEOF_EXPRESSION:
            InstanceofExpression ioe = (InstanceofExpression) node;
            return addVariableAccess(basicBlock, ioe.getLeftOperand(), flags, throwers);
        case METHOD_INVOCATION:
            MethodInvocation mi = (MethodInvocation) node;
            addVariableAccess(basicBlock, mi.getExpression(), flags, throwers);
            addVariableAccesses(basicBlock, mi.arguments(), flags, throwers);
            IMethodBinding methodBinding = mi.resolveMethodBinding();
            if (methodBinding != null) {
                ITypeBinding[] declaredThrows = methodBinding.getExceptionTypes();
                throwers.addThrow(mi, declaredThrows);
                return declaredThrows.length > 0;
            }
            return false;
        case SIMPLE_NAME:
            SimpleName sn = (SimpleName) node;
            basicBlock.addVariableAccess(new VariableAccess(sn, flags));
            if (is(flags, READ)) {
                throwers.addThrow(sn, newException(node, "java.lang.NullPointerException"));
                return true;
            }
            return false;
        case QUALIFIED_NAME:
            QualifiedName qn = (QualifiedName) node;
            basicBlock.addVariableAccess(new VariableAccess(qn, flags));
            throwers.addThrow(qn, newException(node, "java.lang.NullPointerException"));
            return true;
        case PARENTHESIZED_EXPRESSION:
            ParenthesizedExpression pe = (ParenthesizedExpression) node;
            return addVariableAccess(basicBlock, pe.getExpression(), flags, throwers);
        case POSTFIX_EXPRESSION:
            PostfixExpression poe = (PostfixExpression) node;
            return addVariableAccess(basicBlock, poe.getOperand(), flags, throwers);
        case PREFIX_EXPRESSION:
            PrefixExpression pre = (PrefixExpression) node;
            return addVariableAccess(basicBlock, pre.getOperand(), flags, throwers);
        case SUPER_FIELD_ACCESS:
            SuperFieldAccess sfa = (SuperFieldAccess) node;
            boolean sfaMightThrow1 = addVariableAccess(basicBlock, sfa.getQualifier(), flags, throwers);
            boolean sfaMightThrow2 = addVariableAccess(basicBlock, sfa.getName(), flags, throwers);
            return sfaMightThrow1 || sfaMightThrow2;
        case SUPER_METHOD_INVOCATION:
            SuperMethodInvocation smi = (SuperMethodInvocation) node;
            addVariableAccess(basicBlock, smi.getQualifier(), flags, throwers);
            addVariableAccess(basicBlock, smi.getName(), flags, throwers);
            IMethodBinding sMethodBinding = smi.resolveMethodBinding();
            if (sMethodBinding != null) {
                ITypeBinding[] declaredThrows = sMethodBinding.getExceptionTypes();
                throwers.addThrow(smi, declaredThrows);
                return declaredThrows.length > 0;
            }
            return false;
        case THIS_EXPRESSION:
            ThisExpression te = (ThisExpression) node;
            // TODO JNR remember use of "this" here
            return addVariableAccess(basicBlock, te.getQualifier(), flags, throwers);
        case VARIABLE_DECLARATION_EXPRESSION:
            return addDeclarations(basicBlock, (VariableDeclarationExpression) node, throwers);
        default:
            throw new NotImplementedException(node);
    }
}
Also used : IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) SimpleName(org.eclipse.jdt.core.dom.SimpleName) NotImplementedException(org.autorefactor.util.NotImplementedException) MethodInvocation(org.eclipse.jdt.core.dom.MethodInvocation) SuperMethodInvocation(org.eclipse.jdt.core.dom.SuperMethodInvocation) SuperMethodInvocation(org.eclipse.jdt.core.dom.SuperMethodInvocation) Assignment(org.eclipse.jdt.core.dom.Assignment) ThisExpression(org.eclipse.jdt.core.dom.ThisExpression) ArrayAccess(org.eclipse.jdt.core.dom.ArrayAccess) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) VariableAccess(org.autorefactor.cfg.VariableAccess) InstanceofExpression(org.eclipse.jdt.core.dom.InstanceofExpression) InfixExpression(org.eclipse.jdt.core.dom.InfixExpression) ClassInstanceCreation(org.eclipse.jdt.core.dom.ClassInstanceCreation) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) ConditionalExpression(org.eclipse.jdt.core.dom.ConditionalExpression) QualifiedName(org.eclipse.jdt.core.dom.QualifiedName) SuperFieldAccess(org.eclipse.jdt.core.dom.SuperFieldAccess) PrefixExpression(org.eclipse.jdt.core.dom.PrefixExpression) ArrayCreation(org.eclipse.jdt.core.dom.ArrayCreation) PostfixExpression(org.eclipse.jdt.core.dom.PostfixExpression) CastExpression(org.eclipse.jdt.core.dom.CastExpression) FieldAccess(org.eclipse.jdt.core.dom.FieldAccess) SuperFieldAccess(org.eclipse.jdt.core.dom.SuperFieldAccess) ArrayInitializer(org.eclipse.jdt.core.dom.ArrayInitializer)

Example 10 with ArrayInitializer

use of org.eclipse.jdt.core.dom.ArrayInitializer in project liferay-ide by liferay.

the class NewLiferayModuleProjectOpMethods method addProperties.

@SuppressWarnings("unchecked")
public static boolean addProperties(File dest, List<String> properties) throws Exception {
    if (ListUtil.isEmpty(properties)) {
        return false;
    }
    try {
        ASTParser parser = ASTParser.newParser(AST.JLS8);
        String readContents = FileUtil.readContents(dest, true);
        parser.setSource(readContents.toCharArray());
        parser.setKind(ASTParser.K_COMPILATION_UNIT);
        parser.setResolveBindings(true);
        CompilationUnit cu = (CompilationUnit) parser.createAST(new NullProgressMonitor());
        cu.recordModifications();
        Document document = new Document(new String(readContents));
        cu.accept(new ASTVisitor() {

            @Override
            public boolean visit(NormalAnnotation node) {
                String qualifiedName = node.getTypeName().getFullyQualifiedName();
                if (qualifiedName.equals("Component")) {
                    ASTRewrite rewrite = ASTRewrite.create(cu.getAST());
                    AST ast = cu.getAST();
                    List<ASTNode> values = node.values();
                    boolean hasProperty = false;
                    for (ASTNode astNode : values) {
                        if (astNode instanceof MemberValuePair) {
                            MemberValuePair pairNode = (MemberValuePair) astNode;
                            String fullQualifiedName = pairNode.getName().getFullyQualifiedName();
                            if (fullQualifiedName.equals("property")) {
                                Expression express = pairNode.getValue();
                                if (express instanceof ArrayInitializer) {
                                    ListRewrite lrw = rewrite.getListRewrite(express, ArrayInitializer.EXPRESSIONS_PROPERTY);
                                    ArrayInitializer initializer = (ArrayInitializer) express;
                                    List<ASTNode> expressions = initializer.expressions();
                                    ASTNode propertyNode = null;
                                    for (int i = properties.size() - 1; i >= 0; i--) {
                                        StringLiteral stringLiteral = ast.newStringLiteral();
                                        stringLiteral.setLiteralValue(properties.get(i));
                                        if (ListUtil.isNotEmpty(expressions)) {
                                            propertyNode = expressions.get(expressions.size() - 1);
                                            lrw.insertAfter(stringLiteral, propertyNode, null);
                                        } else {
                                            lrw.insertFirst(stringLiteral, null);
                                        }
                                    }
                                }
                                hasProperty = true;
                            }
                        }
                    }
                    if (hasProperty == false) {
                        ListRewrite clrw = rewrite.getListRewrite(node, NormalAnnotation.VALUES_PROPERTY);
                        ASTNode lastNode = values.get(values.size() - 1);
                        ArrayInitializer newArrayInitializer = ast.newArrayInitializer();
                        MemberValuePair propertyMemberValuePair = ast.newMemberValuePair();
                        propertyMemberValuePair.setName(ast.newSimpleName("property"));
                        propertyMemberValuePair.setValue(newArrayInitializer);
                        clrw.insertBefore(propertyMemberValuePair, lastNode, null);
                        ListRewrite newLrw = rewrite.getListRewrite(newArrayInitializer, ArrayInitializer.EXPRESSIONS_PROPERTY);
                        for (String property : properties) {
                            StringLiteral stringLiteral = ast.newStringLiteral();
                            stringLiteral.setLiteralValue(property);
                            newLrw.insertAt(stringLiteral, 0, null);
                        }
                    }
                    try (OutputStream fos = Files.newOutputStream(dest.toPath())) {
                        TextEdit edits = rewrite.rewriteAST(document, null);
                        edits.apply(document);
                        fos.write(document.get().getBytes());
                        fos.flush();
                    } catch (Exception e) {
                        ProjectCore.logError(e);
                    }
                }
                return super.visit(node);
            }
        });
        return true;
    } catch (Exception e) {
        ProjectCore.logError("error when adding properties to " + dest.getAbsolutePath(), e);
        return false;
    }
}
Also used : CompilationUnit(org.eclipse.jdt.core.dom.CompilationUnit) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) AST(org.eclipse.jdt.core.dom.AST) OutputStream(java.io.OutputStream) ListRewrite(org.eclipse.jdt.core.dom.rewrite.ListRewrite) Document(org.eclipse.jface.text.Document) ASTVisitor(org.eclipse.jdt.core.dom.ASTVisitor) MemberValuePair(org.eclipse.jdt.core.dom.MemberValuePair) StringLiteral(org.eclipse.jdt.core.dom.StringLiteral) Expression(org.eclipse.jdt.core.dom.Expression) TextEdit(org.eclipse.text.edits.TextEdit) ASTNode(org.eclipse.jdt.core.dom.ASTNode) NormalAnnotation(org.eclipse.jdt.core.dom.NormalAnnotation) ASTRewrite(org.eclipse.jdt.core.dom.rewrite.ASTRewrite) ArrayList(java.util.ArrayList) List(java.util.List) ElementList(org.eclipse.sapphire.ElementList) ASTParser(org.eclipse.jdt.core.dom.ASTParser) ArrayInitializer(org.eclipse.jdt.core.dom.ArrayInitializer)

Aggregations

ArrayInitializer (org.eclipse.jdt.core.dom.ArrayInitializer)27 Expression (org.eclipse.jdt.core.dom.Expression)12 ASTNode (org.eclipse.jdt.core.dom.ASTNode)11 ArrayCreation (org.eclipse.jdt.core.dom.ArrayCreation)10 AST (org.eclipse.jdt.core.dom.AST)9 CastExpression (org.eclipse.jdt.core.dom.CastExpression)9 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)8 Assignment (org.eclipse.jdt.core.dom.Assignment)7 InfixExpression (org.eclipse.jdt.core.dom.InfixExpression)7 VariableDeclarationFragment (org.eclipse.jdt.core.dom.VariableDeclarationFragment)7 ASTRewrite (org.eclipse.jdt.core.dom.rewrite.ASTRewrite)7 ConditionalExpression (org.eclipse.jdt.core.dom.ConditionalExpression)6 IMethodBinding (org.eclipse.jdt.core.dom.IMethodBinding)6 MethodInvocation (org.eclipse.jdt.core.dom.MethodInvocation)6 Type (org.eclipse.jdt.core.dom.Type)6 ParenthesizedExpression (org.eclipse.jdt.core.dom.ParenthesizedExpression)5 PrefixExpression (org.eclipse.jdt.core.dom.PrefixExpression)5 List (java.util.List)4 ArrayType (org.eclipse.jdt.core.dom.ArrayType)4 FieldAccess (org.eclipse.jdt.core.dom.FieldAccess)4