Bug 282390 - [General]Drop of links does not run
Summary: [General]Drop of links does not run
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: M1   Edit
Assignee: Patrick Tessier CLA
QA Contact:
URL:
Whiteboard: Usability
Keywords: plan, usability
Depends on:
Blocks:
 
Reported: 2009-07-03 11:28 EDT by Patrick Tessier CLA
Modified: 2009-10-15 10:43 EDT (History)
0 users

See Also:


Attachments
mylyn/context/zip (7.75 KB, application/octet-stream)
2009-07-03 11:33 EDT, Patrick Tessier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Tessier CLA 2009-07-03 11:28:45 EDT
the drop of link does not run , it drops only nodes
Comment 1 Patrick Tessier CLA 2009-07-03 11:32:55 EDT
 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.

Comment 2 Patrick Tessier CLA 2009-07-03 11:33:18 EDT
Created attachment 140778 [details]
mylyn/context/zip

impacted classes
Comment 3 Patrick Tessier CLA 2009-07-03 11:38:35 EDT
done