Community
Participate
Working Groups
Created attachment 233913 [details] Test plugin In our workbench, we call WorkbenchConfigurer.setSaveAndRestore(false). But it doesn't take effect. The workbench layout is still saved. To reproduce, use the attached plugin. Launch the RCP, Press F1 button to open the help for the view. If it doesn't work for the first time due to bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=400042, close the RCP, and re-lauch it. After the help view shows up, close the RCP, and re-lauch it. The help view should show up automatically in the workbench which it should not since we called 'WorkbenchConfigurer.setSaveAndRestore(false)' in ApplicationWorkbenchAdvisor. I searched 'WorkbenchConfigurer.getSaveAndRestore()', seems it is not called. This is a regression from E4.
(In reply to comment #0) > Created attachment 233913 [details] > Test plugin > > In our workbench, we call WorkbenchConfigurer.setSaveAndRestore(false). But > it doesn't take effect. The workbench layout is still saved. > > To reproduce, use the attached plugin. Launch the RCP, Press F1 button to > open the help for the view. If it doesn't work for the first time due to > bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=400042, close the > RCP, and re-lauch it. > > After the help view shows up, close the RCP, and re-lauch it. The help view > should show up automatically in the workbench which it should not since we > called 'WorkbenchConfigurer.setSaveAndRestore(false)' in > ApplicationWorkbenchAdvisor. > > I searched 'WorkbenchConfigurer.getSaveAndRestore()', seems it is not > called. This is a regression from E4. I believe the 'WorkbenchConfigurer.getSaveAndRestore' is not supported in the e4. Use the '-clearPersistedState' or '-data @none'launching options instead. Please let us know if it solves your issue and we can close the bug Daniel
(In reply to comment #1) > > I believe the 'WorkbenchConfigurer.getSaveAndRestore' is not supported in > the e4. Use the '-clearPersistedState' or '-data @none'launching options > instead. Those are workarounds, but our longterm goal is to support that for compatibility. PW
Just discovered that WorkbenchConfigurer.setSaveAndRestore(false) does nothing in my RCP app built with 4.4. :sigh:
The simplest scenario to reproduce the issue: 1. Create and run the RCP Mail Template project. 2. Relocate the Message view (e.g. from right to bottom). 3. Close and restart the app (make sure the 'Clear' option in 'Run Configuration' is NOT checked). Expected behavior: After restart the layout is reverted to the initial state. Current behavior: After restart the layout is still in the modified state. Reproduced in Eclipse 4.4.1.
I'll try to solve this bug.
New Gerrit change created: https://git.eclipse.org/r/49858
Gerrit change https://git.eclipse.org/r/49858 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=0f1063e7a18523b7e695bbfa338533eb8bada726
New Gerrit change created: https://git.eclipse.org/r/58989
Gerrit change https://git.eclipse.org/r/58989 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b8f2b42b006e867f71838f223807b198db716967
Oops reverted and will apply for M4
New Gerrit change created: https://git.eclipse.org/r/60102
I was looking at WorkbenchConfigurerTest which has some ignored tests, disabled due to this bug. But these tests still fail as E3.x defaulted to *not* persisting the workbench, the opposite of E4's default. Possible approaches: (1) Change the default for E3.x, and document the change in the migration guide. Chances are most apps explicitly call setSaveAndRestore() in their WorkbenchAdvisor initialize() methods. (2) Add some code to workbench startup to call setSaveAndRestore(false). But we need to deal with the invoker explicitly specifying -persistState on the command line. This would likely entail: * Modifying E4Application to make the default value of PERSIST_STATE be a static * Change o.e.ui.internal.Workbench#createAndRunWorkbench() to set the default value for PERSIST_STATE on E4Application (3) Change E4Application#createE4Workbench to pass in the default for PERSIST_STATE I think (3) is the easiest.
Mass move to 4.7 as M7 is approaching. Please move back in case you are planning to fix it for Neon.
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. If you have further information on the current state of the bug, please add it. 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.