void (@NotNull AnAction action, @NotNull Presentation presentation) { Character mnemonic = null; if (myShowNumbers) { if (myCurrentNumber < 9) { mnemonic = Character.forDigit(myCurrentNumber + 1, 10); } else if (myCurrentNumber == 9) { mnemonic = '0'; } else if (myUseAlphaAsNumbers) { mnemonic = (char)('A' + myCurrentNumber - 10); } myCurrentNumber++; } boolean prependSeparator = (!myListModel.isEmpty() || mySeparatorText != null) && myPrependWithSeparator; List<PopupFactoryImpl.InlineActionItem> inlineItems = action instanceof InlineActionsHolder ? createInlineActionsItems(((InlineActionsHolder)action).getInlineActions()) : Collections.emptyList(); PopupFactoryImpl.ActionItem actionItem = new PopupFactoryImpl.ActionItem( action, mnemonic, myShowNumbers, myHonorActionMnemonics, myMaxIconWidth, myMaxIconHeight, prependSeparator, mySeparatorText, inlineItems); actionItem.updateFromPresentation(presentation, myActionPlace); myListModel.add(actionItem); myPrependWithSeparator = false; mySeparatorText = null; }