Caius Brindescu
Caius Brindescu

Reputation: 617

Intellij IDEA: Get notified when a Run Configuration is launched

I would like to get notified when a Run Configuration is launched in IntelliJ. Basically, I would like to get called whenever the user clicks the run button.

I have discovered the BeforeRunTask class but this does seem to allow me to run any arbitrary code when it is invoked. Is that the right way to go, or is there a better way?

Thanks, -Caius

Upvotes: 0

Views: 253

Answers (1)

Emerson Farrugia
Emerson Farrugia

Reputation: 11363

In the Run Configuration dialog, check the Before Launch pane. You can run an external tool or a Maven goal (if it's a Maven project) by clicking the + button. That should give you lots of flexibility.

Upvotes: 1

Related Questions