Community
Participate
Working Groups
the drop of link does not run , it drops only nodes
I have added the drag and drop for the class diagram. In order to execute the drag and drop, the designer has to create several classes - CustomGraphicalNodeEditPolicy the algo of this class is generic but I cannot put in in the diagram.common, because it refers classes that exists only in generated code. I think so it could be generated. - ClassDiagramDragDropEditPolicy, this is a more specific class to allows adding your own algorithm to drop element, I my case i write code to drop multi association dependencies, associationClass. -> this class is very specific, and has to be written by hands. - LinkMappingHelper this is a class that show the semantic target and semantic source for a link. There is an equivalent in the gmf code, but it impossible to use it. view or target has to exist before and it done a lot of loop in the model in order to find source and target. - ClassLinkMappingHelper this is specific class for the class diagram. I think that is class can be generated, because the information is the mapping already exist in the gen model. In order to have a successful drag and drop the specific policy for the drag and drop has to be added in diagrams edit policy (in the gmf gen) and you have to pay attention about the order of the element in the gen model. First more specific and last more general. Why? in the visualRegistry , gmf use the operator "instanceof ". The error that you can obtain is to drop a usage and your obtain the editpart of the dependency that is not the same.
Created attachment 140778 [details] mylyn/context/zip impacted classes
done