Open FWDekker opened 1 year ago
I feel like I've investigated this before, but this is not actually possible, because the numbering is determined by a setting of JBPopupFactory
, and is not something I have control over (beyond enabling/disabling it). Therefore, this issue cannot (currently) be solved.
Actually, I think I can solve this. Simply put the settings entry at the very top, similar to IntelliJ's own Run configurations popup, where 0
is always the first entry, and pressing 0
while focusing on an entry will open the settings focused on that entry.
JBPopupFactory
(and the deeply nested class that makes the popup) only supports displaying the entries in the order 1, 2, ..., 9, 0, A, B, ..., Z
. As a result, the settings action will be at 1
, and the first template action at 2
. In the settings dialog, the templates will thus start at 2
, which I dislike.
Therefore, the solution will be to implement a custom PopupStep
class which has the desired behaviour. With this additional freedom, I can also add other nice features. I will add this to the issue's description. I will postpone the code rewrite to v3.1.0.
The current popup would benefit from more customisation and features, including:
0
.0
mnemonic while focussing on some template, then that template is opened in the settings.PropertiesComponent
.)This can be achieved by implementing my own
PopupStep
.Old description: It annoys me to no end that the "0" shortcut in the settings by default refers to the settings, but that's only because it's coincidentally the 10th scheme. I think configuring it to always link to opening the main settings would be a more logical choice.