void (ChooseByNamePopup popup, Object element) { TaskManager taskManager = TaskManager.getManager(project); if (element instanceof TaskPsiElement) { Task task = ((TaskPsiElement)element).getTask(); LocalTask localTask = taskManager.findTask(task.getId()); if (localTask != null) { taskManager.activateTask(localTask, !shiftPressed.get()); } else { showOpenTaskDialog(project, task); } } else if (element == CREATE_NEW_TASK_ACTION) { LocalTask localTask = taskManager.createLocalTask(CREATE_NEW_TASK_ACTION.getTaskName()); showOpenTaskDialog(project, localTask); } }