Bug 150645 - Linking to/from shortcuts is broken
Summary: Linking to/from shortcuts is broken
Status: NEW
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 3.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on: 191820
Blocks:
  Show dependency tree
 
Reported: 2006-07-14 09:46 EDT by Fedor Isakov CLA
Modified: 2011-05-01 08:13 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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