Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMap notify problem
EMap notify problem [message #420173] Fri, 20 June 2008 10:07 Go to next message
Petr Kalafatic is currently offline Petr KalafaticFriend
Messages: 10
Registered: July 2009
Junior Member
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 11:43 Go to previous messageGo to next message
Petr Kalafatic is currently offline Petr KalafaticFriend
Messages: 10
Registered: July 2009
Junior Member
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 12:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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);
> --
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Resource$IOWrappedException: The resource tree is locked for modifications.
Next Topic:Teneo persistency - performance questions
Goto Forum:
  


Current Time: Tue Apr 23 15:18:16 GMT 2024

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

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

Back to the top