Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Listener when unload/load resource
Listener when unload/load resource [message #336144] Tue, 26 May 2009 15:05 Go to next message
David CHAUTARD is currently offline David CHAUTARD
Messages: 102
Registered: July 2009
Senior Member
Hello,
I would like to add a listener to know when my resource is unload/load, in
order to refresh my UI page. Because at present I have a
IResourceChangeListener, but the resourceChanged method is only called
when my resource is saved, and my resource is not always unload/load
before the save.

How can I do that?
Thx
David
Re: Listener when unload/load resource [message #336181 is a reply to message #336144] Thu, 28 May 2009 08:34 Go to previous messageGo to next message
David CHAUTARD is currently offline David CHAUTARD
Messages: 102
Registered: July 2009
Senior Member
Hi,
to resolve my problem, my page implements INotifyChangedListener, and the
notifyChanged method is called when the resource is modified. And in the
method I test if the resource is loaded to refresh or not my page.

David
Re: Listener when unload/load resource [message #336183 is a reply to message #336181] Thu, 28 May 2009 10:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26137
Registered: July 2009
Senior Member
David,

I guess this was an EMF question. You can directly listen to EMF
Resources by adding an Adapter to its eAdapters() list.


David wrote:
> Hi,
> to resolve my problem, my page implements INotifyChangedListener, and
> the notifyChanged method is called when the resource is modified. And
> in the method I test if the resource is loaded to refresh or not my page.
>
> David
>
Re: Listener when unload/load resource [message #336189 is a reply to message #336183] Thu, 28 May 2009 13:07 Go to previous message
David CHAUTARD is currently offline David CHAUTARD
Messages: 102
Registered: July 2009
Senior Member
Thanks for your answer, I try to set up your solution. It's like the
"problemIndicationAdapter" in a generated editor, in the createModel()
method.

David.
Previous Topic:IResourceListener only called at workspace level.
Next Topic:Distributing prefs
Goto Forum:
  


Current Time: Thu Oct 23 11:58:46 GMT 2014

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

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