Community
Participate
Working Groups
If ConnectorHandleEditPolicy.getDisappearanceDelayUponExit returns a high number (500) and getAppearanceDelay returns a very low number (0) you see a lot of connector handles show up when you drag the mouse past a list of edit parts that have this edit policy. I don't see the point of ever having more than one connector handle to be shown at a time. As soon as a new connector handle is shown, the previous one should be removed even if its disappearance delay hasn't run out.
Created attachment 27919 [details] ConnectorHandleEditPolicy.patch Here's my solution to this problem using UIJobs. Needs string externalization. This was kinda fun to do, since I like hacking around with Jobs. Feel free to change things around if you'd like... this is merely a suggestion.
Changing component to "Runtime Diagram"
Moving to the next release, GMF 2.1.
I began this fix based on the patch provided by Mindaugas. However, it needed to be modified somewhat as we now have a base DiagramAssistantEditPolicy class and the ConnectionHandleEditPolicy and PopupBarEditPolicy classes both subclass from this. I modified the DiagramAssistantEditPolicy so that the delay to add and remove the diagram assistant uses UIJobs instead of a timer.exec() call as suggested by Mindaugas. This allows me to control the jobs that have already been scheduled. Now when a diagram assistant is about to be shown, I can find all the diagram assistant hide jobs scheduled (even from other editpolicies on other shapes) and wake them up so they are scheduled immediately, thus resulting in the diagram assistant being hidden. The result of the code changes made will be that only one diagram assistant of a given type (e.g. connection handle or popup bar) will ever be displayed on the diagram at any one given time. Mindaugas, I tested this with a 0 appearance delay as I believe you are using and it seems to work fine also, but let me know if you have any problems with it.
[target cleanup] 2.1 M5 was the original target milestone for this bug
[GMF Restructure] Bug 319140 : product GMF and component Runtime was the original product and component for this bug