public static @Nullable <T> T getTarget(@NotNull AnActionEvent e, @NotNull Class<T> clazz) {
    Object[] items = e.getData(PlatformCoreDataKeys.SELECTED_ITEMS);
    return items != null && items.length == 1 ? ObjectUtils.tryCast(items[0], clazz) : null;
  }
public static @Nullable <T> T getTarget(@NotNull AnActionEvent e, @NotNull Class<T> clazz)