| Summary: | Unable to save perspective | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | DJ Houghton <dj.houghton> |
| Component: | UI | Assignee: | Dean Roberts <dean.t.roberts> |
| Status: | VERIFIED FIXED | QA Contact: | Remy Suen <remy.suen> |
| Severity: | major | ||
| Priority: | P3 | CC: | daniel_megert, dean.t.roberts, pwebster, remy.suen |
| Version: | 4.1 | ||
| Target Milestone: | 4.2 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | 353328, 355099, 355101, 355228, 356634 | ||
| Bug Blocks: | 356307 | ||
| Attachments: | |||
|
Description
DJ Houghton
(In reply to comment #0) > This is > extremely frustrating because every once in a while when I start up my > perspective is reset to the default layout. Sorry DJ, layout loss is likely caused by the fallout from bug 338444. Created attachment 193869 [details]
Initial patch to add the necessary ModelService API
This is just the API that allows creating a clone of an element's structure into a 'snippet' and generating an instance of the cloned snippet.
This will be used in the implementation of the Perspective SaveAs / Reset functionality.
Committed in >20110421. Applied the patch. > dean_roberts@ca.ibm.com Depends on 35328
I don't see how this depends on 35328.
Created attachment 202338 [details] Patch for save perspective implementation This patch will implement save perspective as and revert perspective for both perspectives saved with their own name, and perspectives saved "on top" of predefined perspectives. This patch requires the fix to the model from bug 355228. Also, until bug 355099 is fixed, you need to start Eclipse with the -deltaRestore false program arguments for saved perspectives to be persistant across Eclipse invocations Created attachment 202680 [details] Add save perspective as to tool item menu Add the Save perspective as item to the perspecitve switcher tool item. This patch is incremental and should be applied after the 1st batch on this defect (attachment 202338 [details]) Resaving a customized perspective with the same name loses the new customizations. This is happening because the new cloned snippet, with the same ID is simply being added to the cloned snippets list. A change to the model has been requested in bug 355101. When this model change is released, we can fix this behaviour. Committed in >20110902. 80942baad79d11120f604a6a3c179513d8effc30 Good work ! I'll make the necessary model mods and we can re-check the 'save over' behavior... Reopening so I can add the patch that allows saving a customization over top of an existing customization. Created attachment 202696 [details]
Fix problem with 2nd and subsequent saves of same name being lost
M2 is done... Just to be clear. In the build I20110915-0200, the candidate for M2, Save Perspective As functionality is released and working EXCEPT for the inability to save the same perspective more than once with the same name. Opened bug 357853 for saved perspectives not working properly when multiple workbench windows are used. (In reply to comment #12) > In the build I20110915-0200, the candidate for M2, Save > Perspective As functionality is released and working EXCEPT for the inability > to save the same perspective more than once with the same name. Do we need a new bug for this or will this be addressed as a part of this bug? (In reply to comment #10) > Created attachment 202696 [details] > Fix problem with 2nd and subsequent saves of same name being lost Dean, what is the change to removeSnippet(*) meant to accomplish? It is just a cleaner coding pattern to do the remove, and would leverage any performance improvements that may exist or be implemented in find() at a later date. It also matches the pattern added, by the patch, to ModelServiceImpl ... so it improves code consistency. (In reply to comment #10) > Created attachment 202696 [details] > Fix problem with 2nd and subsequent saves of same name being lost Pushed to R4_development, thanks Dean! http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=3f4f91b76e12039dfc898b47f51ff70dd62437cb Marking this bug as fixed. We will use new bugs for future problems that are encountered. Did someone verify that this bug is really fixed in an official 4.2 build?
While doing a check on our common bundles I found out that the change to WorkbenchActionBuilder in attachment 202338 [details] is not in the 4.2 builds because 4.2 consumes ui.ide from 3.8 and the fix for WorkbenchActionBuilder was not cherry-picked to R3_developement.
I've fixed that now (Commit c49ba5f8d40b9373cf74e716a93c5a236589577b).
> I've fixed that now (Commit c49ba5f8d40b9373cf74e716a93c5a236589577b).
Sorry, correct hash is: Commit 0cc54d8295551fce26a14076eaa95b774a955bd8
I also fixed the copyright date in both branches.
(In reply to comment #17) > While doing a check on our common bundles I found out that the change to > WorkbenchActionBuilder in attachment 202338 [details] is not in the 4.2 builds because > 4.2 consumes ui.ide from 3.8 and the fix for WorkbenchActionBuilder was not > cherry-picked to R3_developement. Good catch, Dani! When attachment 202338 [details] was delivered in 80942baad79d11120f604a6a3c179513d8effc30, it did include changes in the org.eclipse.ui.bundle. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=80942baad79d11120f604a6a3c179513d8effc30 However, I am seeing the 'Window > Save Perspective As...' option on I20110923-1625, so perhaps that code change wasn't even necessary? Dean (or Eric), could you comment on this? > Good catch, Dani! When attachment 202338 [details] [diff] was delivered in
> 80942baad79d11120f604a6a3c179513d8effc30, it did include changes in the
> org.eclipse.ui.bundle.
org.eclipse.ui.ide that is ;-).
The change in WorkbenchActionBuilder is a clean up of code that was converting Actions over to IContributionItems. This conversion was work that was started before I joined the team, I forget by whomm. As I was essentailly re adding the save and reset perspective actions it seemd more correct to add them in the new IContributionItem way. So the actual save and reset perspective code is in and working in 4.2 ... but, without the WorkbenchActionBuilder change, it is being invoked as an Action and not an IContributionItem. Verified on I20111025-2000 |