Bug 434108 - [Perspectives] Copy Worbench Layout option does not work in Eclipse 4.x
Summary: [Perspectives] Copy Worbench Layout option does not work in Eclipse 4.x
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bartosz Popiela CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2014-05-05 08:31 EDT by Wojciech Sudol CLA
Modified: 2020-04-03 06:12 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wojciech Sudol CLA 2014-05-05 08:31:14 EDT
Scenario:
1. Run Eclipse with a fresh workspace
2. Close Welcome page
3. Move and resize some views
4. From the main menu choose: File > Switch Workspace > Other...
5. In the "Workspace Launcher" dialog provide a path to a new workspace; select "Copy Settings" > "Workbench Layout" option and press OK.
6. After restart close Welcome page and compare new layout with the previous one.

Expected behaviour:
New workbench have the same layout as the old one.

Current behaviour:
New workbench have a new, default layout.

It was working in 3.x, does not work in 4.x.
Comment 1 Eric Moffatt CLA 2014-05-05 15:14:06 EDT
Wojciech, this may not be perfect but it's at least working somewhat. I just opened a new workspace from my existing dev environment and it seems to have moved everything over (at least I started with both a Java and Debug perspective open and my EGit views where I expected them...

This is in
Comment 2 Eric Moffatt CLA 2014-05-05 15:16:28 EDT
I tested this on M7 and it's certainly copying most of the environment. I did the 'switch' from my regular dev workbench and the new workspace came up with both a Java and a Debug perspective and my EGit views where where I expected them.

What system are you on ?
Comment 3 Wojciech Sudol CLA 2014-05-05 15:38:37 EDT
My OS is Windows 7 x64.

I was testing it again and I see that it works if you switch to already existing workspace, but not for new workspaces. In 3.x it works in both cases.
Comment 4 Bartosz Popiela CLA 2015-03-03 07:29:57 EST
I have question to bug 434108. I found the cause and prepared the patch. But currently after switching to new (non-existing) workspace with "Copy Settings / Workbench Layout" checkbox enabled, there is the intro view ("Welcome") maximized at the center of perspective. After closing this view perspective layout is correct (copied from the source workspace). Is it desired behaviour that the intro view will appear after switching to a new (non-existing) workspace regardless of the checkbox state (to notify a user that this is a new workspace)?
Comment 5 Bartosz Popiela CLA 2015-03-03 08:06:48 EST
I've made a test on Indigo instance and intro view appears so I assume it's correct.
Comment 6 Eclipse Genie CLA 2015-03-04 10:08:18 EST
New Gerrit change created: https://git.eclipse.org/r/43166
Comment 7 Bartosz Popiela CLA 2015-03-04 10:43:17 EST
I've also found that if the current workspace is a new one (it was never saved yet), then transfering workbench layout while switching to a new workspace will also fail.

My solution adds workbench listener list to e4 workbench instance and introduces new "PostSave" annotation. While "Copy Settings / Workbench Layout" checkbox is selected, then workbench listener with "PostSave" tagged method is added to e4 workbench instance. I also made some refactoring to use both "PreSave" and "PostSave" annotations while saving model.
Comment 8 Eclipse Genie CLA 2015-03-05 19:33:21 EST
New Gerrit change created: https://git.eclipse.org/r/43273
Comment 9 Andrey Loskutov CLA 2015-03-06 01:04:59 EST
(In reply to Eclipse Genie from comment #8)
> New Gerrit change created: https://git.eclipse.org/r/43273

Bartosz, you should rebase and amend your commits to avoid multiple review requests for the same patch. Also you should "abandon" not needed reviews to avoid confusion which one is the "right" one.
Comment 10 Eclipse Genie CLA 2015-03-06 15:14:34 EST
New Gerrit change created: https://git.eclipse.org/r/43335
Comment 11 Bartosz Popiela CLA 2015-03-06 15:52:32 EST
Sorry, I'm a newbie to Gerrit. It should be correct now.
Comment 12 Bartosz Popiela CLA 2015-04-12 09:10:10 EDT
Next patch set pushed.
Comment 13 Lars Vogel CLA 2015-05-22 13:02:54 EDT
Moving to 4.6, please move back to 4.5.1 if you think these bugs are important enough to be addressed in the service release.
Comment 14 Lars Vogel CLA 2016-04-20 12:16:59 EDT
Mass move to 4.7 as M7 is approaching. Please move back in case you are planning to fix it for Neon.
Comment 15 Eclipse Genie CLA 2020-04-03 06:12:39 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.