Package edu.hawaii.ics.csdl.jupiter.file

Examples of edu.hawaii.ics.csdl.jupiter.file.ReviewResource


  /**
   * Restores the item entries from the default review id.
   */
  protected void restoreItemEntries() {
    ReviewResource reviewResource = null;
    if (reviewId.getReviewId().equals(PropertyConstraints.DEFAULT_REVIEW_ID)) {
      // read from master property.xml
      Review defaultReview = PropertyXmlSerializer.cloneDefaultReview();
      reviewResource = new ReviewResource(defaultReview);
    }
    else {
      // read from .jupiter.
      PropertyResource propertyResource = PropertyResource.getInstance(project, true);
      reviewResource = propertyResource.getReviewResource(reviewId.getReviewId(), true);
    }
    if (reviewResource != null) {
      String fieldItemId = this.itemCombo.getText();
      FieldItem fieldItem = reviewResource.getFieldItem(fieldItemId);
      this.fieldItemIdFieldItemMap.put(fieldItemId, fieldItem);
      fillItemTable(fieldItemId);
      updateDefaultItems(fieldItemId);
      updateFilterItems(fieldItemId);
    }
View Full Code Here


   * @param reviewId the review id.
   */
  public void fillFileTable(String projectName, String reviewId) {
    IProject project = FileResource.getProject(projectName);
    PropertyResource propertyResource = PropertyResource.getInstance(project, true);
    ReviewResource reviewResource = propertyResource.getReviewResource(reviewId, true);
    if (reviewResource != null) {
      Set<String> targetFiles = reviewResource.getFileSet();
      this.files = targetFiles;
      for (Iterator<String> i = this.files.iterator(); i.hasNext();) {
        String file = i.next();
        TableItem item = new TableItem(this.fileListTable, SWT.NONE);
        item.setText(file);
View Full Code Here

    this.reviewId.setAuthor(this.authorCombo.getText());
    this.reviewId.setDirectory(this.storageText.getText());
    try {
      PropertyResource propertyResource = PropertyResource.getInstance(this.project, true);
      String reviewIdString = this.reviewId.getReviewId();
      ReviewResource reviewResource = propertyResource.getReviewResource(reviewIdString, true);
      if (reviewResource != null) {
        reviewResource.setReviewId(this.reviewId);
        reviewResource.setTargetFiles(this.files);
        String typeKey = ReviewI18n.getKey(this.defaultTypeCombo.getText());
        reviewResource.setDefaultField(PropertyConstraints.ATTRIBUTE_VALUE_TYPE, typeKey);
        String severityKey = ReviewI18n.getKey(this.defaultSeverityCombo.getText());
        reviewResource.setDefaultField(PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY,
            severityKey);
        String resolutionKey = ReviewI18n.getKey(this.defaultResolutionCombo.getText());
        String resolutionName = PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION;
        reviewResource.setDefaultField(resolutionName, resolutionKey);
        String statusKey = ReviewI18n.getKey(this.defaultStatusCombo.getText());
        reviewResource.setDefaultField(PropertyConstraints.ATTRIBUTE_VALUE_STATUS, statusKey);
        reviewResource.setFieldItemMap(this.fieldItemIdFieldItemMap);
        reviewResource.setPhaseNameFilterPhaseMap(this.phaseNameFilterPhaseMap);

        propertyResource.removeReviewResource(this.reviewId);
        propertyResource.addReviewResource(reviewResource);
      }
    }
View Full Code Here

TOP

Related Classes of edu.hawaii.ics.csdl.jupiter.file.ReviewResource

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.