Community
Participate
Working Groups
Created attachment 267698 [details] Example App If you have a saved perspective with a non-restorable view which is hidden after a restart, then after a reset of the perspective the view is visible again. The problem is, that the information about the restorable flag is only available on IViewDescriptor. And the reset is happening using a clone of the perspective in org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.cloneSnippet(MSnippetContainer, String, MWindow). Here the toBeRendered flag of all parts and placeholders is reset to be true. And without the information about the restorable flag, all those views are also shown. I would suggest to introduce a restorable flag to e4 and hide all parts with such a flag on clone. I created a minimal example. Steps to reproduce: 1. Start application 2. File -> Open View (2 View 'name' is visible) 3. Save perspective -> Save as ... 4. Close application 5. Start application again 6. 2 View 'name' is not visible 7. Reset Perspective -> Reset 8. 2 View 'name' is visible Cheers, Eugen
Eugen, would you like to propose a patch via Gerrit? See https://wiki.eclipse.org/Platform_UI/How_to_Contribute.
Hi Andrey, yes I will create a patch for this. Any hints where to add the restore flag constant to? I would have added it to the IPresentationEngine. Cheers, Eugen
New Gerrit change created: https://git.eclipse.org/r/95014
Gerrit change https://git.eclipse.org/r/95014 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6ca4be665371fce8141336cd9f3cc624f3409cb1
@Eugen: please fix 2 API errers introduced with the patch. Please install API tools to avoid such issues next time.
New Gerrit change created: https://git.eclipse.org/r/104747
Gerrit change https://git.eclipse.org/r/104747 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=bf9900914642c4f5fd011106eeb67590f3f4f715
(In reply to Eclipse Genie from comment #7) > Gerrit change https://git.eclipse.org/r/104747 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=bf9900914642c4f5fd011106eeb67590f3f4f715 This should fix issues from comment 5. @Eugen: is there anything to do left for the original issue? If yes, please explain what, if not, please set this bug as resolved/fixed.
Marking as resolved for M2. If there is still work pending please reopen.
We found a problem with the fix for this bug: if a perspective is saved and a new window is opened afterwards, the content of the restorable views is being moved to the new window. I am reopening this and will contribute a fix shortly.
(In reply to Alexandra Buzila from comment #10) > We found a problem with the fix for this bug: if a perspective is saved and > a new window is opened afterwards, the content of the restorable views is > being moved to the new window. Not sure I can follow. What do you mean by "the content of the restorable views is being moved to the new window"? Can you please give step by step instructions to reproduce the problem? > I am reopening this and will contribute a fix shortly. @Eugen, it would be nice you could review it. Tomorrow is last day for M4 contributions.
Created attachment 271754 [details] Example app with new window menu I'm attaching an example app that can be used to reproduce the problem. Steps to reproduce: - Launch the sample application. A perspective with a view restorable view should be visible. - From the context menu of the perspective, save the current perspective under another name using the "Save As.." option - From the File menu, select the "New Window" item. This should open a new application window that contains the same view, but the content of this view is gone from the main window and only visible in the new window. This behavior can be reproduced in Photon and was introduced by the initial fix for this bug.
This bug did not get delivered for the specified target milestone. Please set the target milestone when you plan to deliver the fix.
The fix is pushed to gerrit and looks good. As I am not a committer I cannot merge it.
(In reply to Eugen Neufeld from comment #14) > The fix is pushed to gerrit and looks good. > As I am not a committer I cannot merge it. Thanks, but also as non-committer you still can comment and give your vote on it.
Yes, I did so on Monday, but that might have been to late. I updated the Target Milestone. Sorry for the delay.
(In reply to Eugen Neufeld from comment #16) > Yes, I did so on Monday, but that might have been to late. > I updated the Target Milestone. Sorry for the delay. Can you please check if the bug 528189 is related and will be fixed by the proposed patch? Thanks!
Gerrit change https://git.eclipse.org/r/112332 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7bfefad95f7f01c8aa6632ba30b893ff2c14bcb5
(In reply to Andrey Loskutov from comment #17) > (In reply to Eugen Neufeld from comment #16) > > Yes, I did so on Monday, but that might have been to late. > > I updated the Target Milestone. Sorry for the delay. > > Can you please check if the bug 528189 is related and will be fixed by the > proposed patch? Thanks! Hi Andrey! I tested the fix for this bug and it does not affect the behavior described in bug 528189. At a first glance the issues look unrelated.
Verified in I20171210-2000