Examples of track()


Examples of org.eclipse.jdt.core.dom.rewrite.ASTRewrite.track()

    SingleVariableDeclaration paramDecl = ast.newSingleVariableDeclaration();

    SimpleType variableType = ast.newSimpleType(ast.newSimpleName("String"));
    paramDecl.setType(variableType);
    addLinkedPosition(astRewrite.track(variableType), false, "variableType");

    SimpleName variableName = ast.newSimpleName(variable.getVariableName());
    paramDecl.setName(variableName);
    addLinkedPosition(astRewrite.track(variableName), false, "variableName");
View Full Code Here

Examples of org.eclipse.jdt.core.dom.rewrite.ASTRewrite.track()

    paramDecl.setType(variableType);
    addLinkedPosition(astRewrite.track(variableType), false, "variableType");

    SimpleName variableName = ast.newSimpleName(variable.getVariableName());
    paramDecl.setName(variableName);
    addLinkedPosition(astRewrite.track(variableName), false, "variableName");

    SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
    annotation.setTypeName(ast.newSimpleName("PathVariable"));

    StringLiteral pathVariableName = ast.newStringLiteral();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.rewrite.ASTRewrite.track()

    annotation.setTypeName(ast.newSimpleName("PathVariable"));

    StringLiteral pathVariableName = ast.newStringLiteral();
    pathVariableName.setLiteralValue(variable.getVariableName());
    annotation.setValue(pathVariableName);
    addLinkedPosition(new StringLiteralTrackedPosition(astRewrite.track(pathVariableName)), false, "variableName");

    ListRewrite listRewrite = astRewrite.getListRewrite(paramDecl, SingleVariableDeclaration.MODIFIERS2_PROPERTY);
    listRewrite.insertFirst(annotation, null);

    listRewrite = astRewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.rewrite.ASTRewrite.track()

      SingleMemberAnnotation sAnnotation = ast.newSingleMemberAnnotation();
      StringLiteral paramName = ast.newStringLiteral();
      paramName.setLiteralValue(param.getName().getFullyQualifiedName());
      sAnnotation.setValue(paramName);

      addLinkedPosition(new StringLiteralTrackedPosition(astRewrite.track(paramName)), true, "paramValue");
      annotation = sAnnotation;
    }
    else {
      annotation = ast.newMarkerAnnotation();
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.rewrite.ASTRewrite.track()

    NormalAnnotation annotation = astRewrite.getAST().newNormalAnnotation();

    annotation.setTypeName(astRewrite.getAST().newSimpleName("RequestMapping"));
    astRewrite.getListRewrite(decl, TypeDeclaration.MODIFIERS2_PROPERTY).insertFirst(annotation, null);

    ITrackedNodePosition tracker = astRewrite.track(annotation.getTypeName());
    edit.addChild(astRewrite.rewriteAST());

    edit.apply(document);

    setReplacementOffset(tracker.getStartPosition() + annotation.getTypeName().getFullyQualifiedName().length() + 1);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.rewrite.ASTRewrite.track()

    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() {

      public int getStartPosition() {
        return literalPosition.getStartPosition() + variable.getOffsetFromNode();
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.rewrite.ASTRewrite.track()

      public int getLength() {
        return variable.getVariableName().length();
      }
    }, true, "PathVariable");

    addLinkedPosition(new StringLiteralTrackedPosition(astRewrite.track(pathVariableName)), false, "PathVariable");

    return astRewrite;
  }
}
View Full Code Here

Examples of org.eclipse.jdt.core.dom.rewrite.ASTRewrite.track()

    // 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);

    return rewrite;
  }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.rewrite.ASTRewrite.track()

        switch (params[i]) {
        case REQUIRED:
          MemberValuePair requiredValue = ast.newMemberValuePair();
          requiredValue.setName(ast.newSimpleName("required"));
          requiredValue.setValue(ast.newBooleanLiteral(false));
          addLinkedPosition(astRewrite.track(requiredValue.getValue()), i == 0, "Autowire");
          autowiredAnnotation.values().add(requiredValue);
          break;
        // case QUALIFIER:
        // SingleMemberAnnotation qualifierAnnotation =
        // (SingleMemberAnnotation) createAnnotation(
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.rewrite.ASTRewrite.track()

    Variable variable = ast.newVariable(names[0]);
   
    Assignment assign = ast.newAssignment(variable, Assignment.OP_EQUAL, (Expression) astRewrite.createCopyTarget(expression));
    astRewrite.replace(expression, assign, editGroup);

    linkedModel.getPositionGroup(KEY_NAME, true).addPosition(astRewrite.track(variable.getName()), true);
    linkedModel.setEndPosition(astRewrite.track(statement));
   
    return astRewrite;
  }
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.