Example usage for org.eclipse.jface.dialogs IDialogLabelKeys HELP_LABEL_KEY

List of usage examples for org.eclipse.jface.dialogs IDialogLabelKeys HELP_LABEL_KEY

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogLabelKeys HELP_LABEL_KEY.

Prototype

String HELP_LABEL_KEY

To view the source code for org.eclipse.jface.dialogs IDialogLabelKeys HELP_LABEL_KEY.

Click Source Link

Document

The key used to retrieve the label for help buttons.

Usage

From source file:org.yakindu.sct.ui.editor.propertysheets.AbstractEditorPropertySection.java

License:Open Source License

protected void createHelpWidget(final Composite parent, final Control control, String helpId) {
    final ImageHyperlink helpWidget = toolkit.createImageHyperlink(parent, SWT.CENTER);
    Image defaultImage = PlatformUI.getWorkbench().getSharedImages()
            .getImage(ISharedImages.IMG_LCL_LINKTO_HELP);
    helpWidget.setImage(defaultImage);/*from   ww w.  j  a  v a  2 s . c  o m*/
    GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).applyTo(helpWidget);
    helpWidget.setToolTipText(JFaceResources.getString(IDialogLabelKeys.HELP_LABEL_KEY));
    helpWidget.addMouseListener(new MouseAdapter() {
        public void mouseDown(MouseEvent e) {
            control.setFocus();
            PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp();
        }
    });
    GridDataFactory.fillDefaults().applyTo(helpWidget);
    helpWidget.setEnabled(true);
    setHelpContext(control, helpId);
}