When you open a dialog in Eclipse, where is a form layout, you can see that when you hover your mouse over some item, its label or space between them, there's an auxiliary arrow shown. Screenshot:
My question is: is there any (simple) way to achieve the same in Java with SWT and JFace?
No there is no standard way to achieve this through SWT or JFace, as it is not a built in feature. It is not that difficult to add on your own though.
Have a look at this ConfigurationBlock.java
file from the PDE source. This class is the base for all option blocks in PDE preference pages. This exact same code snippet is also used by JDT but it has a different copy in OptionConfigurationBlock.java
.
The method that gets called for each combo control is ConfigurationBlock#addHighlight(..)
, which is responsible for adding the highlight when the control is in focus or when mouse is hovering over its label.