void (@NotNull JButton editButton, @NotNull Project project, @NotNull Supplier<? extends Sdk> retrieveJDK) { myEditButton = editButton; myEditButton.addActionListener(e -> { final Sdk projectJdk = retrieveJDK.get(); if (projectJdk != null) { ProjectStructureConfigurable.getInstance(project).select(projectJdk, true); } }); addActionListener(l -> updateEditButton()); }