Examples of track()


Examples of org.apache.tomcat.util.http.fileupload.FileCleaningTracker.track()

            boolean isFormField, String fileName) {
        DiskFileItem result = new DiskFileItem(fieldName, contentType,
                isFormField, fileName, sizeThreshold, repository);
        FileCleaningTracker tracker = getFileCleaningTracker();
        if (tracker != null) {
            tracker.track(result.getTempFile(), result);
        }
        return result;
    }

    /**
 
View Full Code Here

Examples of org.apache.tomcat.util.http.fileupload.FileCleaningTracker.track()

            boolean isFormField, String fileName) {
        DiskFileItem result = new DiskFileItem(fieldName, contentType,
                isFormField, fileName, sizeThreshold, repository);
        FileCleaningTracker tracker = getFileCleaningTracker();
        if (tracker != null) {
            tracker.track(result.getTempFile(), this);
        }
        return result;
    }

View Full Code Here

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

      annotation = sAnnotation;
      Expression value;
      if (exceptionNames.size() == 1) {
        TypeLiteral typeLiteral = getTypeLiteral(exceptionNames.get(0), ast);
        value = typeLiteral;
        addLinkedPosition(astRewrite.track(typeLiteral.getType()), true, "ExceptionHandler");
      }
      else {
        ArrayInitializer arrayInitializer = ast.newArrayInitializer();
        List<Expression> expressions = arrayInitializer.expressions();
        for (int i = 0; i < exceptionNames.size(); i++) {
View Full Code Here

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

        ArrayInitializer arrayInitializer = ast.newArrayInitializer();
        List<Expression> expressions = arrayInitializer.expressions();
        for (int i = 0; i < exceptionNames.size(); i++) {
          String exceptionName = exceptionNames.get(i);
          TypeLiteral typeLiteral = getTypeLiteral(exceptionName, ast);
          addLinkedPosition(astRewrite.track(typeLiteral.getType()), i == 0, "ExceptionHandler" + i);
          expressions.add(typeLiteral);
        }

        value = arrayInitializer;
      }
View Full Code Here

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

    SimpleName typeName = ast.newSimpleName(className);
    SimpleType type = ast.newSimpleType(typeName);
    TypeLiteral typeLiteral = ast.newTypeLiteral();
    typeLiteral.setType(type);
    final ITrackedNodePosition newValuePosition = rewrite.track(typeLiteral);

    rewrite.replace(oldLiteral, typeLiteral, null);

    if (packageFragment != null) {
      ImportRewrite importRewrite = createImportRewrite(ASTResolving.findParentCompilationUnit(oldLiteral));
View Full Code Here

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

      rewrite.remove(annot, null);

      callASTRewriteCorrectionProposal(getDisplayString(), cu, rewrite, 6, getImage(), document);

      ITextViewer viewer = getViewer(JavaPlugin.getActivePage().getActiveEditor());
      ITrackedNodePosition trackPos = rewrite.track(decl);
      if (trackPos != null && viewer != null) {
        viewer.setSelectedRange(trackPos.getStartPosition(), 0);
      }
    }
  }
View Full Code Here

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

    SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
    annotation.setTypeName(ast.newSimpleName("Qualifier"));
    StringLiteral literal = ast.newStringLiteral();
    // literal.setLiteralValue(qualifier);
    annotation.setValue(literal);
    ITrackedNodePosition position = astRewrite.track(literal);
    addLinkedPosition(new StringLiteralTrackedPosition(position), true, "Qualifier");

    ChildListPropertyDescriptor property;

    if (decl instanceof FieldDeclaration) {
View Full Code Here

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

      return rewrite;
    }

    StringLiteral newValue = ast.newStringLiteral();
    newValue.setLiteralValue(packageName);
    ITrackedNodePosition newValuePosition = rewrite.track(newValue);

    rewrite.replace(oldLiteral, newValue, null);
    setTrackPosition(new StringLiteralTrackedPosition(newValuePosition, newValuePosition.getStartPosition() + 1
        + packageName.length(), 0, true));
View Full Code Here

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

      SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
      annotation.setTypeName(ast.newSimpleName("PathVariable"));
      StringLiteral pathVariableName = ast.newStringLiteral();
      pathVariableName.setLiteralValue(variableName);
      ITrackedNodePosition trackPathVariable = rewrite.track(pathVariableName);
      addLinkedPosition(new StringLiteralTrackedPosition(trackPathVariable), true, "PathVariable");
      annotation.setValue(pathVariableName);
      isLinked = true;

      ChildListPropertyDescriptor property;
View Full Code Here

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

      rewrite.getListRewrite(param, property).insertLast(annotation, null);
    }

    StringLiteral newTemplate = ast.newStringLiteral();
    newTemplate.setLiteralValue(newTemplateString);
    ITrackedNodePosition trackTemplateVariable = rewrite.track(newTemplate);
    rewrite.replace(oldTemplate, newTemplate, null);

    if (isLinked) {
      addLinkedPosition(
          new StringLiteralTrackedPosition(trackTemplateVariable, cursorOffset, variableName.length(), false),
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.