Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352911

Summary: support refactoring handles within a context
Product: z_Archived Reporter: Shawn Minto <shawn.minto>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: enhancement    
Priority: P3 CC: milesparker
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 357297    
Bug Blocks:    
Attachments:
Description Flags
proof of concept patch none

Description Shawn Minto CLA 2011-07-22 16:30:08 EDT
Currently, there is no way to fully refactor a handle in a context (active or otherwise).  There is a method IInteractionContextManager#updateHandle and on IInteractionContext#updateElementHandle.  The IInteractionContextManager method calls the IInteractionContext method on the active context.  This method only updates the element map and not the InteractionEvent history which results in the correct displaying of the context for an active context, but the the updated handles will never be stored.  We should support refactoring handles within the context (and potentially all child handles as well).
Comment 1 Shawn Minto CLA 2011-07-22 16:30:37 EDT
Created attachment 200222 [details]
proof of concept patch
Comment 2 Miles Parker CLA 2011-09-12 23:48:26 EDT
This does kind of sort of work. In the Modeling Bridge, I'm calling update and correctly getting the context to persist and store the new updated handles. However, the old handles are not getting removed and sometimes it seems there is some inconsistency there -- but tis isn't that big an issue because they are of course invisible. Is there a good work-around for the issue with non-removed handles? I suppose I could just remove them manually from the context?
Comment 3 Miles Parker CLA 2011-09-13 00:00:28 EDT
Shawn, I've atteched my context to bug 357297 so you can see the code that excercises this. Might not be too useful as you'd need to synch to my fork as well: http://wiki.eclipse.org/Mylyn/Modeling_Bridge#Git_Repos  But check org.eclipse.mylyn.modeling.ecoretools.ui.tests EcoreDiagramEditorTest for test that exercises this and the actual implementation is in o.e.m.modeling.gm.ui ContexDecoratorProvider#partOpened(IWorkbenchPart part) but will soon be moving from that location.
Comment 4 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn