Skip to main content



      Home
Home » Modeling » EMF » EMap notify problem
EMap notify problem [message #420173] Fri, 20 June 2008 06:07 Go to next message
Eclipse UserFriend
Hi,
I have an EMap<String, Object> in model, I can add entry but -
I don't receive any notification ( after save resource only ).
I think the problem is adding the adapter to map.
How can I add adapter to EMap ?
Could you help please ?
--
EContentAdapter contentAdapter = new EContentAdapter() {
public void notifyChanged(Notification notification) {
super.notifyChanged(notification);
System.out.println("Notfication received");
}
};
TorrentsFactoryImpl.eINSTANCE.getTorrentsPackage() .getCoreModel_TorrentMap().eAdapters().add(contentAdapter);
--
Re: EMap notify problem [message #420175 is a reply to message #420173] Fri, 20 June 2008 07:43 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
the problem was solved :-)
Regards Petr


--
coreModel = (CoreModel)
ClientModel.getTorrentsModel().getContents().get(0);
coreModel.eAdapters().add(contentAdapter);
--
Re: EMap notify problem [message #420179 is a reply to message #420175] Fri, 20 June 2008 08:49 Go to previous message
Eclipse UserFriend
Petr,

Yes, adding an adapter to the meta model, which should not be changing,
rather than to an instance, isn't going to help. :-P


Petr Kalafatic wrote:
> Hi,
> the problem was solved :-)
> Regards Petr
>
>
> --
> coreModel = (CoreModel)
> ClientModel.getTorrentsModel().getContents().get(0);
> coreModel.eAdapters().add(contentAdapter);
> --
>
Previous Topic:Resource$IOWrappedException: The resource tree is locked for modifications.
Next Topic:Teneo persistency - performance questions
Goto Forum:
  


Current Time: Sat Jul 05 11:05:05 EDT 2025

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

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

Back to the top