Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320831

Summary: @PreSave not called for Lifecycle-Handler
Product: [Eclipse Project] e4 Reporter: Thomas Schindl <tom.schindl>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, emoffatt
Version: 0.9Flags: bokowski: review?
bokowski: review+
Target Milestone: 1.0 RC3   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch
none
patch none

Description Thomas Schindl CLA 2010-07-24 19:04:07 EDT
The @PreSave annotation is not called at all
Comment 1 Thomas Schindl CLA 2010-07-24 19:05:03 EDT
Beside that we should really make lifecycle stuff available to plug-ins as well!
Comment 2 Eric Moffatt CLA 2010-07-25 15:28:22 EDT
+1 yep, i'm in favor of having states in the model, see bug 279681.
Comment 3 Thomas Schindl CLA 2010-07-25 16:17:45 EDT
Created attachment 175188 [details]
patch

This makes @PreSave work
Comment 4 Boris Bokowski CLA 2010-07-25 16:24:21 EDT
+1
Comment 5 Thomas Schindl CLA 2010-07-25 16:29:21 EDT
Just an idea(In reply to comment #1)
> Beside that we should really make lifecycle stuff available to plug-ins as
> well!

As an idea. Should we create an extra context for Addons in 4.1 and shutdown this context before we save the model? This would give their @PreDestroy the chance to clean up the model.
Comment 6 Thomas Schindl CLA 2010-07-25 16:34:57 EDT
Created attachment 175189 [details]
patch

this patch makes the various annotations none mandatory
Comment 7 Eric Moffatt CLA 2010-07-25 16:36:12 EDT
+1 looks good.
Comment 8 Thomas Schindl CLA 2010-07-25 16:40:51 EDT
released to head - boris your flag is missing but you +1 on IRC