Wait for the user to select an item from a popup

已回答

hi, I created a popup like so:

JBPopupFactory
.getInstance()
.createListPopup(PopUpMenu("Select a pod to impersonate", pods))
.show(RelativePoint.fromScreen(Point(600, 200)));

but I want to wait for the user to select the item.. how do I do that? Tried what was mentioned here https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html?from=jetbrains.org#read-write-lock but that didnt really solve my problem? Maybe I used the lock wrong? I'd appreciate any ideas! Thanks

帖子评论已关闭。