void (@NotNull DefaultActionGroup group, @NotNull JComponent parent, @Nullable Sdk selectedSdk, @NotNull java.util.function.Consumer<? super Sdk> updateTree, @Nullable Predicate<? super SdkTypeId> filter) { Map<SdkType, NewSdkAction> downloadActions = createDownloadActions(filter); Map<SdkType, NewSdkAction> defaultAddActions = createAddActions(filter); for (SdkType type : getAddableSdkTypes(filter)) { NewSdkAction downloadAction = downloadActions.get(type); if (downloadAction != null) { group.add(downloadAction.setOverrides(selectedSdk, parent, updateTree)); } NewSdkAction defaultAction = defaultAddActions.get(type); if (defaultAction != null) { group.add(defaultAction.setOverrides(selectedSdk, parent, updateTree)); } } }