How do I implement a toggle button, as pictured below, in the section toolbar of Eclipse UI Forms? I only find examples for adding actions to the section toolbar.

Bela Vizer
I think the key is: IAction.AS_CHECK_BOX
toggleBotton = new Action(Messages.toolTipMessage, IAction.AS_CHECK_BOX) {
@Override
public void run() {
}
};
toggleBotton.setImageDescriptor(...);
toggleBotton.setEnabled(...);
getManagedForm().getForm().getToolBarManager().add(toggleBotton);
来源:https://stackoverflow.com/questions/11222951/toggle-button-in-eclipse-forms-section-toolbar