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

Bug 358122

Summary: [EMF Compare UI] Enable to handle all descriptors in UI
Product: [Modeling] EMFCompare Reporter: Arthur Daussy <arthur.daussy>
Component: CoreAssignee: EMF Compare <emf.compare-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: arthur.daussy, laurent.goubet
Version: unspecifiedFlags: laurent.goubet: iplog+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Arthur Daussy CLA 2011-09-19 10:21:22 EDT
I currently working on integration of SysML in EMF Compare. For this integration I'm using the papyrus implementation of SysML (UML stereotyped with static profiles). To do this I implemented an ItemProviderAdapterFactory for my SySML elements. However I encounter a problem with the property view. Even if my IPAF provide the correct descriptor for stereotype application attributes the view do not succeed to display them.

I have looked into your code I have found this in org.eclipse.emf.compare.ui.viewer.content.part.property.PropertyContentProvider:

*******************************************************************
public Object[] getElements(Object inputElement) {
                ...
  final EStructuralFeature feature =(EStructuralFeature)descriptor.getFeature(inputEObject);
final List<Object> row = new ArrayList<Object>();
row.add(feature);
row.add(inputEObject.eGet(feature)); <---- here is the problem
inputElements.add(row);
               ...
}
*******************************************************************

With this implementation I can not use for example ItemPropertyDescriptorDecorator (which I need for displaying the attributes of my stereotype). Would it be possible to change the implementation for something more like :

*******************************************************************
public Object[] getElements(Object inputElement) {
                ...
final EStructuralFeature feature = (EStructuralFeature)descriptor.getFeature(inputEObject);
final List<Object> row = new ArrayList<Object>();
row.add(feature);				row.add(descriptor.getPropertyValue(inputEObject)); <-- Here is the enhancement
inputElements.add(row);
                 ....
			}
*******************************************************************

I would have liked to give you a patch of this but I enable to make a simple patch with a git repository.

Thanks for your time.
Comment 1 Laurent Goubet CLA 2011-09-27 10:29:22 EDT
Seems harmless enough, this has been commited to master.
Comment 2 Laurent Goubet CLA 2013-01-17 08:31:55 EST
batch-closing a bunch of "RESOLVED" bugs.