Trying to get acess to RunManager /or Application instance

I am trying to write a plugin that provides Run/Debug functionality. Can I get access to the RunManager/Run Configuration? I need to extract information like mainclass/VM args on the selected Entry.

Is there a way to get that information from the API? Right now I managed to parse through the workspace file to extract such information. Is there a better way to do this?

I have a slight problem though. As users change their selection in the entry combobox, the workspace file (both virtual and physical copies are not updated right away). So when my app runs the "selected=true" target, it's the wrong one. If I force an application-level save-all, the workspace file is updated. I want to do this programmatically, but I have a hard time getting a reference to com.intellij.openapi.application.Application. Please tell me how to get a reference to an instance of Application. Thanks!


Please sign in to leave a comment.