Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Features code no more executed after Diagram Reopened(With custom ResourceImpl for storing business model object to MongoDB background)
Features code no more executed after Diagram Reopened [message #1474222] Sat, 15 November 2014 07:59 Go to next message
Hammad A is currently offline Hammad AFriend
Messages: 6
Registered: December 2013
Junior Member
Hi,
Using graphiti 0.11 eclipse Luna and providing custom xxResourceImpl subclassing default EMF ResourceImpl that persists business objects to MongoDB - everything works well in one diagram open session.

When I close and reopen diagram, pictogram elements in diagram editor are still there but they lose track with all of its features. Like if now I delete my pictogram element, it no more causes execution of xxDeleteFeature/xxDirectEditing etc and also loses connection with Adapters (change notifications).

I doubt my xxResourceImpl for EMF persistence isnt complete as I am subclassing default ResourceImpl (EMF) and overriding its save/doSave (please note load/doLoad overridden methods dont execute either even in first execution).

Any pointers?

[Updated on: Sat, 15 November 2014 08:44]

Report message to a moderator

Re: Features code no more executed after Diagram Reopened [message #1474548 is a reply to message #1474222] Sat, 15 November 2014 14:10 Go to previous messageGo to next message
Hammad A is currently offline Hammad AFriend
Messages: 6
Registered: December 2013
Junior Member
By the way, I register my xxResourceFactoryImpl with diagram's resourceSet at the time of execution of create feature. I believe when my diagram loads again, its not aware of my xxResourceImpl.

diagram.eResource().getResourceSet().getResourceFactoryRegistry()
.getExtensionToFactoryMap()
.put("xx", new xxResourceFactoryImpl());

How do I ensure that my xxResourceImpl is available to hanlde URIs of lets say xx extension first thing when diagram loads?
Re: Features code no more executed after Diagram Reopened [message #1480889 is a reply to message #1474548] Thu, 20 November 2014 15:22 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1898
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hammad,

this is more an EMF related question, I will try to answer anyhow...

if you have not defined anything else, EMF will by default use
ResourceFactoryRegistryImpl to create a new resource instance. I gues you
need to register your resource implementation with your URI scheme, see e.g.
https://www.eclipse.org/forums/index.php/t/123514/.

Michael
Previous Topic:How to disable Ctrl+Z option
Next Topic:How to add a search bar on top of IPaletteCompartmentEntries
Goto Forum:
  


Current Time: Wed Sep 19 07:18:44 GMT 2018

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

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

Back to the top