How to add buttons to the run window?
I would need to add a button to every run window's tool bar (next to the Rerun, Pause, Stop, Close etc. buttons). Inside that button's action, I would also need to find out the command line parameters of the application running in that window. How can I do this?
The purpose is that when the user wants to monitor a misbehaving application (for example take a memory snapshot or start a profiler), he could click a button in the run window which would then open that application in VisualVM.
Please sign in to leave a comment.
I have exactly same problem
:)I haven't tried this myself but I would have a look at the com.intellij.execution.actions.ConsoleActionsPostProcessor extension point (com.intellij.consoleActionsPostProcessor in plugin.xml).
thanks, hopefully I will figure out how to get the ProcessHandler, or some context...
Please try getting RunContentManager.RUN_CONTENT_DESCRIPTOR from the data context - this should help.
thanks, will look at it, but it is still bad solution, because those buttons are for console, and not the tool window.