Retrieving information from CompilerMessagesPopup on action
Answered
I added a new action to the compiler messages popup via
<add-to-group group-id="CompilerErrorViewPopupMenu" anchor="first"/>

Now I want to use this action to retrieve information about the message on which this action was invoked, like what text is being displayed in this message and any other information that can be provided.
This is where I am stuck, because I can't seem to retrieve any information from the generated AnActionEvent for the CompilerMessagesPopup and I can't seem to find any information on how to achieve this.
Please sign in to leave a comment.
CommonDataKeys.NAVIGATABLE will resolve to source location (if available).
You should be able to obtain tree component com.intellij.ide.errorTreeView.NewErrorTreeViewPanel via com.intellij.openapi.actionSystem.PlatformDataKeys#CONTEXT_COMPONENT which offers access to current node (getSelectedErrorTreeElement, getSelectedNodeDescriptor)
Thank you, that helped me a lot. Here is the code I'm using so far, if anyone else needs this.