Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » No notifications for changes to model objects after saving a JpoxResource
No notifications for changes to model objects after saving a JpoxResource [message #615984] Wed, 26 March 2008 11:23
Florian Hackenberger is currently offline Florian HackenbergerFriend
Messages: 123
Registered: July 2009
Senior Member

I'm using an EMF editor backed by Teneo with a JpoxResource. In addition I'm
using the EMF validation framework with a live validation. Upon loading the
editor with the resource, notifications about model changes are passed to
my validation class. After saving the resource however, changes to the
model do not result in any notifications. I have debugged the problem a
bit. Upon a call to a setter method on a model object, the method checks
for eNotificationRequired() and sends a notification if the check returns
true. It returns true before hitting save, but it does not after the
resource was saved once.

The following code is an excerpt of the save(Map<?, ?> options) method of

public void save(Map<?, ?> options) {
boolean err = true;
try {
err = false;
} finally {

It disables notifications, saves the resource and enabled notifications
afterwards. The problem is that the second call to setAllowNotifications()
does not propagate to all model objects. The reason is the use of the
NonLoadingEContentsEList class in getNonResolvingContent(EObject) of the
StoreResource class. setAllowNotifications(boolean) uses this method to
iterate over the content and the loaded member variable of the
PersistableEList of the reference containing all model elements is false
after saving the resource.

Shall I file a bug or is that expected behaviour?

Florian Hackenberger
Previous Topic:[Teneo] Creating/Opening several GMF diagrams
Next Topic:RE: Merge EMF Models
Goto Forum:

Current Time: Sat Jun 25 22:30:03 GMT 2022

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

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

Back to the top