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

Bug 322902

Summary: Generic EMF Form Editor: ItemLabelProvider.ext does not work with nested packages [patch]
Product: [Modeling] M2T Reporter: Simon Barner <barner>
Component: XpandAssignee: Dennis Huebner <dennis.huebner>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dennis.huebner, Ed.Merks, m2t.xpand-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed patch to fix to make ItemLabelProvider.ext work with nested packages sven.efftinge: iplog+

Description Simon Barner CLA 2010-08-17 10:13:22 EDT
Build Identifier: 20100617-1415

Custom labels specified in ItemLabelProvider.ext do not work as expected if the corresponding model is contained in a package hierarchy (see STR).

The attached patch fixes this issue.

Reproducible: Always

Steps to Reproduce:
1. Create an ecore model
2. Create package p1
3. Create package p1.p2
4. Create class p1.p2.C1
5. Create p1.p2.ItemLabelProvider.ext with the following contents:

import p1.p2;

String label(C1 c): "Test!";

6. Create a dynamic instance of p1.p2.T and save it to a .xmi file
7. Open the dynamic instance using the Generic EMF Form Editor.
8. Observe that the custom label does not work.
9. A possible workaround is putting the ItemLabelProvider.ext file in the package p2.
10. For a fix please see the attached patch.
Comment 1 Simon Barner CLA 2010-08-17 10:14:19 EDT
Created attachment 176787 [details]
Proposed patch to fix to make ItemLabelProvider.ext work with nested packages
Comment 2 Dennis Huebner CLA 2010-08-19 16:36:57 EDT
Thanks for your report.
Fixed in head.
Comment 3 Karsten Thoms CLA 2013-02-21 08:13:14 EST
Bug resolved before Xpand 1.2 release date => Closing