Question

I want to modify the existing tool tip text.I have following lines in plugin.xml

<command commandId="org.eclipse.ui.edit.paste" 
 id="org.eclipse.ui.edit.paste" tooltip="%pasteAction.TIP">

in plugin.properties

pasteAction.TIP=Paste

Existing tool tip appears like following

Paste(Ctrl+V)

I want to modify this existing tool tip to appears like following

Paste(Ctrl+V)
Paste a reference to the object

I am getting three problems to achieve this use case.

  • (Ctrl+V) added automatically at the end of tool tip text. which is not desired. It should appear where it is expected.

  • don't know how to Bold the particular string e.g. (Ctrl+V)

  • don't know how to make tool tip text multiline

we can use \n for multiline. it works but still looking for other two questions.

Thanks

Était-ce utile?

La solution

For controls that you create you can use the org.eclipse.jface.window.ToolTip class to define custom tool tips.

For controls that Eclipse creates I don't know of any way to change the position of the key binding text or the font (bold).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top