How can I listen for keyboard events on file with specified extension in project tree?
已回答
I have idea to open external program by pressing F3 on file with my custom extension. How can I listen for keyboard events on file with specified extension in project tree? Thanks.
请先登录再写评论。
Register AnAction implementation and add it to group ProjectViewPopupMenu, then obtain currently selected file via com.intellij.openapi.actionSystem.CommonDataKeys#VIRTUAL_FILE.
Additionally, you can restrict visibility/availability of your action by checking ActionPlaces.PROJECT_VIEW_POPUP in update() method.