Пример #1
0
  /**
   * @param taskData
   * @param iTask
   * @return false if the process of stopping work should be broken
   */
  private boolean showLogWorkDialog(TaskData taskData, ITask iTask) {
    if (MonitorUiPlugin.getDefault().isActivityTrackingEnabled()) {

      long seconds = JiraUiUtil.getLoggedActivityTime(iTask);

      LogJiraTimeDialog dialog =
          new LogJiraTimeDialog(
              PlatformUI.getWorkbench().getDisplay().getActiveShell(), taskData, iTask, seconds);

      int result = dialog.open();

      if (result == Window.OK) {
        workLog = dialog.getWorkLog();
      } else if (result == LogJiraTimeDialog.SKIP_LOGGING) {
        workLog = null;
      } else {
        return false;
      }
    }
    return true;
  }
 public static void addListener() {
   String rand = Math.random() + "";
   helper(rand);
   MonitorUiPlugin.getDefault().addInteractionListener(new BeneEventListener());
 }