Search in sources :

Example 81 with AST

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

the class IntroduceFactoryRefactoring method createFactoryChange.

/**
	 * Perform the AST rewriting necessary on the given <code>CompilationUnit</code> to create the
	 * factory method. The method will reside on the type identified by
	 * <code>fFactoryOwningClass</code>.
	 * 
	 * @param unitRewriter the ASTRewrite to be used
	 * @param unit the <code>CompilationUnit</code> where factory method will be created
	 * @param gd the <code>GroupDescription</code> to associate with the changes made
	 * @throws CoreException if an exception occurs while accessing its corresponding resource
	 */
private void createFactoryChange(ASTRewrite unitRewriter, CompilationUnit unit, TextEditGroup gd) throws CoreException {
    // ================================================================================
    // First add the factory itself (method, class, and interface as needed/directed by user)
    AST ast = unit.getAST();
    fFactoryMethod = createFactoryMethod(ast, fCtorBinding, unitRewriter);
    AbstractTypeDeclaration factoryOwner = (AbstractTypeDeclaration) unit.findDeclaringNode(fFactoryOwningClass.resolveBinding().getKey());
    fImportRewriter.addImport(fCtorOwningClass.resolveBinding());
    int idx = ASTNodes.getInsertionIndex(fFactoryMethod, factoryOwner.bodyDeclarations());
    // Guard against bug in getInsertionIndex()
    if (idx < 0)
        idx = 0;
    unitRewriter.getListRewrite(factoryOwner, factoryOwner.getBodyDeclarationsProperty()).insertAt(fFactoryMethod, idx, gd);
}
Also used : AST(org.eclipse.jdt.core.dom.AST) AbstractTypeDeclaration(org.eclipse.jdt.core.dom.AbstractTypeDeclaration)

Example 82 with AST

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

the class ExtractTempRefactoring method createTempType.

private Type createTempType() throws CoreException {
    Expression expression = getSelectedExpression().getAssociatedExpression();
    Type resultingType = null;
    ITypeBinding typeBinding = expression.resolveTypeBinding();
    ASTRewrite rewrite = fCURewrite.getASTRewrite();
    AST ast = rewrite.getAST();
    if (expression instanceof ClassInstanceCreation && (typeBinding == null || typeBinding.getTypeArguments().length == 0)) {
        resultingType = (Type) rewrite.createCopyTarget(((ClassInstanceCreation) expression).getType());
    } else if (expression instanceof CastExpression) {
        resultingType = (Type) rewrite.createCopyTarget(((CastExpression) expression).getType());
    } else {
        if (typeBinding == null) {
            typeBinding = ASTResolving.guessBindingForReference(expression);
        }
        if (typeBinding != null) {
            typeBinding = Bindings.normalizeForDeclarationUse(typeBinding, ast);
            ImportRewrite importRewrite = fCURewrite.getImportRewrite();
            ImportRewriteContext context = new ContextSensitiveImportRewriteContext(expression, importRewrite);
            resultingType = importRewrite.addImport(typeBinding, ast, context);
        } else {
            //$NON-NLS-1$
            resultingType = ast.newSimpleType(ast.newSimpleName("Object"));
        }
    }
    if (fLinkedProposalModel != null) {
        LinkedProposalPositionGroup typeGroup = fLinkedProposalModel.getPositionGroup(KEY_TYPE, true);
        typeGroup.addPosition(rewrite.track(resultingType), false);
        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);
            }
        }
    }
    return resultingType;
}
Also used : ClassInstanceCreation(org.eclipse.jdt.core.dom.ClassInstanceCreation) AST(org.eclipse.jdt.core.dom.AST) ImportRewrite(org.eclipse.jdt.core.dom.rewrite.ImportRewrite) Type(org.eclipse.jdt.core.dom.Type) 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) PostfixExpression(org.eclipse.jdt.core.dom.PostfixExpression) PrefixExpression(org.eclipse.jdt.core.dom.PrefixExpression) ParenthesizedExpression(org.eclipse.jdt.core.dom.ParenthesizedExpression) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) ASTRewrite(org.eclipse.jdt.core.dom.rewrite.ASTRewrite) CastExpression(org.eclipse.jdt.core.dom.CastExpression) LinkedProposalPositionGroup(org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroup)

Example 83 with AST

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

the class ExtractMethodAnalyzer method initReturnType.

private void initReturnType(ImportRewrite rewriter) {
    AST ast = fEnclosingBodyDeclaration.getAST();
    fReturnType = null;
    fReturnTypeBinding = null;
    switch(fReturnKind) {
        case ACCESS_TO_LOCAL:
            VariableDeclaration declaration = ASTNodes.findVariableDeclaration(fReturnValue, fEnclosingBodyDeclaration);
            fReturnType = ASTNodeFactory.newType(ast, declaration, rewriter, new ContextSensitiveImportRewriteContext(declaration, rewriter));
            if (declaration.resolveBinding() != null) {
                fReturnTypeBinding = declaration.resolveBinding().getType();
            }
            break;
        case EXPRESSION:
            Expression expression = (Expression) getFirstSelectedNode();
            if (expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION) {
                fExpressionBinding = ((ClassInstanceCreation) expression).getType().resolveBinding();
            } else {
                fExpressionBinding = expression.resolveTypeBinding();
            }
            if (fExpressionBinding != null) {
                if (fExpressionBinding.isNullType()) {
                    getStatus().addFatalError(RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_extract_null_type, JavaStatusContext.create(fCUnit, expression));
                } else {
                    ITypeBinding normalizedBinding = Bindings.normalizeForDeclarationUse(fExpressionBinding, ast);
                    if (normalizedBinding != null) {
                        ImportRewriteContext context = new ContextSensitiveImportRewriteContext(fEnclosingBodyDeclaration, rewriter);
                        fReturnType = rewriter.addImport(normalizedBinding, ast, context);
                        fReturnTypeBinding = normalizedBinding;
                    }
                }
            } else {
                fReturnType = ast.newPrimitiveType(PrimitiveType.VOID);
                //$NON-NLS-1$
                fReturnTypeBinding = ast.resolveWellKnownType("void");
                getStatus().addError(RefactoringCoreMessages.ExtractMethodAnalyzer_cannot_determine_return_type, JavaStatusContext.create(fCUnit, expression));
            }
            break;
        case RETURN_STATEMENT_VALUE:
            LambdaExpression enclosingLambdaExpr = ASTResolving.findEnclosingLambdaExpression(getFirstSelectedNode());
            if (enclosingLambdaExpr != null) {
                fReturnType = ASTNodeFactory.newReturnType(enclosingLambdaExpr, ast, rewriter, null);
                IMethodBinding methodBinding = enclosingLambdaExpr.resolveMethodBinding();
                fReturnTypeBinding = methodBinding != null ? methodBinding.getReturnType() : null;
            } else if (fEnclosingBodyDeclaration.getNodeType() == ASTNode.METHOD_DECLARATION) {
                fReturnType = ((MethodDeclaration) fEnclosingBodyDeclaration).getReturnType2();
                fReturnTypeBinding = fReturnType != null ? fReturnType.resolveBinding() : null;
            }
            break;
        default:
            fReturnType = ast.newPrimitiveType(PrimitiveType.VOID);
            //$NON-NLS-1$
            fReturnTypeBinding = ast.resolveWellKnownType("void");
    }
    if (fReturnType == null) {
        fReturnType = ast.newPrimitiveType(PrimitiveType.VOID);
        //$NON-NLS-1$
        fReturnTypeBinding = ast.resolveWellKnownType("void");
    }
}
Also used : ClassInstanceCreation(org.eclipse.jdt.core.dom.ClassInstanceCreation) IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) AST(org.eclipse.jdt.core.dom.AST) 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) ThisExpression(org.eclipse.jdt.core.dom.ThisExpression) Expression(org.eclipse.jdt.core.dom.Expression) VariableDeclarationExpression(org.eclipse.jdt.core.dom.VariableDeclarationExpression) LambdaExpression(org.eclipse.jdt.core.dom.LambdaExpression) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) VariableDeclaration(org.eclipse.jdt.core.dom.VariableDeclaration) LambdaExpression(org.eclipse.jdt.core.dom.LambdaExpression)

Example 84 with AST

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

the class JavaASTFlattener method visit.

@Override
public boolean visit(final PrefixExpression node) {
    final Expression operand = node.getOperand();
    PrefixExpression.Operator _operator = node.getOperator();
    boolean _matched = false;
    if (Objects.equal(_operator, PrefixExpression.Operator.DECREMENT)) {
        _matched = true;
    }
    if (!_matched) {
        if (Objects.equal(_operator, PrefixExpression.Operator.INCREMENT)) {
            _matched = true;
        }
    }
    if (_matched) {
        if ((operand instanceof ArrayAccess)) {
            final String arrayName = this.computeArrayName(((ArrayAccess) operand));
            StringConcatenation _builder = new StringConcatenation();
            _builder.append("_tPreInx_");
            _builder.append(arrayName);
            final String idxName = _builder.toString();
            String op = "-";
            PrefixExpression.Operator _operator_1 = node.getOperator();
            boolean _equals = Objects.equal(_operator_1, PrefixExpression.Operator.INCREMENT);
            if (_equals) {
                op = "+";
            }
            StringConcatenation _builder_1 = new StringConcatenation();
            _builder_1.append("{val ");
            _builder_1.append(idxName);
            _builder_1.append("=");
            this.appendToBuffer(_builder_1.toString());
            ((ArrayAccess) operand).getIndex().accept(this);
            StringConcatenation _builder_2 = new StringConcatenation();
            _builder_2.append(" ");
            _builder_2.append("val ");
            _builder_2.append(idxName, " ");
            _builder_2.append("_res=");
            _builder_2.append(arrayName, " ");
            _builder_2.append(".get(");
            _builder_2.append(idxName, " ");
            _builder_2.append(")");
            _builder_2.append(op, " ");
            _builder_2.append("1");
            this.appendToBuffer(_builder_2.toString());
            StringConcatenation _builder_3 = new StringConcatenation();
            _builder_3.append(" ");
            _builder_3.append(arrayName, " ");
            _builder_3.append(".set(");
            _builder_3.append(idxName, " ");
            _builder_3.append(", ");
            _builder_3.append(idxName, " ");
            _builder_3.append("_res)  ");
            _builder_3.append(idxName, " ");
            _builder_3.append("_res}");
            this.appendToBuffer(_builder_3.toString());
            return false;
        } else {
            final AST dummyAST = AST.newAST(node.getAST().apiLevel());
            final Assignment assigment = dummyAST.newAssignment();
            final InfixExpression infixOp = dummyAST.newInfixExpression();
            ASTNode _copySubtree = ASTNode.copySubtree(dummyAST, operand);
            infixOp.setLeftOperand(((Expression) _copySubtree));
            PrefixExpression.Operator _operator_2 = node.getOperator();
            boolean _equals_1 = Objects.equal(_operator_2, PrefixExpression.Operator.DECREMENT);
            if (_equals_1) {
                infixOp.setOperator(InfixExpression.Operator.MINUS);
            } else {
                infixOp.setOperator(InfixExpression.Operator.PLUS);
            }
            infixOp.setRightOperand(dummyAST.newNumberLiteral("1"));
            ASTNode _copySubtree_1 = ASTNode.copySubtree(dummyAST, operand);
            final Expression leftSide = ((Expression) _copySubtree_1);
            assigment.setLeftHandSide(leftSide);
            assigment.setRightHandSide(infixOp);
            this.appendToBuffer("{");
            Type type = null;
            if ((operand instanceof SimpleName)) {
                type = this._aSTFlattenerUtils.findDeclaredType(((SimpleName) operand));
            }
            this.handleAssignment(assigment, leftSide, type);
            this.appendToBuffer("}");
            return false;
        }
    }
    if (!_matched) {
        if (Objects.equal(_operator, PrefixExpression.Operator.COMPLEMENT)) {
            _matched = true;
            node.getOperand().accept(this);
            this.appendToBuffer(".bitwiseNot");
        }
    }
    if (!_matched) {
        {
            this.appendToBuffer(node.getOperator().toString());
            node.getOperand().accept(this);
        }
    }
    return false;
}
Also used : AST(org.eclipse.jdt.core.dom.AST) SimpleName(org.eclipse.jdt.core.dom.SimpleName) Assignment(org.eclipse.jdt.core.dom.Assignment) ArrayAccess(org.eclipse.jdt.core.dom.ArrayAccess) 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) PrefixExpression(org.eclipse.jdt.core.dom.PrefixExpression) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) InfixExpression(org.eclipse.jdt.core.dom.InfixExpression) ASTNode(org.eclipse.jdt.core.dom.ASTNode)

Example 85 with AST

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

the class JavaASTFlattener method visit.

@Override
public boolean visit(final MethodDeclaration it) {
    Javadoc _javadoc = it.getJavadoc();
    boolean _tripleNotEquals = (_javadoc != null);
    if (_tripleNotEquals) {
        it.getJavadoc().accept(this);
    }
    final Function1<ASTNode, StringBuffer> _function = (ASTNode node) -> {
        StringBuffer _xifexpression = null;
        if ((node instanceof MethodDeclaration)) {
            StringBuffer _xifexpression_1 = null;
            boolean _isConstructor = ((MethodDeclaration) node).isConstructor();
            boolean _not = (!_isConstructor);
            if (_not) {
                StringBuffer _xifexpression_2 = null;
                boolean _isOverrideMethod = this._aSTFlattenerUtils.isOverrideMethod(((MethodDeclaration) node));
                if (_isOverrideMethod) {
                    _xifexpression_2 = this.appendToBuffer("override ");
                } else {
                    _xifexpression_2 = this.appendToBuffer("def ");
                }
                _xifexpression_1 = _xifexpression_2;
            }
            _xifexpression = _xifexpression_1;
        }
        return _xifexpression;
    };
    final Function1<ASTNode, StringBuffer> afterAnnotationProcessingCallback = _function;
    this.appendModifiers(it, it.modifiers(), afterAnnotationProcessingCallback);
    boolean _isPackageVisibility = this._aSTFlattenerUtils.isPackageVisibility(Iterables.<Modifier>filter(it.modifiers(), Modifier.class));
    if (_isPackageVisibility) {
        ASTNode _parent = it.getParent();
        if ((_parent instanceof TypeDeclaration)) {
            ASTNode _parent_1 = it.getParent();
            boolean _isInterface = ((TypeDeclaration) _parent_1).isInterface();
            boolean _not = (!_isInterface);
            if (_not) {
                this.appendToBuffer("package ");
            }
        }
    }
    boolean _isConstructor = it.isConstructor();
    if (_isConstructor) {
        this.appendToBuffer(" new");
    }
    boolean _isEmpty = it.typeParameters().isEmpty();
    boolean _not_1 = (!_isEmpty);
    if (_not_1) {
        boolean _isConstructor_1 = it.isConstructor();
        if (_isConstructor_1) {
            this.addProblem(it, "Type parameters for constructors are not supported");
        }
        this.appendTypeParameters(it.typeParameters());
    }
    boolean _isConstructor_2 = it.isConstructor();
    boolean _not_2 = (!_isConstructor_2);
    if (_not_2) {
        Type _returnType2 = it.getReturnType2();
        boolean _tripleNotEquals_1 = (_returnType2 != null);
        if (_tripleNotEquals_1) {
            it.getReturnType2().accept(this);
        } else {
            this.appendToBuffer("void");
        }
        this.appendSpaceToBuffer();
        it.getName().accept(this);
    }
    this.appendToBuffer("(");
    final Consumer<SingleVariableDeclaration> _function_1 = (SingleVariableDeclaration p) -> {
        Boolean _isAssignedInBody = this._aSTFlattenerUtils.isAssignedInBody(it.getBody(), p.getName());
        if ((_isAssignedInBody).booleanValue()) {
            if ((it.isConstructor() && (!it.getBody().statements().isEmpty()))) {
                final Expression firstInBody = IterableExtensions.<Expression>head(this._aSTFlattenerUtils.findAssignmentsInBlock(it.getBody(), p));
                if ((firstInBody != null)) {
                    ConstructorInvocation _findParentOfType = this._aSTFlattenerUtils.<ConstructorInvocation>findParentOfType(firstInBody, ConstructorInvocation.class);
                    boolean _tripleNotEquals_2 = (_findParentOfType != null);
                    if (_tripleNotEquals_2) {
                        this.addProblem(p, "Final parameter modified in constructor call");
                    } else {
                        SuperConstructorInvocation _findParentOfType_1 = this._aSTFlattenerUtils.<SuperConstructorInvocation>findParentOfType(firstInBody, SuperConstructorInvocation.class);
                        boolean _tripleNotEquals_3 = (_findParentOfType_1 != null);
                        if (_tripleNotEquals_3) {
                            this.addProblem(p, "Final parameter modified in super constructor call");
                        }
                    }
                }
            }
            final VariableDeclarationFragment varFrag = p.getAST().newVariableDeclarationFragment();
            varFrag.setName(p.getAST().newSimpleName(p.getName().toString()));
            AST _aST = p.getAST();
            SimpleName _name = p.getName();
            String _plus = (_name + "_finalParam_");
            p.setName(_aST.newSimpleName(_plus));
            varFrag.setInitializer(p.getAST().newSimpleName(p.getName().toString()));
            final VariableDeclarationStatement varDecl = p.getAST().newVariableDeclarationStatement(varFrag);
            ASTNode _createInstance = p.getAST().createInstance(SimpleType.class);
            final Type typeCopy = ((Type) _createInstance);
            varDecl.setType(typeCopy);
            it.getBody().statements().add(0, varDecl);
        }
    };
    ListExtensions.<SingleVariableDeclaration>reverseView(it.parameters()).forEach(_function_1);
    this.visitAllSeparatedByComma(it.parameters());
    this.appendToBuffer(")");
    this.appendExtraDimensions(it.getExtraDimensions());
    List<? extends ASTNode> throwsTypes = CollectionLiterals.<ASTNode>newArrayList();
    boolean _java8orHigher = this.java8orHigher();
    boolean _not_3 = (!_java8orHigher);
    if (_not_3) {
        throwsTypes = it.thrownExceptions();
    } else {
        throwsTypes = this._aSTFlattenerUtils.genericChildListProperty(it, "thrownExceptionTypes");
    }
    boolean _isEmpty_1 = throwsTypes.isEmpty();
    boolean _not_4 = (!_isEmpty_1);
    if (_not_4) {
        this.appendToBuffer(" throws ");
        this.visitAllSeparatedByComma(throwsTypes);
    }
    this.appendSpaceToBuffer();
    Block _body = it.getBody();
    boolean _tripleNotEquals_2 = (_body != null);
    if (_tripleNotEquals_2) {
        it.getBody().accept(this);
    } else {
        this.appendLineWrapToBuffer();
    }
    return false;
}
Also used : AST(org.eclipse.jdt.core.dom.AST) MethodDeclaration(org.eclipse.jdt.core.dom.MethodDeclaration) SingleVariableDeclaration(org.eclipse.jdt.core.dom.SingleVariableDeclaration) SimpleName(org.eclipse.jdt.core.dom.SimpleName) Javadoc(org.eclipse.jdt.core.dom.Javadoc) SimpleType(org.eclipse.jdt.core.dom.SimpleType) 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) SuperConstructorInvocation(org.eclipse.jdt.core.dom.SuperConstructorInvocation) ConstructorInvocation(org.eclipse.jdt.core.dom.ConstructorInvocation) 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) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) ASTNode(org.eclipse.jdt.core.dom.ASTNode) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) Block(org.eclipse.jdt.core.dom.Block) SuperConstructorInvocation(org.eclipse.jdt.core.dom.SuperConstructorInvocation) Modifier(org.eclipse.jdt.core.dom.Modifier) IExtendedModifier(org.eclipse.jdt.core.dom.IExtendedModifier) TypeDeclaration(org.eclipse.jdt.core.dom.TypeDeclaration) AbstractTypeDeclaration(org.eclipse.jdt.core.dom.AbstractTypeDeclaration) AnnotationTypeDeclaration(org.eclipse.jdt.core.dom.AnnotationTypeDeclaration)

Aggregations

AST (org.eclipse.jdt.core.dom.AST)169 ASTRewrite (org.eclipse.jdt.core.dom.rewrite.ASTRewrite)78 Expression (org.eclipse.jdt.core.dom.Expression)77 ASTNode (org.eclipse.jdt.core.dom.ASTNode)70 Type (org.eclipse.jdt.core.dom.Type)52 SimpleName (org.eclipse.jdt.core.dom.SimpleName)51 Block (org.eclipse.jdt.core.dom.Block)44 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)43 InfixExpression (org.eclipse.jdt.core.dom.InfixExpression)42 CastExpression (org.eclipse.jdt.core.dom.CastExpression)40 ParenthesizedExpression (org.eclipse.jdt.core.dom.ParenthesizedExpression)40 MethodDeclaration (org.eclipse.jdt.core.dom.MethodDeclaration)39 VariableDeclarationFragment (org.eclipse.jdt.core.dom.VariableDeclarationFragment)38 ASTRewriteCorrectionProposal (org.eclipse.jdt.ui.text.java.correction.ASTRewriteCorrectionProposal)38 ReturnStatement (org.eclipse.jdt.core.dom.ReturnStatement)34 PrefixExpression (org.eclipse.jdt.core.dom.PrefixExpression)33 VariableDeclarationStatement (org.eclipse.jdt.core.dom.VariableDeclarationStatement)33 ContextSensitiveImportRewriteContext (org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext)33 ConditionalExpression (org.eclipse.jdt.core.dom.ConditionalExpression)30 ListRewrite (org.eclipse.jdt.core.dom.rewrite.ListRewrite)30