Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 268679 - Implement persistence of model changes
Summary: Implement persistence of model changes
Status: RESOLVED WORKSFORME
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 0.9   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.9 RC1   Edit
Assignee: Project Inbox CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on: 271644
Blocks:
  Show dependency tree
 
Reported: 2009-03-15 14:07 EDT by Boris Bokowski CLA
Modified: 2010-07-05 08:54 EDT (History)
2 users (show)

See Also:


Attachments
patch (13.65 KB, patch)
2009-03-15 14:13 EDT, Boris Bokowski CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Bokowski CLA 2009-03-15 14:07:50 EDT
- update model when window size changes
- save model on shutdown
- read saved model on startup unless the Application.xmi file is newer
Comment 1 Boris Bokowski CLA 2009-03-15 14:13:29 EDT
Created attachment 128846 [details]
patch

I had to remove a call to Shell.pack() from CSSSWTApplyStylesListener.
Comment 2 Boris Bokowski CLA 2009-03-15 14:13:57 EDT
Released to HEAD.
Comment 3 Boris Bokowski CLA 2009-03-15 14:14:08 EDT
.
Comment 4 Boris Bokowski CLA 2009-03-15 17:26:16 EDT
Released some more changes to persist the column widths of the Exif view.
Comment 5 Kevin McGuire CLA 2009-04-07 13:58:30 EDT
(In reply to comment #1)
> Created an attachment (id=128846) [details]
> patch
> 
> I had to remove a call to Shell.pack() from CSSSWTApplyStylesListener.

Why?

I'm suspicious that this code is needed for lazy applying of styles.
Comment 6 Kevin McGuire CLA 2009-04-07 14:02:59 EDT
Opened bug #271501 to track the CSS issue.
Comment 7 Boris Bokowski CLA 2009-04-07 14:06:29 EDT
(In reply to comment #5)
> > I had to remove a call to Shell.pack() from CSSSWTApplyStylesListener.
> 
> Why?

Because I wanted to be able to persist the bounds of the shell. Calling pack() will resize the shell to the minimum preferred size.
Comment 8 Kevin McGuire CLA 2009-04-07 15:35:12 EDT
(In reply to comment #7)
> (In reply to comment #5)
> > > I had to remove a call to Shell.pack() from CSSSWTApplyStylesListener.
> > 
> > Why?
> 
> Because I wanted to be able to persist the bounds of the shell. Calling pack()
> will resize the shell to the minimum preferred size.

Right.  I'll investigate why we're doing it and if there's another way. 

Comment 9 Angelo ZERR CLA 2009-04-08 02:55:08 EDT
Hi,

As Kevin said, CSSSWTApplyStylesListener is used to apply styles with lazy mode. Do you need apply styles with lazy mode? If you need not that (you must call engine.applyStyles(shell, false) somewhere), you can instanciate CSS engine without lazy mode, like this : 

CSSEngine engine = new CSSSWTEngineImpl(display);

AND not like this : 

CSSEngine engine = new CSSSWTEngineImpl(display, true);

Regards Angelo
Comment 10 Kevin McGuire CLA 2009-04-08 10:36:50 EDT
For our use in modelled UI we could likely get away without relying on lazy style application.  Instead, the renderers could explicitly style the part controls after create.

Lets continue the discussion in bug #271501
Comment 11 Kevin McGuire CLA 2009-04-08 10:58:46 EDT
Reopening.  Proper fix requires #271644.
Comment 12 Remy Suen CLA 2010-07-05 08:54:46 EDT
The reconciler is taking care of this.