boolean () { if (myProject != null && stateUpdatesSupportedFor(myTask) && myKindCombo.getComboBox().getItemCount() == 0) { final JComboBox comboBox = myKindCombo.getComboBox(); final TaskRepository repository = myTask.getRepository(); assert repository != null; new ComboBoxUpdater<CustomStateTrinityAdapter>(myProject, TaskBundle.message("progress.title.fetching.available.task.states"), comboBox) { @NotNull @Override protected List<CustomStateTrinityAdapter> fetch(@NotNull ProgressIndicator indicator) throws Exception { return CustomStateTrinityAdapter.wrapList(repository.getAvailableTaskStates(myTask)); } @Nullable @Override public CustomStateTrinityAdapter getSelectedItem() { final CustomTaskState state = getPreferredState(repository, CustomStateTrinityAdapter.unwrapList(myResult)); return state != null ? new CustomStateTrinityAdapter(state) : null; } }.queue(); return true; } return false; }