Dat Chu
Dat Chu

Reputation: 11130

How to add IntelliJ Run Configuration quick create?

When using IntelliJ 15, I notice that classes which has a main will have a little icon on the left legend (see image, they are the blue window icons on line starting with "object ICE" and "def main"). When I click on one of these icons, IntelliJ suggests that I create a Run Configuration for this class.

What is this feature called? Is it Run Configuration Provider?

I have already had a plugin that can create smart Run Configuration when I choose from the menu Run -> Run... . What interface / feature do I need to implement so my plugin can provide this "quick create" feature?

IntelliJ Run Configuration helper

Upvotes: 1

Views: 382

Answers (1)

Bastien Jansen
Bastien Jansen

Reputation: 8836

You have to register an instance of RunLineMarkerContributor using the extension point runLineMarkerContributor.

See ApplicationRunLineMarkerProvider.java for an example. Note that this was added in IntelliJ 15, you won't be able to build your plugin with an SDK < 15, although older versions will still be able to run your plugin because they will simply ignore this extension point.

Upvotes: 2

Related Questions