private @Nullable BeforeRunTaskAndProvider getSelection() {
    int index = myList.getSelectedIndex();
    if (index == -1) {
      return null;
    }
    BeforeRunTask<?> task = myModel.getElementAt(index);
    BeforeRunTaskProvider<BeforeRunTask<?>> provider = getProvider(myRunConfiguration.getProject(), task.getProviderId());
    return provider == null ? null : new BeforeRunTaskAndProvider(task, provider, index);
  }
private @Nullable BeforeRunTaskAndProvider getSelection()