Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352911 - support refactoring handles within a context
Summary: support refactoring handles within a context
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 357297
Blocks:
  Show dependency tree
 
Reported: 2011-07-22 16:30 EDT by Shawn Minto CLA
Modified: 2012-03-13 08:49 EDT (History)
1 user (show)

See Also:


Attachments
proof of concept patch (5.25 KB, patch)
2011-07-22 16:30 EDT, Shawn Minto CLA
no flags Details | Diff

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