How to listen for source code change in the image ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to listen for source code change in the image ?

Steven Costiou-2

Hi,

where should i look at if i want a class of mine to be notified of any source code change in the image ?

Specifically i want to know if anything changed about a method (or its ast method node), anything that could happen like a refactoring operation or a source code change.

Steven.

Reply | Threaded
Open this post in threaded view
|

Re: How to listen for source code change in the image ?

Thierry Goubier
You need to register to the system announcer singleton to receive the MethodModified event, with, for example:

SystemAnnouncer uniqueInstance when: MethodModified send: #aMethodUpdated: to: self

Regards,

Thierry

2017-05-04 13:40 GMT+02:00 Steven Costiou <[hidden email]>:

Hi,

where should i look at if i want a class of mine to be notified of any source code change in the image ?

Specifically i want to know if anything changed about a method (or its ast method node), anything that could happen like a refactoring operation or a source code change.

Steven.


Reply | Threaded
Open this post in threaded view
|

Re: How to listen for source code change in the image ?

Steven Costiou-2

Thanks :)

Le 2017-05-04 13:55, Thierry Goubier a écrit :

You need to register to the system announcer singleton to receive the MethodModified event, with, for example:
 
SystemAnnouncer uniqueInstance when: MethodModified send: #aMethodUpdated: to: self
 
Regards,
 
Thierry

2017-05-04 13:40 GMT+02:00 Steven Costiou <[hidden email]>:

Hi,

where should i look at if i want a class of mine to be notified of any source code change in the image ?

Specifically i want to know if anything changed about a method (or its ast method node), anything that could happen like a refactoring operation or a source code change.

Steven.