Small custom "Right Click" run application plugin

Case

1. Right click a file (for example an xml file) in project view.
2. Menu will show up with an item named "Run: use as argument" ->  lists available predefined run configurations.
3. This file will be used as an argument to a main class that is already defined in "Run/Configuration".

As far as i know this is not possible to do "out of the box". I have recently moved from Eclipse to Intellij.
I have not found any tutorials, code snippets etc.. on how to develop functionality like above.

Do you have any suggestions on where to start?
Which components and actions do i need to use?

1 comment
Comment actions Permalink

Hello Kristiandev,

First of all, please refer to the documentation at:
http://confluence.jetbrains.net/display/IDEADEV/PluginDevelopment
It describes the basics such as registering actions in the plugin.

To get the list of existing run configuration, use RunManager.getConfigurations(ApplicationConfigurationType.getInstance())

To change the parameters of an existing configuration, use ApplicationConfiguration.setProgramParameters()

To run the configuration, use ProgramRunnerUtil.executeConfiguration()

1. Right click a file (for example an xml file) in project view.
2. Menu will show up with an item named "Run: use as argument" ->
lists available predefined run configurations.
3. This file will be used as an argument to a main class that is
already defined in "Run/Configuration".
As far as i know this is not possible to do "out of the box". I have
recently moved from Eclipse to Intellij.
I have not found any tutorials, code snippets etc.. on how to develop
functionality like above.
Do you have any suggestions on where to start?
Which components and actions do i need to use?

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.