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
Hi!

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
StoreResource:

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

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?

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


Current Time: Fri Jun 18 05:00:16 GMT 2021

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

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

Back to the top