Bug 550915 - EmptyWorkspaceHelper does not recreate empty workspace correctly
Summary: EmptyWorkspaceHelper does not recreate empty workspace correctly
Status: CLOSED DUPLICATE of bug 552374
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.13   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 543746
Blocks: 550914
  Show dependency tree
 
Reported: 2019-09-09 15:17 EDT by Greg Watson CLA
Modified: 2020-01-24 03:21 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Watson CLA 2019-09-09 15:17:26 EDT
When switching perspective, EmptyWorkspaceHelper is supposed to recreate the empty workspace by calling recreateEmptyArea(). However this simply calls createEmptyArea() which checks if projectWizardActions is null. Since it's not null (the actions were created by the first call to createEmptyArea()), the same actions are displayed in the empty workspace. 

To fix, it looks like projectWizardActions should be cleared by recreateEmptyArea() before calling createEmptyArea() again.
Comment 1 Lars Vogel CLA 2019-09-09 17:41:41 EDT
Greg, please provide a Gerrit for the fix.
Comment 2 Eclipse Genie CLA 2019-09-09 21:14:53 EDT
New Gerrit change created: https://git.eclipse.org/r/149217
Comment 3 Eclipse Genie CLA 2019-09-09 21:17:08 EDT
New Gerrit change created: https://git.eclipse.org/r/149218
Comment 4 Matthias Becker CLA 2019-09-10 03:27:21 EDT
(In reply to Greg Watson from comment #0)
> When switching perspective, EmptyWorkspaceHelper is supposed to recreate the
> empty workspace by calling recreateEmptyArea(). However this simply calls
> createEmptyArea() which checks if projectWizardActions is null. Since it's
> not null (the actions were created by the first call to createEmptyArea()),
> the same actions are displayed in the empty workspace. 
> 
> To fix, it looks like projectWizardActions should be cleared by
> recreateEmptyArea() before calling createEmptyArea() again.

Can you provide steps to reproduce this issue?
Comment 5 Greg Watson CLA 2019-09-10 07:27:12 EDT
Open IDE with empty workspace to show actions. Switch to a different perspective that has different actions. The original actions will still be displayed.
Comment 6 Greg Watson CLA 2019-09-10 07:31:29 EDT
(In reply to Eclipse Genie from comment #3)
> New Gerrit change created: https://git.eclipse.org/r/149218

I can't see how this change causes a regression. I see that this test has caused problems in the past, but I don't know what to do here.
Comment 7 Matthias Becker CLA 2019-09-10 08:33:10 EDT
(In reply to Greg Watson from comment #5)
> Open IDE with empty workspace to show actions. Switch to a different
> perspective that has different actions. The original actions will still be
> displayed.

I see. But your change does not fix this completely.
I used the navigator view and switched from java perspective to the plug-in dev perspective. 
This is fine now. But when I now switch back to java it's not correct any more.

Can you pls. see how that can be fixed also?
Comment 8 Eclipse Genie CLA 2019-09-10 09:26:47 EDT
New Gerrit change created: https://git.eclipse.org/r/149259
Comment 9 Eclipse Genie CLA 2019-09-11 02:36:06 EDT
New Gerrit change created: https://git.eclipse.org/r/149321
Comment 10 Greg Watson CLA 2020-01-23 15:45:11 EST
Can this be merged?
Comment 11 Matthias Becker CLA 2020-01-24 03:21:50 EST
(In reply to Greg Watson from comment #10)
> Can this be merged?

I just retested this with the current master branch. 
By using the navigator view and switching between java and plug-in development perspective in an empty workspace.
I don't see an error here as this was fixed with bug 552374

*** This bug has been marked as a duplicate of bug 552374 ***