Package edu.hawaii.ics.csdl.jupiter.ui.view.editor

Examples of edu.hawaii.ics.csdl.jupiter.ui.view.editor.ReviewEditorView


      menuItem.setText(reviewIssue.getSummary());
      menuItem.setData(reviewIssue);
      menuItem.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent event) {
          ReviewIssue targetReviewIssue = (ReviewIssue) event.widget.getData();
          ReviewEditorView view = ReviewEditorView.getActiveView();
          if (view != null) {
            view.setReviewIssue(targetReviewIssue);
          }
          log.debug("SUMMARY:: " + targetReviewIssue.getSummary());
        }
      });
    }
View Full Code Here


                         " save your issues.";
        ReviewDialog.openSimpleComfirmMessageDialog("Review Management", message);
    }
   
    try {
      ReviewEditorView editorView = ReviewEditorView.bringViewToTop();
      editorView.setEnable(true);
     
      // you cannot just get the line number, verify that the active file is the same as the target file
      // TODO Is it ok to assume that just because the files match the line number should be used?
      // this may not be case if the file is active and the user right-clicked on it from the package manager
      String line = "";
      if (selectedFile != null && selectedFile.equals(FileResource.getActiveFile())) {
        line = getLineNumber();
      }
     
      if (!targetFilePath.equals("")) {
        ReviewIssue reviewIssue = new ReviewIssue(new Date(), new Date(),
          reviewerId.getReviewerId(), "", targetFilePath, line,
          (Type) TypeKeyManager.getInstance(project, reviewId).getItem(0),
          (Severity) SeverityKeyManager.getInstance(project, reviewId).getItem(0),
          "", this.selectedText, "", "",
          (Resolution) ResolutionKeyManager.getInstance(project, reviewId).getItem(0),
          (Status) StatusKeyManager.getInstance(project, reviewId).getItem(0),
          iReviewFile);
        reviewIssue.setLinkStatus(true);
        ReviewEditorViewAction.NEXT.setEnabled(false);
        ReviewEditorViewAction.PREVIOUS.setEnabled(false);
        editorView.setReviewIssue(reviewIssue);
      }
      else {
        editorView.setNewEmptyReviewIssue(iReviewFile);
      }
      editorView.setItemFields(project, reviewId);
      editorView.setFocus();
    }
    catch (ReviewException e) {
      e.printStackTrace();
     log.debug(e.getMessage());
    }
View Full Code Here

      }
    }
   
    // Opens editor view.
    try {
      ReviewEditorView editorView = ReviewEditorView.bringViewToTop();
      TableItem[] tableItems = tableView.getTable().getItems();
      boolean isFound = false;
      // select the previous selected item.
      for (int i = 0; i < tableItems.length; i++) {
        String issueId = ((ReviewIssue) tableItems[i].getData()).getIssueId();
        if (issueId.equals(selectedIssueId)) {
          tableView.getTable().select(i);
          isFound = true;
          break;
        }
      }
      if (!isFound) {
        if (tableView.getTable().getItemCount() > 0) {
          tableView.getTable().select(0);
        }
        else {
          editorView.clearAllFields();
          editorView.setEnable(false);
        }
      }
      ReviewTableViewAction.NOTIFY_EDITOR.run();
      editorView.bringTagToTop(reviewPhaseNameKey);
    }
    catch (ReviewException e) {
      return false;
    }
    return true;
View Full Code Here

      }
    }
   
    // Opens editor view.
    try {     
      ReviewEditorView editorView = ReviewEditorView.bringViewToTop();
      if (previousIndex != -1 && previousIndex < view.getTable().getItemCount()) {
        view.getTable().select(previousIndex);
        ReviewTableViewAction.NOTIFY_EDITOR.run();
      }
      else {
        editorView.setEnable(false);
      }
      editorView.bringTagToTop(reviewPhaseNameKey);
    }
    catch (ReviewException e) {
      log.debug(e.getMessage());
      return false;
    }
View Full Code Here

TOP

Related Classes of edu.hawaii.ics.csdl.jupiter.ui.view.editor.ReviewEditorView

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.