I making plugin that use the eclipse java editor text hover and write my customize text.
I tried to give the text hover customize design but it return to the default setting when I move the mouse on it (focus).
I think it may accour because of some refresh that the eclipse mase.
this is my code:
public IInformationControlCreator getHoverControlCreator() {
return new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
DefaultInformationControl iControl = new DefaultInformationControl(parent, tbm);
IAction action =new MyActionTry();
tbm.add(action);
IAction action2 =new MyActionTry();
tbm.add(action2);
tbm.update(true);
iControl.setBackgroundColor(new Color(null, 255,0,0));
return iControl;
}
};
}
And this is what happend when I run my plugin:
Befor moving the mouse on the texthover(before focus):
and after:
P.S
The "gdfgdf" you can see in the ToolBarManager is the event that I gave him this info in the default constractor.