Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » save/restore window layout(ResourceHandler and ModelAssembler Problem)
save/restore window layout [message #1234972] Thu, 23 January 2014 09:04 Go to next message
Beat Schaller is currently offline Beat SchallerFriend
Messages: 42
Registered: July 2009
Member
We are working on a pure Eclipse 4 business application. Different windows on different monitor should be saved as a defined layout.

I have implemented a ResourceHandler that saves the configuration for each user/machine (no deltas) and restore this configuration when starting. Depending on the definition location of the TrimmedWindow it works - or not. The window defined in Application.e4xmi works fine. With the windows defined in the fragments.e4xmi of the plugins we have a problem:

java.lang.IllegalArgumentException: The selected element org.eclipse.e4.ui.model.application.ui.basic.impl.TrimmedWindowImpl@7da17da1...must be visible in the UI presentation

If I remove the selectedElement in the <application:Application ..> tag the window is restored. But the x, y, width and height are not correct. After debugging I saw that the ModelAssembler class overwrites this values. If I remove the ModelAssembler in our ResourceHandler just when restoring it works all fine.

Can I just ignore the ModelAssembler when restoring?

Thx for any help on this subject
Beat
Re: save/restore window layout [message #1235194 is a reply to message #1234972] Thu, 23 January 2014 19:42 Go to previous messageGo to next message
Eric Moffatt is currently offline Eric MoffattFriend
Messages: 118
Registered: July 2009
Senior Member

The most likely cause is that the MWindow's 'toBeRendered' (TBR) flag has been set to 'false'. In order to qualify to be the 'selectedElement' for a container the element must be:

a) A child of the container (of course)
b) Be in the presentation by having the TBR flag set to true.

There can be a case made that the model's cleanup code should automatically reset the 'selectedElement' field should it become invalid (making it harder to save a corrupt model)...
Re: save/restore window layout [message #1235358 is a reply to message #1235194] Fri, 24 January 2014 06:20 Go to previous message
Beat Schaller is currently offline Beat SchallerFriend
Messages: 42
Registered: July 2009
Member
Thx for your response. It is a child (we have 4 TrimmedWindow as children). 3 are TBR false and the selected one is set TBR true and visible true. As I saw in different bugs there seems to be a problem...

But back to my question... If the model is saved and I resore it. Is a need I can't see to process the ModelAssembler?
Previous Topic:Minimize empty PartStack throwing Exception.
Next Topic:reset perspective
Goto Forum:
  


Current Time: Fri Apr 19 10:51:39 GMT 2024

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

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

Back to the top