Ejemplo n.º 1
0
  @Override
  public void run(IAction action) {
    update(action);

    if (getTargetPart() instanceof TaskEditor) {
      TaskEditor taskEditor = (TaskEditor) getTargetPart();

      IEditorInput editorInput = taskEditor.getEditorInput();

      if (editorInput instanceof TaskEditorInput) {
        TaskEditorInput taskEditorInput = (TaskEditorInput) editorInput;

        if (taskEditorInput.getTask().equals(task)) {

          IFormPage formPage = taskEditor.getActivePageInstance();
          if (formPage instanceof JiraTaskEditorPage) {
            JiraTaskEditorPage jiraFormPage = (JiraTaskEditorPage) formPage;

            startWork(jiraFormPage);

            return;
          }
        }
      }
    }

    startWork(null);
  }
 @Override
 public boolean canCreatePageFor(TaskEditorInput input) {
   if (input.getTask().getConnectorKind().equals(BugzillaCorePlugin.CONNECTOR_KIND)
       || TasksUiUtil.isOutgoingNewTask(input.getTask(), BugzillaCorePlugin.CONNECTOR_KIND)) {
     return true;
   }
   return false;
 }