Community
Participate
Working Groups
[Class Diagram] DnD of enumeration Literals (in model Explorer) into Enumeration in diagram doesn't work New problem (regression?) DnD of enumeration Literals (in model Explorer) into Enumeration in diagram doesn't work (Forbidden sign) Old problem In previous versions DnD was authorized but the order was not preserved when several literals were selected in the DnD Both problems should be solved Context ====== In a class diagram Step1 Create an enumeration in the diagram Create 3 enumeration literals within the enumeration Save The enumeration and its literals appear in the model explorer and in the diagram Step2 Hide the enumeration in the diagram Step3 DnD the enumeration from the model explorer into the diagram ==> OK New Problem Step4 DnD one of the enumeration literals into the enumeration in the diagram ==> NOK (forbidden sign appear) it is not possible to deposit the enumeration literal within the enumeration Old problem Spet4bis In previous versions DnD worked but the order of literals was not preserved when selecting several In model explorer select the 3 enumeration literals DnD them into the enumeration in the class diagram Result the enumeration literals do not appear in the same order in the diagram as they are in the explorer.
The enumeration could not be be dropped because of the code for the specific drop of an instance specification(link or node). An enumerationLiteral is also an instance specification. Now the code contains a condition to distinguish this element. The second bug about the order of order of the dropped element is due to DropTargetListener class in the common. the selection was put into a hashSet and then the hash set was visited. In this context, the order was changed. it visits by taking account the key. I have change it by using a ordered collection : arraylist in order to not lose the order of the selection Done in the revision 3293 This bug will not closed, I will only change the priority. -the job is now to code test about the literal enumeration ( creation deletion , drop etc..) in order to detect this kind of bug automatically. - another job: use this test case in order to pay attention that the order of the drop respect the order of the selection.
the test about enumeration literal has been added revision 3296
done