[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Issue with Decorator, Hanger, and Icons

Hi Alex--

Thanks for the good info. I've looked into your suggestion and am having a hard time getting some of the pieces together. My EditPart class's constructor takes in a View object, but I'm having a hard time turning it into a Viewer class. Also, I've found that the getVisualPartRegistry() you mentioned is probably getVisualPartMap(). It is in org.eclipse.gef.ui.parts.AbstractEditPartView class.

Somehow, I need to take the View class that I start with and get reference to AbstractEditPartViewer (or another viewer class that can return the VisualPartMap). Can you provide some guidance on this? Also, should I even be doing this in the constructor of the EditPart or is there another place better suited?

Thanks for your help.

-Shu

Alex Boyko wrote:
Hi,

As far as I understand you'd like the arrows to show up when you hover on the decoration figure of the component. If yes, all you need to do is register decorating figure with the component's editpart.
viewer.getVisualPartRegistry().put(decoratorFigure, componentEditPart)
(Names of the methods might be different, because I'm writing this this without looking at the code.)
Hope this helps.


Cheers,
Alex