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

Bug 369247

Summary: [Compatibility] view icon searched in wrong plug-in
Product: [Eclipse Project] Platform Reporter: Nicolas Bros <nicolas.bros>
Component: UIAssignee: Paul Webster <pwebster>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: 4.2   
Target Milestone: 4.2 M5   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 369248, 365316    
Attachments:
Description Flags
stacktrace none

Description Nicolas Bros CLA 2012-01-20 10:19:48 EST
Created attachment 209828 [details]
stacktrace

I get the attached exception when opening an Eclipse 3.x view on Eclipse 4.2M4.

The view is defined like this:
<extension
     id="org.eclipse.emf.facet.widgets.table.ui.workbench.view.TableView"
     point="org.eclipse.ui.views">
  <view
        allowMultiple="true"
        category="org.eclipse.emf.facet.views"
        class="org.eclipse.emf.facet.widgets.table.ui.workbench.internal.view.TableView"
        icon="icons/MoDiscoModelIcon.gif"
        id="org.eclipse.emf.facet.widgets.table.ui.workbench.view.TableView"
        name="%nattable.view.name"
        restorable="false">
  </view>
</extension>

Eclipse is trying to open this image:
"platform:/plugin/org.eclipse.emf.facet.widgets.table.ui.workbench.view/icons/MoDiscoModelIcon.gif"

Which does not exist because "org.eclipse.emf.facet.widgets.table.ui.workbench.view" is not a plug-in. The plug-in is named "org.eclipse.emf.facet.widgets.table.ui.workbench".

It looks like Eclipse is wrongly assuming that the plug-in matches the view id minus the last part.

Here is the toString of the element (part) being rendered:

org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@3cd0a12d (elementId: org.eclipse.emf.facet.widgets.table.ui.workbench.view.TableView, tags: [View, 3x-secondary:0, categoryTag:EMF Facet], contributorURI: null) (widget: ContributedPartRenderer$2 {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@2ddef689, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: platform:/plugin/org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityView@90bb3e6, context: PartImpl (org.eclipse.emf.facet.widgets.table.ui.workbench.view.TableView) Context, variables: [], label: Model Table 0.2, iconURI: platform:/plugin/org.eclipse.emf.facet.widgets.table.ui.workbench.view/icons/MoDiscoModelIcon.gif, tooltip: , dirty: false, closeable: true, description: null)
Comment 1 Remy Suen CLA 2012-01-20 10:39:34 EST
When I open the 'Model Table' view I don't get this problem.

I installed EMF Facet SDK (Incubation) 0.2.0.v201111081641 from the Juno update site. Is this the correct plug-in to install to reproduce the problem?
Comment 2 Paul Webster CLA 2012-01-20 10:44:41 EST
We were using configElement.getNamespace() instead of configElement.getContributor().getName().

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=c986d310881bd992f9698c4d03a27c45bd7f79ed

PW
Comment 4 Nicolas Bros CLA 2012-01-20 11:03:23 EST
(In reply to comment #1)
> Is this the correct plug-in to install to reproduce the problem?

I believe the problem only appeared with the new version of the table, which is not in a milestone. It can be installed from:
http://download.eclipse.org/facet/updates/nightly/

I will test again when your fix is available in a platform build.
Comment 5 Paul Webster CLA 2012-01-24 12:58:41 EST
(In reply to comment #4)
> 
> I will test again when your fix is available in a platform build.

There should be a fix available in any of the I builds this week, including our test build: http://download.eclipse.org/eclipse/downloads/drops4/I20120123-2200/index.php

PW