Bug 256496 - Provide a wizard-free API for UMLCreateShortcutAction
Summary: Provide a wizard-free API for UMLCreateShortcutAction
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Samples (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Michael Golubev CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-11-25 15:30 EST by Nicolas Rouquette CLA
Modified: 2013-05-27 05:37 EDT (History)
1 user (show)

See Also:


Attachments
Patch for separating the work of the wizard as an invocable API method (4.29 KB, patch)
2008-11-25 15:31 EST, Nicolas Rouquette CLA
borlander: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Rouquette CLA 2008-11-25 15:30:47 EST
The method: org.eclipse.uml2.diagram.clazz.part.UMLCreateShortcutAction.execute(ExecutionEvent) does two things:
1) invoke the UMLElementChooserDialog to select an existing UML element to create a shortcut to in the context of the current diagram
2) create the shortcut to the selected UML element

To facilitate the creation of shortcuts, we need to have an API to invoke (2), e.g.:

org.eclipse.uml2.diagram.clazz.part.UMLCreateShortcutAction.createShortcut(TransactionalEditingDomain, IOperationHistory, EObject, EditPart, IEditorPart)

I've tested this patch using a modified version of org.eclipse.epsilon.ewl.gmf.GmfTool that provides the above method.
It seems to work properly with 3.5M3 & the SVN version of Epsilon.
Comment 1 Nicolas Rouquette CLA 2008-11-25 15:31:43 EST
Created attachment 118696 [details]
Patch for separating the work of the wizard as an invocable API method
Comment 2 Michael Golubev CLA 2008-11-26 10:25:17 EST
Since we have 8 diagram plugins, changes like this should be made via custom templates that affect regeneration for the whole U2T scope. 


Comment 3 Michael Golubev CLA 2009-01-06 12:31:53 EST
- Proposed patch committed, 
- custom template to make the same fix available for other diagrams is deferred untilM5
Comment 4 Michael Golubev CLA 2013-05-27 05:37:38 EDT
fixed 3 entries (instead of 1) in IP log