Hi,
I have two problems with my modeler :
First, I need to export my diagram into a custom xml file format. I
found how to do it by recovering the list of items composing my diagram
and serializing them using XStream.
My diagram is like the following :
http://img132.imageshack.us/my.php?image=conceptsdp4.png
A concept can be linked to one or more concepts, or to one of more items
When I generate my xml export though, it generates that :
<?xml version="1.0" encoding="UTF-8"?>
<pivot>
<concept nom="Concept">
<item nom="Test">
<item nom="Test 2"/>
</item>
</concept>
<concept nom="Concept 0">
<concept nom="Concept">
<item nom="Test">
<item nom="Test 2"/>
</item>
</concept>
</concept>
</pivot>
What I want to do is to generate the part that corresponds to the
selected concept only. How can y translate my ConceptEditPart object
(the one I get in my selectionChanged method) into the corresponding
EObject ?
Second question :
My 'items' have a 'name' property, what I want to do is to allow the
user to create one the regular way ie with the tool palette and by
providing a name, but I want him to be able to pick an existing name
from a database.
Here again, I know how to retrieve the data from a datasource (excel
file, db2 database...) I imagine I will have to modify the ItemEditPart
class to include a dropdown... But I don't know what to use : the name
label is currently a WrappingLabel, is there a class that acts like a
dropdown ? Or maybe in the properties view of the figure ? Or do it
myself ?
Thanks for your answers.