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

Examples of edu.hawaii.ics.csdl.jupiter.ui.view.table.ReviewTableView


   *         allow the OK to happen.
   */
  public boolean performOk() {
    storeFieldEditors();
    storeComposites();
    ReviewTableView view = ReviewTableView.getActiveView();
    if (view != null) {
      boolean isFilterEnabled = this.store.getBoolean(ENABLE_FILTER_STORE_KEY);
      view.setFilterStatus(isFilterEnabled);
    }
    return super.performOk();
  }
View Full Code Here


     */
    public void run(IMarker marker) {
      if (reviewIssue != null) {
        String issueId = reviewIssue.getIssueId();
        ReviewIssueModel model = ReviewIssueModelManager.getInstance().getCurrentModel();
        ReviewTableView view = ReviewTableView.bringViewToTop();
        if (view == null) {
          log.warning("Review table view is null.");
          return;
        }
        Table table = view.getViewer().getTable();
        TableItem[] items = table.getItems();
        for (int i = 0; i < items.length; i++) {
          ReviewIssue reviewIssueInTable = (ReviewIssue) items[i].getData();
          if (reviewIssueInTable.getIssueId().equals(issueId)) {
            table.select(i);
View Full Code Here

      reviewIssueModel.notifyListeners(ReviewIssueModelEvent.MERGE);
      // fill the specified phase's column data into model
      ColumnDataModelManager columnDataModelManager = ColumnDataModelManager.getInstance();
      ColumnDataModel columnDataModel = columnDataModelManager.getModel(reviewPhaseNameKey);

      ReviewTableView view = ReviewTableView.getActiveView();
      // set column data model into view.
      // null happens when the view is not opened yet after Eclipse startup.
      if (view == null) {
        view = ReviewTableView.bringViewToTop();
      }
      view.createColumns(columnDataModel);
      PropertyResource propertyResource = PropertyResource.getInstance(project, true);
      String reviewIdString = reviewId.getReviewId();
      ReviewResource reviewResource = propertyResource.getReviewResource(reviewIdString, true);
      if (reviewResource != null) {
        FilterPhase filterPhase = reviewResource.getFilterPhase(reviewPhaseNameKey);
        view.setFilterStatus(filterPhase.isEnabled());
      }
    }
    else {
      reviewIssueModelManager.getCurrentModel();
    }
View Full Code Here

        String message = "Review file " + iReviewFile + " is readonly. Please make it writable " +
                         "to save your issues.";
        ReviewDialog.openSimpleComfirmMessageDialog("Review Management", message);
    }

    ReviewTableView tableView = ReviewTableView.getActiveView();
    String selectedIssueId = "";
    if (tableView != null) {
      TableItem[] selecteItems = tableView.getTable().getSelection();
      if (selecteItems.length > 0) {
        selectedIssueId = ((ReviewIssue) selecteItems[0].getData()).getIssueId();
      }
    }
   
    ReviewIssueModelManager reviewIssueModelManager = ReviewIssueModelManager.getInstance();
    ReviewIssueModel reviewIssueModel = reviewIssueModelManager.getModel(project, reviewId);
    reviewIssueModel.notifyListeners(ReviewIssueModelEvent.MERGE);

    ColumnDataModelManager columnDataModelManager = ColumnDataModelManager.getInstance();
    ColumnDataModel columnDataModel = columnDataModelManager.getModel(reviewPhaseNameKey);
   
    reviewModel = ReviewModel.getInstance();
    project = reviewModel.getProjectManager().getProject();
    reviewId = reviewModel.getReviewIdManager().getReviewId();
    reviewerId = reviewModel.getReviewerIdManager().getReviewerId();
    iReviewFile = FileResource.getReviewFile(project, reviewId, reviewerId);
    // null happens when the view is not opened yet after Eclipse startup.
    if (tableView == null) {
      tableView = ReviewTableView.bringViewToTop();
    }
    tableView.createColumns(columnDataModel);
    PropertyResource propertyResource = PropertyResource.getInstance(project, true);
    String reviewIdString = reviewId.getReviewId();
    ReviewResource reviewResource = propertyResource.getReviewResource(reviewIdString, true);
    IPreferenceStore store = ReviewPlugin.getInstance().getPreferenceStore();
    String prefFilterKey = FilterPreferencePage.ENABLE_FILTER_STORE_KEY;
    boolean isPrefFilterEnabled = store.getBoolean(prefFilterKey);
    if (isPrefFilterEnabled) {
      tableView.setFilterStatus(isPrefFilterEnabled);
    }
    else {
      if (reviewResource != null) {
        FilterPhase filterPhase = reviewResource.getFilterPhase(reviewPhaseNameKey);
        tableView.setFilterStatus(filterPhase.isEnabled());
      }
    }
   
    // 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);
        }
View Full Code Here

        String message = "Review file " + iReviewFile + " is readonly. Please make it writable " +
                         "to save your issues.";
        ReviewDialog.openSimpleComfirmMessageDialog("Review Management", message);
    }

    ReviewTableView view = ReviewTableView.getActiveView();
    int previousIndex = 0;
    if (view != null) {
      previousIndex = view.getTable().getSelectionIndex();
    }
   
    ReviewIssueModelManager reviewIssueModelManager = ReviewIssueModelManager.getInstance();
    ReviewIssueModel reviewIssueModel = reviewIssueModelManager.getModel(project, reviewId);
    log.debug("review issue model size: " + reviewIssueModel.size());
    reviewIssueModel.notifyListeners(ReviewIssueModelEvent.MERGE);

    ColumnDataModelManager columnDataModelManager = ColumnDataModelManager.getInstance();
    ColumnDataModel columnDataModel = columnDataModelManager.getModel(reviewPhaseNameKey);
   
    reviewModel = ReviewModel.getInstance();
    project = reviewModel.getProjectManager().getProject();
    reviewId = reviewModel.getReviewIdManager().getReviewId();
    reviewerId = reviewModel.getReviewerIdManager().getReviewerId();
    iReviewFile = FileResource.getReviewFile(project, reviewId, reviewerId);
    // null happens when the view is not opened yet after Eclipse startup.
    if (view == null) {
      log.debug("view is null");
      view = ReviewTableView.bringViewToTop();
    }
    view.createColumns(columnDataModel);
    PropertyResource propertyResource = PropertyResource.getInstance(project, true);
    String reviewIdString = reviewId.getReviewId();
    ReviewResource reviewResource = propertyResource.getReviewResource(reviewIdString, true);
    IPreferenceStore store = ReviewPlugin.getInstance().getPreferenceStore();
    String prefFilterKey = FilterPreferencePage.ENABLE_FILTER_STORE_KEY;
    boolean isPrefFilterEnabled = store.getBoolean(prefFilterKey);
    if (isPrefFilterEnabled) {
      view.setFilterStatus(isPrefFilterEnabled);
    }
    else {
      if (reviewResource != null) {
        FilterPhase filterPhase = reviewResource.getFilterPhase(reviewPhaseNameKey);
        view.setFilterStatus(filterPhase.isEnabled());
      }
    }
   
    // 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);
      }
View Full Code Here

    log.debug("updateAllMarkersInReviewId are called.");
    ReviewModel reviewModel = ReviewModel.getInstance();
    IProject project = reviewModel.getProjectManager().getProject();
    if (project != null) {
      clearMarkersInReviewId();
      ReviewTableView view = ReviewTableView.getActiveView();
      if (view == null) {
        return;
      }
      TableItem[] items = view.getViewer().getTable().getItems();
      for (int i = 0; i < items.length; i++) {
        ReviewIssue reviewIssue = (ReviewIssue) items[i].getData();
        if (!reviewIssue.getTargetFile().equals("")) {
          Map<String, Object> attributes = getInitialAttributes(reviewIssue);
          try {
View Full Code Here

    ReviewModel reviewModel = ReviewModel.getInstance();
    IProject project = reviewModel.getProjectManager().getProject();
    if (project != null) {
      String fileFullPath = file.getFullPath().toString();
      clearMarkers(file);
      ReviewTableView view = ReviewTableView.getActiveView();
      if (view == null) {
        return;
      }
      TableItem[] items = view.getViewer().getTable().getItems();
      for (int i = 0; i < items.length; i++) {
        ReviewIssue reviewIssue = (ReviewIssue) items[i].getData();
        if (!reviewIssue.getTargetFile().equals("")) {
          Map<String, Object> attributes = getInitialAttributes(reviewIssue);
          try {
View Full Code Here

        }
      }

      ReviewTableView[] tableViews = ReviewTableView.getViews();
      for (int i = 0; i < tableViews.length; i++) {
        ReviewTableView tableView = tableViews[i];
        if (tableView != null) {
         
          Table table = tableView.getTable();
          TableItem[] items = table.getItems();
          for (int j = 0; j < items.length; j++) {
            ReviewIssue reviewIssue = (ReviewIssue) items[j].getData();

            String targetFileRelativePath = reviewIssue.getTargetFile();
View Full Code Here

      columnDataModel.addAll(columnDataList);
      PrefResource.getInstance().storeColumnDataModel(reviewPhaseNameKey, columnDataModel);
    }
    // Updates the view.
    ColumnDataModel columnDataModel = columnDataModelManager.getModel(reviewPhaseNameKey);
    ReviewTableView view = ReviewTableView.getActiveView();
    // null happens when the view is not opened yet after Eclipse startup.
    if (view == null) {
      view = ReviewTableView.bringViewToTop();
    }
    view.createColumns(columnDataModel);
    view.getViewer().refresh();
    return true;
  }
View Full Code Here

        }
      }
    }
    else {
      reviewIssueModel.add(savingReviewIssue);
      ReviewTableView view = ReviewTableView.getActiveView();
      if (view == null) {
        view = ReviewTableView.bringViewToTop();
      }
      view.getViewer().refresh();
      Table table = view.getTable();
      table.select(0);
      updateNextPreviousIcon();
      reviewIssueModel.notifyListeners(ReviewIssueModelEvent.ADD);
    }
    return true;
View Full Code Here

TOP

Related Classes of edu.hawaii.ics.csdl.jupiter.ui.view.table.ReviewTableView

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.