private static @NotNull List<Navigatable> getNavigatables(@NotNull DataContext context) {
    Navigatable[] array = CommonDataKeys.NAVIGATABLE_ARRAY.getData(context);
    if (array == null || array.length == 0) {
      return Collections.emptyList();
    }

    List<Navigatable> list = ContainerUtil.filter(array, Navigatable::canNavigateToSource);
    if (list.isEmpty() && Registry.is("edit.source.on.enter.key.non.source.navigation.enabled")) {
      for (Navigatable navigatable : array) {
        if (navigatable.canNavigate()) {
          // only one non-source navigatable should be supported
          // @see OpenSourceUtil#navigate(boolean, boolean, Iterable)
          return Collections.singletonList(navigatable);
        }
      }
    }
    return list;
  }
private static @NotNull List<Navigatable> getNavigatables(@NotNull DataContext context)