Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358122 - [EMF Compare UI] Enable to handle all descriptors in UI
Summary: [EMF Compare UI] Enable to handle all descriptors in UI
Status: CLOSED FIXED
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 10:21 EDT by Arthur Daussy CLA
Modified: 2013-01-17 08:31 EST (History)
2 users (show)

See Also:
laurent.goubet: iplog+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.