Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320831 - @PreSave not called for Lifecycle-Handler
Summary: @PreSave not called for Lifecycle-Handler
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 0.9   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 1.0 RC3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-24 19:04 EDT by Thomas Schindl CLA
Modified: 2010-07-25 16:40 EDT (History)
2 users (show)

See Also:
bokowski: review?
bokowski: review+


Attachments
patch (1.80 KB, patch)
2010-07-25 16:17 EDT, Thomas Schindl CLA
no flags Details | Diff
patch (2.41 KB, patch)
2010-07-25 16:34 EDT, Thomas Schindl CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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