Dedicated behavior at link creation [message #230286] |
Thu, 14 May 2009 11:20  |
Eclipse User |
|
|
|
Hello,
sorry to borrow your help again but I am bit lost with GMF. I have been
searching for the last hours how to implement a dedicated behavior in the
diagram editor:
On my Diagram i can connect a "type A" and a "type B" element with a "Data
link". I would like to allow the user to connect a "type A container" with
a "type B". Then, at creation time, a Dialog window would display and let
the user create a new "Type A" element into the container he has selected.
This would result in changing the source of link and creating this new
element.
So here are my questions:
- Is it possible to implement such a behavior with GMF?
- If it is, where should I look at?
- How could I create both "Type A" EditPart and model when I know only the
EObject container?
- Should I place my code directly into getCreateRelationshipCommand of the
BaseItemSemanticEditPolicy (even if I may also create nodes)?
- Where is actually instanciated the relationship creation command?
Thank you in advance,
R. Mechali
Note : I have tried the following changes
- Use the EditHelper to provide a custom IEditHelperAdvice: I cannot
acces the FlowData created because configureRequest is called before
getBeforeEditCommand(...).execute(). This implies I cannot open a
DialogWindow on creation.
- Modify "getCreateRelationshipCommand(CreateRelationShipRequest)" to
provide my own command to create the link, it is created two times (the
initial command is still executed !)
- Change the Data link creation command : Even if the method canExecute()
returns true, the feed back shows an invalid action icon and nothing
happens.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.13757 seconds