I have a meta model with an element that contains two maps. The maps have different content.
The model instance can be created in the sample editor and the data can be entered and stored. But a copy operation of one map entry ("Bob" in the example) to another object ("Basket1" in the example) creates an entry in the wrong map.
Any further attempt to move or delete the copied object leads to an Eclipse IDE that does not respond any more.
I assume that the cause of the problem is the use of the map entries in both cases.
Is there a possibility to avoid this situation (while keeping the two maps) ?
Best regards
Harald
I created a small example to show the problem:
class NumericData wraps java.util.Map$Entry {
String key
Long value
}
class TextData wraps java.util.Map$Entry {
String key
String value
}
class Element {
String name
contains NumericData[] numbers
contains TextData[] strings
}
class Root {
contains Element[] elements
}
Model file before the copy operation:
<elements
name="Basket1">
<numbers
key="2"
value="123"/>
<strings
key="Mary"
value="abc"/>
</elements>
<elements
name="Basket2">
<strings
key="Bob"
value="abc"/>
</elements>
Model file after the copy operation:
<elements
name="Basket1">
<numbers
key="2"
value="123"/>
<numbers
xsi:type="test:TextData"
key="Bob"
value="abc"/>
<strings
key="Mary"
value="abc"/>
</elements>
...