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

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


   *
   * @param folder the folder.
   * @return the control.
   */
  private Control createItemEntriesFolder(TabFolder folder) {
    PropertyResource propertyResource = PropertyResource.getInstance(this.project, true);
    String reviewIdString = this.reviewId.getReviewId();
    ReviewResource reviewResource = propertyResource.getReviewResource(reviewIdString, true);
    if (reviewResource != null) {
      this.fieldItemIdFieldItemMap = reviewResource.getFieldItemMap();
      this.fieldItemIdList = reviewResource.getFieldItemIdList();
    }
    Composite composite = createsGeneralComposite(folder);
View Full Code Here


    ReviewModel reviewModel = ReviewModel.getInstance();
    ReviewId reviewId = reviewModel.getReviewIdManager().getReviewId();
    IProject project = reviewModel.getProjectManager().getProject();
    if (reviewId != null) {
      String reviewIdString = reviewId.getReviewId();
      PropertyResource reviewIdResource = PropertyResource.getInstance(project, false);
      String[] items = reviewIdResource.getReviewerIdNames(reviewIdString);
      assignedToCombo.setItems((items == null) ? new String[] {} : items);
      reviewModel = ReviewModel.getInstance();
      String reviewerId = reviewModel.getReviewerIdManager().getReviewerId().getReviewerId();
      assignedToCombo.setText(reviewerId);
    }
View Full Code Here

      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);
View Full Code Here

   * Sets the item fields.
   * @param project the project.
   * @param reviewId the review id.
   */
  public void setItemFields(IProject project, ReviewId reviewId) {
    PropertyResource propertyResource = PropertyResource.getInstance(project, false);
    String reviewIdString = reviewId.getReviewId();
    ReviewResource reviewResource = propertyResource.getReviewResource(reviewIdString, true);
    this.typeCombo.setItems(TypeKeyManager.getInstance(project, reviewId).getElements());
    String typeName = PropertyConstraints.ATTRIBUTE_VALUE_TYPE;
    String typeDefaultKey = (reviewResource != null) ? reviewResource.getDefaultField(typeName)
                                                     : "";
    this.typeCombo.setText(ReviewI18n.getString(typeDefaultKey));
    this.severityCombo.setItems(SeverityKeyManager.getInstance(project, reviewId).getElements());
    String severityName = PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY;
    String severityDefaultKey = (reviewResource != null)
                                 ? reviewResource.getDefaultField(severityName) : "";
    this.severityCombo.setText(ReviewI18n.getString(severityDefaultKey));
    PropertyResource reviewIdResource = PropertyResource.getInstance(project, false);
    String[] items = reviewIdResource.getReviewerIdNames(reviewId.getReviewId());
    this.assignedToCombo.setItems((items == null) ? new String[] {} : items);
    String author = ReviewModel.getInstance().getReviewIdManager().getReviewId().getAuthor();
    assignedToCombo.setText(author);
    ResolutionKeyManager resolutionKeyManager = ResolutionKeyManager.getInstance(project, reviewId);
    this.resolutionCombo.setItems(resolutionKeyManager.getElements());
View Full Code Here

   * @param projectName the project name.
   * @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();
View Full Code Here

      this.annotationText.setText(reviewIssue.getAnnotation());
      this.revisionText.setText(reviewIssue.getRevision());
      if (reviewId != null) {
        // if no assigned to person was set yet, then it would be set.
        String reviewIdString = reviewId.getReviewId();
        PropertyResource reviewIdResource = PropertyResource.getInstance(project, false);
        String[] items = reviewIdResource.getReviewerIdNames(reviewIdString);
        assignedToCombo.setItems((items == null) ? new String[] {} : items);
        String assginedTo = reviewIssue.getAssignedTo();
        if (assginedTo.equals("")) {
          this.assignedToCombo.setText(reviewId.getAuthor());
        }
View Full Code Here

    this.reviewId.setDescription(ReviewI18n.getKey(this.reviewIdDescriptionText.getText()));
    this.reviewId.setReviewers(this.reviewers);
    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);
      }
    }
    catch (ReviewException e) {
      log.error(e);
    }
View Full Code Here

TOP

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

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.