Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IResourceChangeListener usage
IResourceChangeListener usage [message #1072909] Tue, 23 July 2013 18:52 Go to next message
Camilo Bernal is currently offline Camilo BernalFriend
Messages: 7
Registered: December 2012
Junior Member
Hi,

I'm attempting to use the IResourceChangeListener interface to find out if a specific project(C/C++) has been built, and consequently execute a clean up action. At the moment I've registered the listener for events of type IResourceChangeEvent.POST_BUILD. The problem I'm facing is that the listener is being notified for more then just post-build events; it's getting notified for running/profiling projects. So my question is if there is a way to differentiate project post-build events that are triggered from manual/automatic builds. Also, what sort of events correspond to the IResourceChangeEvent.POST_BUILD type?
Re: IResourceChangeListener usage [message #1073112 is a reply to message #1072909] Wed, 24 July 2013 06:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Camilo,

Comments below.

On 23/07/2013 8:52 PM, Camilo Bernal wrote:
> Hi,
>
> I'm attempting to use the IResourceChangeListener interface to find
> out if a specific project(C/C++) has been built, and consequently
> execute a clean up action. At the moment I've registered the listener
> for events of type IResourceChangeEvent.POST_BUILD. The problem I'm
> facing is that the listener is being notified for more then just
> post-build events; it's getting notified for running/profiling projects.
Is that influenced by Window->Preference->Run/Debug->Launching->Build
(if required) before launching?
> So my question is if there is a way to differentiate project
> post-build events that are triggered from manual/automatic builds.
> Also, what sort of events correspond to the
> IResourceChangeEvent.POST_BUILD type?
What you're describing sounds more like something a builder should do.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: IResourceChangeListener usage [message #1073467 is a reply to message #1073112] Wed, 24 July 2013 21:35 Go to previous messageGo to next message
Camilo Bernal is currently offline Camilo BernalFriend
Messages: 7
Registered: December 2012
Junior Member
Ed Merks wrote on Wed, 24 July 2013 02:56
Camilo,

Comments below.

On 23/07/2013 8:52 PM, Camilo Bernal wrote:
> Hi,
>
> I'm attempting to use the IResourceChangeListener interface to find
> out if a specific project(C/C++) has been built, and consequently
> execute a clean up action. At the moment I've registered the listener
> for events of type IResourceChangeEvent.POST_BUILD. The problem I'm
> facing is that the listener is being notified for more then just
> post-build events; it's getting notified for running/profiling projects.
Is that influenced by Window->Preference->Run/Debug->Launching->Build
(if required) before launching?
> So my question is if there is a way to differentiate project
> post-build events that are triggered from manual/automatic builds.
> Also, what sort of events correspond to the
> IResourceChangeEvent.POST_BUILD type?
What you're describing sounds more like something a builder should do.


Inactivating the global 'Build before launching' preference does not seem to change the described behaviour of the launchers. I am now able to filter post-build events by project, but I still cannot pinpoint the nature of the build. Regarding the builder, this plug-in is using CDT's build system. If you could provide some pointers regarding how to go about modifying/extending the builder, I'd more than willing to try them out.
Re: IResourceChangeListener usage [message #1073614 is a reply to message #1073467] Thu, 25 July 2013 07:17 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Camilo,

I'm not sure you need to extend their builder. You likely could just
add a builder. http://www.vogella.com/articles/EclipseBuilder/article.html

On 24/07/2013 11:35 PM, Camilo Bernal wrote:
> Ed Merks wrote on Wed, 24 July 2013 02:56
>> Camilo,
>>
>> Comments below.
>>
>> On 23/07/2013 8:52 PM, Camilo Bernal wrote:
>> > Hi,
>> >
>> > I'm attempting to use the IResourceChangeListener interface to find
>> > out if a specific project(C/C++) has been built, and consequently >
>> execute a clean up action. At the moment I've registered the listener
>> > for events of type IResourceChangeEvent.POST_BUILD. The problem I'm
>> > facing is that the listener is being notified for more then just >
>> post-build events; it's getting notified for running/profiling
>> projects. Is that influenced by
>> Window->Preference->Run/Debug->Launching->Build (if required) before
>> launching?
>> > So my question is if there is a way to differentiate project >
>> post-build events that are triggered from manual/automatic builds. >
>> Also, what sort of events correspond to the >
>> IResourceChangeEvent.POST_BUILD type?
>> What you're describing sounds more like something a builder should do.
>
>
> Inactivating the global 'Build before launching' preference does not
> seem to change the described behaviour of the launchers. I am now able
> to filter post-build events by project, but I still cannot pinpoint
> the nature of the build. Regarding the builder, this plug-in is using
> CDT's build system. If you could provide some pointers regarding how
> to go about modifying/extending the builder, I'd more than willing to
> try them out.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Reorder tabs
Next Topic:Change default 'Group By' in Problems View
Goto Forum:
  


Current Time: Fri Mar 29 06:13:59 GMT 2024

Powered by FUDForum. Page generated in 0.02775 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top