void (ActionEvent e) { final List<String> macros = ContainerUtil.map(myMacrosMap.keySet(), s -> s.startsWith("%") ? s : "$" + s + "$"); JBPopupFactory.getInstance() .createPopupChooserBuilder(macros) .setItemChosenCallback((value) -> textAccessor.setText(value)) .setMovable(false) .setResizable(false) .createPopup() .showUnderneathOf(button); }