Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332577 - [Compatibility] NPE when switching workspace and trying to copy 'Workbench Layout' settings
Summary: [Compatibility] NPE when switching workspace and trying to copy 'Workbench La...
Status: VERIFIED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.1 M5   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 17:09 EST by Andrew Niefer CLA
Modified: 2011-01-26 08:39 EST (History)
1 user (show)

See Also:


Attachments
Workbench layout transfer patch v1 (13.51 KB, patch)
2010-12-16 12:44 EST, Remy Suen CLA
no flags Details | Diff
WorkbenchLayoutSettingsTransfer patch v2 (12.31 KB, patch)
2011-01-05 14:25 EST, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2010-12-14 17:09:40 EST
In the 4.1SDK, the following NPE comes after switching workspace with Copy Settings -> Workbench Layout selected

java.lang.NullPointerException
at org.eclipse.ui.internal.WorkbenchLayoutSettingsTransfer.getCurrentPresentationClassName(WorkbenchLayoutSettingsTransfer.java:258)
at org.eclipse.ui.internal.WorkbenchLayoutSettingsTransfer.saveEditorState(WorkbenchLayoutSettingsTransfer.java:235)
at org.eclipse.ui.internal.WorkbenchLayoutSettingsTransfer.saveState(WorkbenchLayoutSettingsTransfer.java:187)
at org.eclipse.ui.internal.WorkbenchLayoutSettingsTransfer.saveState(WorkbenchLayoutSettingsTransfer.java:139)
at org.eclipse.ui.internal.WorkbenchLayoutSettingsTransfer.saveSettings(WorkbenchLayoutSettingsTransfer.java:101)
at org.eclipse.ui.internal.WorkbenchLayoutSettingsTransfer.transferSettings(WorkbenchLayoutSettingsTransfer.java:290)
at org.eclipse.ui.internal.ide.ChooseWorkspaceWithSettingsDialog$4.run(ChooseWorkspaceWithSettingsDialog.java:335)
Comment 1 Eric Moffatt CLA 2010-12-15 10:05:50 EST
Good one ! Perhaps the answer is to copy the 'deltas' file over to the new WS ?
Comment 2 Remy Suen CLA 2010-12-16 12:44:42 EST
Created attachment 185348 [details]
Workbench layout transfer patch v1

Untested, but this would be the basic gist of it I suppose. Will polish it up some more later.
Comment 3 Remy Suen CLA 2011-01-05 14:25:55 EST
Created attachment 186114 [details]
WorkbenchLayoutSettingsTransfer patch v2
Comment 4 Remy Suen CLA 2011-01-05 14:27:13 EST
(In reply to comment #3)
> Created attachment 186114 [details]
> WorkbenchLayoutSettingsTransfer patch v2

Patch released to CVS HEAD. Leaving this open until I can verify it.
Comment 5 Remy Suen CLA 2011-01-19 09:59:12 EST
(In reply to comment #4)
> Patch released to CVS HEAD. Leaving this open until I can verify it.

Looks good on I20110114-1005. Thanks for the bug report, Andrew!
Comment 6 Remy Suen CLA 2011-01-26 08:39:51 EST
Verified with I20110125-2200 on Windows XP.