Examples of FieldItem


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

    typeFilterCombo.setEnabled(typeCheckButton.getSelection());
    String typeNameId = PropertyConstraints.ATTRIBUTE_VALUE_TYPE;
    IWizardPage page = getWizard().getPage(ReviewIdNewWizard.PAGE_ITEM_ENTRIES);
    ReviewIdNewItemEntriesPage itemEntryPage = (ReviewIdNewItemEntriesPage) page;
    Map<String, FieldItem> fieldItemIdFieldItemMap = itemEntryPage.getFieldItemIdFieldItemMap();
    FieldItem fieldItem = (FieldItem) fieldItemIdFieldItemMap.get(typeNameId);
    if (fieldItem != null) {
      typeFilterCombo.setItems((String[]) fieldItem.getEntryNameList().toArray(new String[] {}));
    }
    typeFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    typeCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        boolean isEnabled = typeCheckButton.getSelection();
        handleFilterEnabledCheck(isEnabled, typeFilterCombo);
        updateFilterEnabled(PropertyConstraints.ATTRIBUTE_VALUE_TYPE, isEnabled);
      }
    });
   
    this.severityCheckButton = new Button(composite, SWT.CHECK);
    String severityKey = "ReviewIdEditDialog.label.tab.filters.check.severity";
    severityCheckButton.setText(ReviewI18n.getString(severityKey));
    FormData severityCheckButtonData = new FormData();
    severityCheckButtonData.top = new FormAttachment(typeCheckButton, 10);
    severityCheckButton.setLayoutData(severityCheckButtonData);
    entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY);
    severityCheckButton.setSelection(entry.isEnabled());
    this.severityFilterCombo = new Combo(composite, SWT.READ_ONLY);
    severityFilterCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String value = severityFilterCombo.getText();
        String key = SeverityKeyManager.getInstance(project, reviewId).getKey(value);
        updateFilterValue(PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY, key);
      }
    });
    FormData severityFilterComboData = new FormData();
    severityFilterComboData.top = new FormAttachment(severityCheckButton, 0, SWT.CENTER);
    severityFilterComboData.left = new FormAttachment(severityCheckButton, x + 20, SWT.LEFT);
    severityFilterComboData.right = new FormAttachment(100, 0);
    severityFilterCombo.setLayoutData(severityFilterComboData);
    severityFilterCombo.setEnabled(severityCheckButton.getSelection());
    String severityNameId = PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY;
    fieldItem = (FieldItem) fieldItemIdFieldItemMap.get(severityNameId);
    if (fieldItem != null) {
      List<String> itemNameList = fieldItem.getEntryNameList();
      severityFilterCombo.setItems(itemNameList.toArray(new String[] {}));
    }
    severityFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    severityCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        boolean isEnabled = severityCheckButton.getSelection();
        handleFilterEnabledCheck(isEnabled, severityFilterCombo);
        updateFilterEnabled(PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY, isEnabled);
      }
    });
   
    this.assignedToCheckButton = new Button(composite, SWT.CHECK);
    String assignedToKey = "ReviewIdEditDialog.label.tab.filters.check.assignedTo";
    assignedToCheckButton.setText(ReviewI18n.getString(assignedToKey));
    FormData assignedToCheckButtonData = new FormData();
    assignedToCheckButtonData.top = new FormAttachment(severityCheckButton, 10);
    assignedToCheckButton.setLayoutData(assignedToCheckButtonData);
    entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_ASSIGNED_TO);
    assignedToCheckButton.setSelection(entry.isEnabled());
    this.assignedToFilterCombo = new Combo(composite, SWT.READ_ONLY);
    assignedToFilterCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String value = assignedToFilterCombo.getText();
        if (value.equals(ReviewI18n.getString(ReviewerId.AUTOMATIC_KEY))) {
          value = ReviewerId.AUTOMATIC_KEY;
        }
        updateFilterValue(PropertyConstraints.ATTRIBUTE_VALUE_ASSIGNED_TO, value);
      }
    });
    FormData assignedToFilterComboData = new FormData();
    assignedToFilterComboData.top = new FormAttachment(assignedToCheckButton, 0, SWT.CENTER);
    assignedToFilterComboData.left = new FormAttachment(assignedToCheckButton, x + 20, SWT.LEFT);
    assignedToFilterComboData.right = new FormAttachment(100, 0);
    assignedToFilterCombo.setLayoutData(assignedToFilterComboData);
    assignedToFilterCombo.setEnabled(assignedToCheckButton.getSelection());
    reviewers = reviewResource.getReviewers();
    assignedToFilterCombo.setItems((String[]) reviewers.keySet().toArray(new String[] {}));
    assignedToFilterCombo.add(ReviewI18n.getString(ReviewerId.AUTOMATIC_KEY), 0);
    assignedToFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    assignedToCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        boolean isEnabled = assignedToCheckButton.getSelection();
        handleFilterEnabledCheck(isEnabled, assignedToFilterCombo);
        updateFilterEnabled(PropertyConstraints.ATTRIBUTE_VALUE_ASSIGNED_TO, isEnabled);
      }
    });
   
    this.resolutionCheckButton = new Button(composite, SWT.CHECK);
    String resolutionKey = "ReviewIdEditDialog.label.tab.filters.check.resolution";
    resolutionCheckButton.setText(ReviewI18n.getString(resolutionKey));
    FormData resolutionCheckButtonData = new FormData();
    resolutionCheckButtonData.top = new FormAttachment(assignedToCheckButton, 10);
    resolutionCheckButton.setLayoutData(resolutionCheckButtonData);
    entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION);
    resolutionCheckButton.setSelection(entry.isEnabled());
    this.resolutionFilterCombo = new Combo(composite, SWT.READ_ONLY);
    resolutionFilterCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String value = resolutionFilterCombo.getText();
        String key = ResolutionKeyManager.getInstance(project, reviewId).getKey(value);
        updateFilterValue(PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION, key);
      }
    });
    FormData resolutionFilterComboData = new FormData();
    resolutionFilterComboData.top = new FormAttachment(resolutionCheckButton, 0, SWT.CENTER);
    resolutionFilterComboData.left = new FormAttachment(resolutionCheckButton, x + 20, SWT.LEFT);
    resolutionFilterComboData.right = new FormAttachment(100, 0);
    resolutionFilterCombo.setLayoutData(resolutionFilterComboData);
    resolutionFilterCombo.setEnabled(resolutionCheckButton.getSelection());
    String resolutionNameId = PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION;
    fieldItem = (FieldItem) fieldItemIdFieldItemMap.get(resolutionNameId);
    if (fieldItem != null) {
      List<String> itemNameList = fieldItem.getEntryNameList();
      resolutionFilterCombo.setItems(itemNameList.toArray(new String[] {}));
    }
    resolutionFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    resolutionCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        boolean isEnabled = resolutionCheckButton.getSelection();
        handleFilterEnabledCheck(isEnabled, resolutionFilterCombo);
        updateFilterEnabled(PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION, isEnabled);
      }
    });
   
    this.statusCheckButton = new Button(composite, SWT.CHECK);
    String statusKey = "ReviewIdEditDialog.label.tab.filters.check.status";
    statusCheckButton.setText(ReviewI18n.getString(statusKey));
    FormData statusCheckButtonData = new FormData();
    statusCheckButtonData.top = new FormAttachment(resolutionCheckButton, 10);
    statusCheckButton.setLayoutData(statusCheckButtonData);
    entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_STATUS);
    statusCheckButton.setSelection(entry.isEnabled());
    this.statusFilterCombo = new Combo(composite, SWT.READ_ONLY);
    statusFilterCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String value = statusFilterCombo.getText();
        String key = StatusKeyManager.getInstance(project, reviewId).getKey(value);
        updateFilterValue(PropertyConstraints.ATTRIBUTE_VALUE_STATUS, key);
      }
    });
    FormData statusFilterComboData = new FormData();
    statusFilterComboData.top = new FormAttachment(statusCheckButton, 0, SWT.CENTER);
    statusFilterComboData.left = new FormAttachment(statusCheckButton, x + 20, SWT.LEFT);
    statusFilterComboData.right = new FormAttachment(100, 0);
    statusFilterCombo.setLayoutData(statusFilterComboData);
    statusFilterCombo.setEnabled(statusCheckButton.getSelection());
    String statusNameId = PropertyConstraints.ATTRIBUTE_VALUE_STATUS;
    fieldItem = (FieldItem) fieldItemIdFieldItemMap.get(statusNameId);
    if (fieldItem != null) {
      List<String> itemNameList = fieldItem.getEntryNameList();
      statusFilterCombo.setItems(itemNameList.toArray(new String[] {}));
    }
    statusFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    statusCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
View Full Code Here

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

   */
  public void updateFilterItems(String fieldItemId) {
    IWizardPage page = getWizard().getPage(ReviewIdNewWizard.PAGE_ITEM_ENTRIES);
    ReviewIdNewItemEntriesPage itemEntryPage = (ReviewIdNewItemEntriesPage) page;
    Map<String, FieldItem> fieldItemIdFieldItemMap = itemEntryPage.getFieldItemIdFieldItemMap();
    FieldItem fieldItem = (FieldItem) fieldItemIdFieldItemMap.get(fieldItemId);
    if (fieldItem != null) {
      List<String> itemNameList = fieldItem.getEntryNameList();
      if (fieldItemId.equals(PropertyConstraints.ATTRIBUTE_VALUE_TYPE)) {
        String currentType = this.typeFilterCombo.getText();
        this.typeFilterCombo.setItems(itemNameList.toArray(new String[] {}));
        this.typeFilterCombo.setText(currentType);
      }
View Full Code Here

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

    String typeKey = (reviewResource != null) ? reviewResource.getDefaultField(typeName) : "";
    defaultTypeCombo.setText(ReviewI18n.getString(typeKey));
    defaultTypeCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String nameId = PropertyConstraints.ATTRIBUTE_VALUE_TYPE;
        FieldItem fieldItem = (FieldItem) fieldItemIdFieldItemMap.get(nameId);
        fieldItem.setDefaultKey(ReviewI18n.getKey(defaultTypeCombo.getText()));
      }
    });

    FormData defaultTypeLabelData = new FormData();
    defaultTypeLabelData.width = (int) ((folderWidth - marginWidth * 2) * 0.45);
    defaultTypeLabelData.top = new FormAttachment(defaultTypeCombo, 0, SWT.CENTER);
    defaultTypeLabel.setLayoutData(defaultTypeLabelData);
    FormData defaultTypeComboData = new FormData();
    defaultTypeComboData.left = new FormAttachment(defaultTypeLabel, 0);
    defaultTypeComboData.right = new FormAttachment(100, 0);
    defaultTypeCombo.setLayoutData(defaultTypeComboData);

    // create severity label and its combo.
    Label defaultSeverityLabel = new Label(composite, SWT.NONE);
    defaultSeverityLabel.setText(ReviewI18n.getString("ReviewIdEditDialog.label.severity"));
    this.defaultSeverityCombo = new Combo(composite, SWT.READ_ONLY);
    defaultSeverityCombo.setData(defaultSeverityCombo);
    defaultSeverityCombo.setItems(SeverityKeyManager.getInstance(project, reviewId)
        .getElements());
    String severityName = PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY;
    String severityKey = (reviewResource != null) ? reviewResource
        .getDefaultField(severityName) : "";
    defaultSeverityCombo.setText(ReviewI18n.getString(severityKey));
    defaultSeverityCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String nameId = PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY;
        FieldItem fieldItem = (FieldItem) fieldItemIdFieldItemMap.get(nameId);
        fieldItem.setDefaultKey(ReviewI18n.getKey(defaultSeverityCombo.getText()));
      }
    });

    FormData defaultSeverityLabelData = new FormData();
    defaultSeverityLabelData.width = (int) ((folderWidth - marginWidth * 2) * 0.45);
    defaultSeverityLabelData.top = new FormAttachment(defaultSeverityCombo, 0, SWT.CENTER);
    defaultSeverityLabel.setLayoutData(defaultSeverityLabelData);
    FormData defaultSeverityComboData = new FormData();
    defaultSeverityComboData.top = new FormAttachment(defaultTypeCombo, 5);
    defaultSeverityComboData.left = new FormAttachment(defaultSeverityLabel, 0);
    defaultSeverityComboData.right = new FormAttachment(100, 0);
    defaultSeverityCombo.setLayoutData(defaultSeverityComboData);

    // create resolution label and its combo.
    Label defaultResolutionLabel = new Label(composite, SWT.NONE);
    defaultResolutionLabel
        .setText(ReviewI18n.getString("ReviewIdEditDialog.label.resolution"));
    this.defaultResolutionCombo = new Combo(composite, SWT.READ_ONLY);
    defaultResolutionCombo.setData(defaultResolutionCombo);
    ResolutionKeyManager resolutionKeyManager = ResolutionKeyManager.getInstance(project,
        reviewId);
    defaultResolutionCombo.setItems(resolutionKeyManager.getElements());
    String resolutionName = PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION;
    String resolutionKey = (reviewResource != null) ? reviewResource
        .getDefaultField(resolutionName) : "";
    defaultResolutionCombo.setText(ReviewI18n.getString(resolutionKey));
    defaultResolutionCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String nameId = PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION;
        FieldItem fieldItem = (FieldItem) fieldItemIdFieldItemMap.get(nameId);
        fieldItem.setDefaultKey(ReviewI18n.getKey(defaultResolutionCombo.getText()));
      }
    });

    FormData defaultResolutionLabelData = new FormData();
    defaultResolutionLabelData.width = (int) ((folderWidth - marginWidth * 2) * 0.45);
    defaultResolutionLabelData.top = new FormAttachment(defaultResolutionCombo, 0, SWT.CENTER);
    defaultResolutionLabel.setLayoutData(defaultResolutionLabelData);
    FormData defaultResolutionComboData = new FormData();
    defaultResolutionComboData.top = new FormAttachment(defaultSeverityCombo, 5);
    defaultResolutionComboData.left = new FormAttachment(defaultResolutionLabel, 0);
    defaultResolutionComboData.right = new FormAttachment(100, 0);
    defaultResolutionCombo.setLayoutData(defaultResolutionComboData);

    // create status label and its combo.
    Label defaultStatusLabel = new Label(composite, SWT.NONE);
    defaultStatusLabel.setText(ReviewI18n.getString("ReviewIdEditDialog.label.status"));
    this.defaultStatusCombo = new Combo(composite, SWT.READ_ONLY);
    defaultStatusCombo.setData(defaultStatusCombo);
    defaultStatusCombo.setItems(StatusKeyManager.getInstance(project, reviewId).getElements());
    String statusName = PropertyConstraints.ATTRIBUTE_VALUE_STATUS;
    String statusKey = (reviewResource != null) ? reviewResource.getDefaultField(statusName)
        : "";
    defaultStatusCombo.setText(ReviewI18n.getString(statusKey));
    defaultStatusCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String nameId = PropertyConstraints.ATTRIBUTE_VALUE_STATUS;
        FieldItem fieldItem = (FieldItem) fieldItemIdFieldItemMap.get(nameId);
        fieldItem.setDefaultKey(ReviewI18n.getKey(defaultStatusCombo.getText()));
      }
    });

    FormData defaultStatusLabelData = new FormData();
    defaultStatusLabelData.width = (int) ((folderWidth - marginWidth * 2) * 0.45);
 
View Full Code Here

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

    typeFilterComboData.left = new FormAttachment(typeCheckButton, x + 20, SWT.LEFT);
    typeFilterComboData.right = new FormAttachment(100, 0);
    typeFilterCombo.setLayoutData(typeFilterComboData);
    typeFilterCombo.setEnabled(typeCheckButton.getSelection());
    String typeNameId = PropertyConstraints.ATTRIBUTE_VALUE_TYPE;
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(typeNameId);
    if (fieldItem != null) {
      typeFilterCombo.setItems(fieldItem.getEntryNameList().toArray(new String[] {}));
    }
    typeFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    typeCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        boolean isEnabled = typeCheckButton.getSelection();
        handleFilterEnabledCheck(isEnabled, typeFilterCombo);
        updateFilterEnabled(PropertyConstraints.ATTRIBUTE_VALUE_TYPE, isEnabled);
      }
    });

    this.severityCheckButton = new Button(composite, SWT.CHECK);
    String severityKey = "ReviewIdEditDialog.label.tab.filters.check.severity";
    severityCheckButton.setText(ReviewI18n.getString(severityKey));
    FormData severityCheckButtonData = new FormData();
    severityCheckButtonData.top = new FormAttachment(typeCheckButton, 10);
    severityCheckButton.setLayoutData(severityCheckButtonData);
    entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY);
    severityCheckButton.setSelection(entry.isEnabled());
    this.severityFilterCombo = new Combo(composite, SWT.READ_ONLY);
    severityFilterCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String value = severityFilterCombo.getText();
        String key = SeverityKeyManager.getInstance(project, reviewId).getKey(value);
        updateFilterValue(PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY, key);
      }
    });
    FormData severityFilterComboData = new FormData();
    severityFilterComboData.top = new FormAttachment(severityCheckButton, 0, SWT.CENTER);
    severityFilterComboData.left = new FormAttachment(severityCheckButton, x + 20, SWT.LEFT);
    severityFilterComboData.right = new FormAttachment(100, 0);
    severityFilterCombo.setLayoutData(severityFilterComboData);
    severityFilterCombo.setEnabled(severityCheckButton.getSelection());
    String severityNameId = PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY;
    fieldItem = this.fieldItemIdFieldItemMap.get(severityNameId);
    if (fieldItem != null) {
      List<String> itemNameList = fieldItem.getEntryNameList();
      severityFilterCombo.setItems(itemNameList.toArray(new String[] {}));
    }
    severityFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    severityCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        boolean isEnabled = severityCheckButton.getSelection();
        handleFilterEnabledCheck(isEnabled, severityFilterCombo);
        updateFilterEnabled(PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY, isEnabled);
      }
    });

    this.assignedToCheckButton = new Button(composite, SWT.CHECK);
    String assignedToKey = "ReviewIdEditDialog.label.tab.filters.check.assignedTo";
    assignedToCheckButton.setText(ReviewI18n.getString(assignedToKey));
    FormData assignedToCheckButtonData = new FormData();
    assignedToCheckButtonData.top = new FormAttachment(severityCheckButton, 10);
    assignedToCheckButton.setLayoutData(assignedToCheckButtonData);
    entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_ASSIGNED_TO);
    assignedToCheckButton.setSelection(entry.isEnabled());
    this.assignedToFilterCombo = new Combo(composite, SWT.READ_ONLY);
    assignedToFilterCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String value = assignedToFilterCombo.getText();
        if (value.equals(ReviewI18n.getString(ReviewerId.AUTOMATIC_KEY))) {
          value = ReviewerId.AUTOMATIC_KEY;
        }
        updateFilterValue(PropertyConstraints.ATTRIBUTE_VALUE_ASSIGNED_TO, value);
      }
    });
    FormData assignedToFilterComboData = new FormData();
    assignedToFilterComboData.top = new FormAttachment(assignedToCheckButton, 0, SWT.CENTER);
    assignedToFilterComboData.left = new FormAttachment(assignedToCheckButton, x + 20,
        SWT.LEFT);
    assignedToFilterComboData.right = new FormAttachment(100, 0);
    assignedToFilterCombo.setLayoutData(assignedToFilterComboData);
    assignedToFilterCombo.setEnabled(assignedToCheckButton.getSelection());
    reviewers = reviewResource.getReviewers();
    assignedToFilterCombo.setItems((String[]) reviewers.keySet().toArray(new String[] {}));
    assignedToFilterCombo.add(ReviewI18n.getString(ReviewerId.AUTOMATIC_KEY), 0);
    assignedToFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    assignedToCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        boolean isEnabled = assignedToCheckButton.getSelection();
        handleFilterEnabledCheck(isEnabled, assignedToFilterCombo);
        updateFilterEnabled(PropertyConstraints.ATTRIBUTE_VALUE_ASSIGNED_TO, isEnabled);
      }
    });

    this.resolutionCheckButton = new Button(composite, SWT.CHECK);
    String resolutionKey = "ReviewIdEditDialog.label.tab.filters.check.resolution";
    resolutionCheckButton.setText(ReviewI18n.getString(resolutionKey));
    FormData resolutionCheckButtonData = new FormData();
    resolutionCheckButtonData.top = new FormAttachment(assignedToCheckButton, 10);
    resolutionCheckButton.setLayoutData(resolutionCheckButtonData);
    entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION);
    resolutionCheckButton.setSelection(entry.isEnabled());
    this.resolutionFilterCombo = new Combo(composite, SWT.READ_ONLY);
    resolutionFilterCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String value = resolutionFilterCombo.getText();
        String key = ResolutionKeyManager.getInstance(project, reviewId).getKey(value);
        updateFilterValue(PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION, key);
      }
    });
    FormData resolutionFilterComboData = new FormData();
    resolutionFilterComboData.top = new FormAttachment(resolutionCheckButton, 0, SWT.CENTER);
    resolutionFilterComboData.left = new FormAttachment(resolutionCheckButton, x + 20,
        SWT.LEFT);
    resolutionFilterComboData.right = new FormAttachment(100, 0);
    resolutionFilterCombo.setLayoutData(resolutionFilterComboData);
    resolutionFilterCombo.setEnabled(resolutionCheckButton.getSelection());
    String resolutionNameId = PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION;
    fieldItem = this.fieldItemIdFieldItemMap.get(resolutionNameId);
    if (fieldItem != null) {
      List<String> itemNameList = fieldItem.getEntryNameList();
      resolutionFilterCombo.setItems(itemNameList.toArray(new String[] {}));
    }
    resolutionFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    resolutionCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        boolean isEnabled = resolutionCheckButton.getSelection();
        handleFilterEnabledCheck(isEnabled, resolutionFilterCombo);
        updateFilterEnabled(PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION, isEnabled);
      }
    });

    this.statusCheckButton = new Button(composite, SWT.CHECK);
    String statusKey = "ReviewIdEditDialog.label.tab.filters.check.status";
    statusCheckButton.setText(ReviewI18n.getString(statusKey));
    FormData statusCheckButtonData = new FormData();
    statusCheckButtonData.top = new FormAttachment(resolutionCheckButton, 10);
    statusCheckButton.setLayoutData(statusCheckButtonData);
    entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_STATUS);
    statusCheckButton.setSelection(entry.isEnabled());
    this.statusFilterCombo = new Combo(composite, SWT.READ_ONLY);
    statusFilterCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        String value = statusFilterCombo.getText();
        String key = StatusKeyManager.getInstance(project, reviewId).getKey(value);
        updateFilterValue(PropertyConstraints.ATTRIBUTE_VALUE_STATUS, key);
      }
    });
    FormData statusFilterComboData = new FormData();
    statusFilterComboData.top = new FormAttachment(statusCheckButton, 0, SWT.CENTER);
    statusFilterComboData.left = new FormAttachment(statusCheckButton, x + 20, SWT.LEFT);
    statusFilterComboData.right = new FormAttachment(100, 0);
    statusFilterCombo.setLayoutData(statusFilterComboData);
    statusFilterCombo.setEnabled(statusCheckButton.getSelection());
    String statusNameId = PropertyConstraints.ATTRIBUTE_VALUE_STATUS;
    fieldItem = this.fieldItemIdFieldItemMap.get(statusNameId);
    if (fieldItem != null) {
      List<String> itemNameList = fieldItem.getEntryNameList();
      statusFilterCombo.setItems(itemNameList.toArray(new String[] {}));
    }
    statusFilterCombo.setText(ReviewI18n.getString(entry.getValueKey()));
    statusCheckButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
View Full Code Here

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

   * @param isUpward <code>true</code> if moving the selected item entry by one upward.
   *          <code>false</code> if moving the selected item entry by one downward.
   */
  protected void moveItemEntry(boolean isUpward) {
    String fieldItemId = this.itemCombo.getText();
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(fieldItemId);
    TableItem[] selectedItems = this.itemListTable.getSelection();
    if (selectedItems.length > 0 && fieldItem != null) {
      TableItem selectedItem = selectedItems[0];
      String itemName = selectedItem.getText();
      List<String> itemList = fieldItem.getEntryNameList();
      int index = itemList.indexOf(itemName);
      if ((isUpward) ? index > 0 : index < itemList.size() - 1) {
        int nextIndex = (isUpward) ? index - 1 : index + 1;
        itemList.remove(index);
        itemList.add(nextIndex, itemName);
View Full Code Here

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

      return;
    }
    String itemName = dialog.getValue();
    TableItem item = new TableItem(this.itemListTable, SWT.NONE);
    String fieldItemId = this.itemCombo.getText();
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(fieldItemId);
    if (fieldItem != null) {
      List<String> itemList = fieldItem.getEntryNameList();
      itemList.add(itemName);
      fillItemTable(fieldItemId);
      updateDefaultItems(fieldItemId);
      updateFilterItems(fieldItemId);
    }
View Full Code Here

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

      return;
    }
    String newName = dialog.getValue();
    item.setText(newName);
    String fieldItemId = this.itemCombo.getText();
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(fieldItemId);
    if (fieldItem != null) {
      List<String> itemList = fieldItem.getEntryNameList();
      int index = itemList.indexOf(oldName);
      itemList.remove(index);
      itemList.add(index, newName);
      fillItemTable(fieldItemId);
      updateDefaultItems(fieldItemId);
View Full Code Here

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

   * @param longMessageKey the long message key.
   * @return the input dialog the <code>InputDialog</code>.
   */
  private InputDialog openDialog(String existingItemName, String shortMessageKey,
      String longMessageKey) {
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(this.itemCombo.getText());
    if (fieldItem != null) {
      final List<String> itemList = fieldItem.getEntryNameList();
      IInputValidator validator = new IInputValidator() {
        public String isValid(String newText) {
          if (!itemList.contains(ReviewI18n.getKey(newText))) {
            return null;
          }
View Full Code Here

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

  /**
   * Removes item entries form the table.
   */
  protected void removeItemEntries() {
    String fieldItemId = this.itemCombo.getText();
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(fieldItemId);
    if (fieldItem != null) {
      List<String> itemList = fieldItem.getEntryNameList();
      TableItem[] items = this.itemListTable.getSelection();
      for (int i = 0; i < items.length; i++) {
        String itemName = items[i].getText();
        itemList.remove(itemName);
      }
View Full Code Here

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

      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
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.