Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 545762

Summary: EmptyWorkspaceHelper assumes all wizards have an icon
Product: [Eclipse Project] Platform Reporter: Stephan Herrmann <stephan.herrmann>
Component: UIAssignee: Matthias Becker <ma.becker>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: daniel_megert, ma.becker
Version: 4.11   
Target Milestone: 4.12 M1   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=543746
https://git.eclipse.org/r/139467
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=71958d200c365408f3bb79d867c63abd0202472a
Whiteboard:

Description Stephan Herrmann CLA 2019-03-25 14:41:29 EDT
The change from bug 543746 assumes that every new project wizard has an icon. The extension point org.eclipse.ui.newWizards, however, does not mark the icon property as REQUIRED.

Hence, the new feature can fail like this:

org.eclipse.core.runtime.AssertionFailedException: null argument:
        at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:88)
        at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:76)
        at org.eclipse.jface.resource.ResourceManager.createImage(ResourceManager.java:173)
        at org.eclipse.ui.internal.views.helpers.EmptyWorkspaceHelper.createOption(EmptyWorkspaceHelper.java:253)
        at org.eclipse.ui.internal.views.helpers.EmptyWorkspaceHelper.createEmptyArea(EmptyWorkspaceHelper.java:202)
Comment 1 Stephan Herrmann CLA 2019-03-25 14:59:30 EDT
This bug is aggravated by the fact, that importing projects by some other means (in my cause during an Oomph installation) does not fix the Package Explorer or similar views. Existing projects will not be visible until Eclipse is restarted.

Viz: creating a workspace with Oomph where just one icon-less wizard is installed will result in a seemingly empty workspace, despite successful project imports. 

    User friendly (oomph) + user friendly (bug 543746) = very bad UX.
Comment 2 Stephan Herrmann CLA 2019-03-25 15:13:36 EDT
I spoke too soon: a restart after importing projects and while Java Browsing perspective is active does restore the Package Explorer and friends, but restarting into Java Perspective still ends up with unusable * Explorer & Navigator.
Comment 3 Matthias Becker CLA 2019-03-26 03:22:07 EDT
I am working on a fix.
Comment 4 Eclipse Genie CLA 2019-03-26 03:37:00 EDT
New Gerrit change created: https://git.eclipse.org/r/139467
Comment 5 Matthias Becker CLA 2019-03-26 03:38:26 EDT
(In reply to Eclipse Genie from comment #4)
> New Gerrit change created: https://git.eclipse.org/r/139467

@Stephan: Can you please review this change? Once you tell me that this fixes your issue and once I have your +1 I will merge the change.
Comment 6 Stephan Herrmann CLA 2019-03-26 07:02:14 EDT
(In reply to Matthias Becker from comment #5)
> (In reply to Eclipse Genie from comment #4)
> > New Gerrit change created: https://git.eclipse.org/r/139467
> 
> @Stephan: Can you please review this change? Once you tell me that this
> fixes your issue and once I have your +1 I will merge the change.

Thanks for swift action.

Testing this in my original use case is not possible until the fix can be installed using oomph.

At a quick glance the fix looks good, so may I suggest you merge it now, and I will try to test it once we have the next I-build?
Comment 7 Matthias Becker CLA 2019-03-26 07:02:31 EDT
the build of my gerrit change failed with:

Failed to execute goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:1.4.0-SNAPSHOT:compare-version-with-baselines (compare-attached-artifacts-with-release) on project org.eclipse.e4.ui.workbench.renderers.swt: Only qualifier changed for (org.eclipse.e4.ui.workbench.renderers.swt/0.14.500.v20190326-1000). Expected to have bigger x.y.z than what is available in baseline (0.14.500.v20190220-1002) -> [Help 1]

Why is this. I did not touch org.eclipse.e4.ui.workbench.renderers.swt. I also don't see that it was touched by any other change since the version increase for 4.12.
Comment 8 Matthias Becker CLA 2019-03-26 07:03:42 EDT
(In reply to Stephan Herrmann from comment #6)
> (In reply to Matthias Becker from comment #5)
> > (In reply to Eclipse Genie from comment #4)
> > > New Gerrit change created: https://git.eclipse.org/r/139467
> > 
> > @Stephan: Can you please review this change? Once you tell me that this
> > fixes your issue and once I have your +1 I will merge the change.
> 
> Thanks for swift action.
> 
> Testing this in my original use case is not possible until the fix can be
> installed using oomph.
> 
> At a quick glance the fix looks good, so may I suggest you merge it now, and
> I will try to test it once we have the next I-build?

I did re-produce your use-case by temporarily removing the icon of the "New Java Project" wizard. This first caused the NPE and with my change it was fixed.

Can you pls. tell me which wizard is the one that does not have an icon?
Comment 9 Matthias Becker CLA 2019-03-26 07:04:48 EDT
(In reply to Stephan Herrmann from comment #6)
> At a quick glance the fix looks good, so may I suggest you merge it now, and
> I will try to test it once we have the next I-build?

Can you then pls. give a +1 in the gerrit review?
Comment 10 Stephan Herrmann CLA 2019-03-26 09:12:03 EDT
(In reply to Matthias Becker from comment #8)
> Can you pls. tell me which wizard is the one that does not have an icon?

It was from our own xtext-based DSL. I vaguely remember that this wizard was generated by Xtext (can't check right now), see https://help.eclipse.org/2019-03/topic/org.eclipse.xtext.doc/contents/310_eclipse_support.html?cp=103_1_7_8#projectwizard
Comment 11 Matthias Becker CLA 2019-03-26 09:32:08 EDT
(In reply to Stephan Herrmann from comment #10)
> (In reply to Matthias Becker from comment #8)
> > Can you pls. tell me which wizard is the one that does not have an icon?
> 
> It was from our own xtext-based DSL. I vaguely remember that this wizard was
> generated by Xtext (can't check right now), see
> https://help.eclipse.org/2019-03/topic/org.eclipse.xtext.doc/contents/
> 310_eclipse_support.html?cp=103_1_7_8#projectwizard

Okay. So you should take this opportunity to add an icon for it now. ;-)