How to catch or implement Run and Debug event?

Hello!

Please, could somebody help me. I wonder, how can I catch Run- and Debug- event (on any run configuration) from my plugin and get at that moment run-configuration properties?
Do I need implement or extend some class or add some listener? I'm stuffed...

Thank you.

6 comments
Comment actions Permalink

Hello Andremoniy,

Please, could somebody help me. I wonder, how can I catch Run- and
Debug- event (on any run configuration) from my plugin and get at that
moment run-configuration properties?

Do I need implement or extend some class or add some listener? I'm
stuffed...


There is no API in IDEA for receiving this kind of notifications.

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


0
Comment actions Permalink

Really? It's a great pity!

I need to do some checking before running application, and break running, if something (some internal tests) are failed.

May be, there is any artful way to do this? For example, replace Actions on buttons (and menu items) "Run" and "Debug" with my own, which will reload exiting actions?

0
Comment actions Permalink

Dmitriy, as I see (while searching forum messages), this is an old promblem, since 2003 year, when some developers wanted to do something similar like my issue.
Is it strictly impossible problem to solve it?

0
Comment actions Permalink

Ok, I will try to reformulate my question.
Is it possible, to create some listener for monitoring RunConfiguration's state and set? It is first step. Next well be in reloading each of them with my wrapper, which will do some internal checks before running this configuration.

0
Comment actions Permalink

I agree with Andremoniy, it's a shame this isn't currently possible.

My team's projects are getting too large and I was hoping to whip up a plugin that would keep track of the amount of time that's spent compiling various projects on a daily basis.  This would illustrate exactly how much time we're sitting at our computers glazing over while 'Rebuilt Project' executes instead of spending some effort in rearchitecture to break apps into separately compiled layers.  Oh well.

0
Comment actions Permalink

On 2009-04-09 06:26:43 +0200, Penny Rohr <no_reply@jetbrains.com> said:

My team's projects are getting too large and I was hoping to whip up a
plugin that would keep track of the amount of time that's spent
compiling various projects on a daily basis. 


You could use pre- and post-compile tasks if you are just trying to
count some seconds. You could even do this with a clever ant script
that runs before/after compile and writes the time difference
somewhere. That way you wouldn't even need to write a plugin...

Jan

0

Please sign in to leave a comment.