Bug 150645

Summary: Linking to/from shortcuts is broken
Product: [Modeling] GMF-Tooling (ARCHIVED) Reporter: Fedor Isakov <fisakov>
Component: CoreAssignee: Project Inbox <gmp.gmf-tooling-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: 2.0Keywords: plan
Target Milestone: 3.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 191820    
Bug Blocks:    

Description Fedor Isakov CLA 2006-07-14 09:46:17 EDT
Scenario (using GMF 1.0 taipan example)

Create diagram a1 (port a1.1, port a1.2)
Create diagram a2 (port a2.1)
Save diagram a2
Create shortcut on a1 to port a2.1
Create two routes, e.g.: a1.1 to a2.1 and a2.1 to a1.2 
Delete the shortcut
Notice routes not removed -- BUG
Save/close/reopen diagram a1.
Notice a route still present (dangling connection a1.2 to a2.1) -- BUG
Again create shortcut to a2.1
Notice the route a1.2 to a2.1 not reconnected -- BUG
Save/close/reopen doesn't help.
Comment 1 Alex Shatalin CLA 2006-07-17 06:21:00 EDT
I'm not sure routes should be removed from model on deleting a shortcut to the element - corresponding element still present in another model, so links are still valid. Please, correct me if I'm wrong.

So, i think this request should ask to correctly update links to/from shortcuts (by corresponding ConnectionEditPolicy). Same problem was described in this request: https://bugs.eclipse.org/bugs/show_bug.cgi?id=149547
Comment 2 Fedor Isakov CLA 2006-07-17 06:39:27 EDT
No, connections shoulnd't be removed from the model on shortcut removal. As a matter of fact, the menu item saying "Delete from model" should not be allowed on shortcut at all, as it can only be removed from view. I may be wrong, but the way shortcuts removal is done now is IMO a quick hack: the *ItemSemanticEditPolicy returns *semantic* destroy element command with getElementToDestroy() overridden to return the *view*. I don't think this is the right way to do it. But then again, I may be wrong at judging what is "right" here.

There is a related request concerning connections to shortcuts: bug# 132574. It may be wise to look for a solution that satisfies both.
Comment 3 Alex Shatalin CLA 2006-07-17 07:43:45 EDT
I see, so if the proper command will be executed for the shortcuts (delete from view instead of semantic delete command) it'll be ok. 

In addition we just have to change CanonicalEditPolicies in accordance with the request mentioned before.
Comment 4 Anthony Hunter CLA 2007-05-01 09:22:29 EDT
Since GMF 2.0 M6 was released April 5, 2007, doing a bulk move of all open Bugzillas currently on M6 to 2.0 M7. Owners will need to access if the issue really is targetted for 2.0 M7.
Comment 5 Alex Shatalin CLA 2007-06-09 11:12:56 EDT
Too many changes for RC2. Moving to the next version.
Comment 6 Alex Shatalin CLA 2008-06-04 11:30:20 EDT
Moving to the next version.
Comment 7 Eclipse Webmaster CLA 2010-07-19 22:21:18 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug