void (@NotNull Project project, @NotNull String prefix) { ApplicationManager.getApplication().invokeLater(() -> { if (project.isDisposed()) return; final AutoImportOptionsConfigurable configurable = new AutoImportOptionsConfigurable(project); ShowSettingsUtil.getInstance().editConfigurable(project, configurable, () -> { final JavaAutoImportOptions options = ContainerUtil.findInstance(configurable.getConfigurables(), JavaAutoImportOptions.class); options.addExcludePackage(prefix); }); }); }