Cree jdt que parezca información sobre herramientas personalizada para objetos de lienzo GEF

I have a graphical representation for my model, and I want to implement a tooltip that look like jdt tooltip in the following :
- the tooltip shows up when hover over the object in the canvas
- being able to click on the tooltip window to focus, and scroll bar is there if needed.
- Ability to resize the tooltip window after the user change focus to it
- being able to assign command with F2 keybind to pop up the tooltip window (I know how to create command, and how to associate keybind with it)
- Ability to have hyperlinks in the tooltip text ( optional )

I do not know from where to start.
Which eclipse interfaces/classes to implement, extensions to add, adaptors to support.

I tried to find a work through tutorial but I could not.

Gracias por adelantado

preguntado el 02 de diciembre de 13 a las 18:12

1 Respuestas

A lot of what you describe is specific to the Eclipse Text editor and JDT code so won't be available in a Canvas so you would have to write your own code.

You can create a tooltip based on org.eclipse.jface.window.ToolTip. If the tooltip contains StyledText you can create hyperlinks.

There is an example of a fairly elaborate custom tooltip Aquí

What Eclipse does when the tooltip is clicked is open a new normal window of exactly the same size and contents over the tooltip and close the tooltip.

Respondido el 02 de diciembre de 13 a las 21:12

Would you elaborate a little about how to start using ToolTip ? What should I do after extending ToolTip class, so when I hover with mouse on canvas object, my class will get invoked - Nehad

Added link to official JFace tooltip example - greg-449

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.