void () { final TaskManagerImpl taskManager = (TaskManagerImpl)TaskManager.getManager(myProject); if (myUpdateState.isSelected()) { final CustomTaskState taskState = myTaskStateCombo.getSelectedState(); final TaskRepository repository = myTask.getRepository(); if (repository != null && taskState != null) { try { repository.setTaskState(myTask, taskState); repository.setPreferredOpenTaskState(taskState); } catch (Exception ex) { Messages.showErrorDialog(myProject, ex.getMessage(), TaskBundle.message("dialog.title.cannot.set.state.for.issue")); LOG.warn(ex); } } } for (TaskDialogPanel panel : myPanels) { panel.commit(); } if (myTask.getRepository() != null) { TaskManagementUsageCollector.logOpenRemoteTask(myProject, myTask); } else { TaskManagementUsageCollector.logCreateLocalTaskManually(myProject); } taskManager.activateTask(myTask, isClearContext(), true); if (myTask.getType() == TaskType.EXCEPTION && AnalyzeTaskStacktraceAction.hasTexts(myTask)) { AnalyzeTaskStacktraceAction.analyzeStacktrace(myTask, myProject); } }