void (final @NotNull LookupElement element, @NotNull Lookup lookup, @NotNull Consumer<? super @NotNull LookupElementAction> consumer) { final StaticallyImportable item = element.as(StaticallyImportable.CLASS_CONDITION_KEY); if (item == null || !item.canBeImported()) { return; } final Icon checkIcon = PlatformIcons.CHECK_ICON; final Icon icon = item.willBeImported() ? checkIcon : EmptyIcon.create(checkIcon); consumer.consume(new LookupElementAction(icon, JavaBundle.message("import.statically")) { @Override public Result performLookupAction() { item.setShouldBeImported(!item.willBeImported()); return new Result.ChooseItem(element); } }); }