Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.SingleMemberAnnotation


            locationInfo = getLocationInformation((StringLiteral) expression, javaContext);
          }
        }
      }
      else if (node instanceof SingleMemberAnnotation) {
        SingleMemberAnnotation singleMemberAnnotation = (SingleMemberAnnotation) node;
        Expression expression = singleMemberAnnotation.getValue();
        if (expression instanceof StringLiteral) {
          locationInfo = getLocationInformation((StringLiteral) expression, javaContext);
        }
      }
View Full Code Here


    if (!ProposalCalculatorUtil.containsImport(getCompilationUnit(), importName)) {
      ImportRewrite importRewrite = createImportRewrite(astRoot);
      importRewrite.addImport(importName);
    }

    SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
    annotation.setTypeName(ast.newSimpleName("PathVariable"));
    StringLiteral pathVariableName = ast.newStringLiteral();
    pathVariableName.setLiteralValue(variable.getVariableName());
    annotation.setValue(pathVariableName);

    astRewrite.getListRewrite(param, SingleVariableDeclaration.MODIFIERS2_PROPERTY).insertFirst(annotation, null);

    final ITrackedNodePosition literalPosition = astRewrite.track(variable.getNode());
    addLinkedPosition(new ITrackedNodePosition() {
View Full Code Here

      CompilationUnit astRoot = ASTResolving.findParentCompilationUnit(decl);
      ImportRewrite importRewrite = createImportRewrite(astRoot);
      importRewrite.addImport(qualifierTypeName);
    }

    SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
    SimpleName typeName = ast.newSimpleName("Qualifier");
    StringLiteral beanValue = ast.newStringLiteral();
    // beanValue.setLiteralValue("beanName");
    annotation.setTypeName(typeName);
    // SimpleName beanValue = ast.newSimpleName("beanName");
    annotation.setValue(beanValue);

    setTrackPosition(new StringLiteralTrackedPosition(rewrite.track(beanValue)));

    rewrite.replace(annotationNode, annotation, null);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.SingleMemberAnnotation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.