Search in sources :

Example 11 with PreferenceLinkArea

use of org.eclipse.ui.dialogs.PreferenceLinkArea in project webtools.sourceediting by eclipse.

the class DTDEditorPreferencePage method createContents.

protected Control createContents(Composite parent) {
    setPreferenceStore(DTDUIPlugin.getDefault().getPreferenceStore());
    // $NON-NLS-1$
    new PreferenceLinkArea(parent, SWT.WRAP | SWT.MULTI, "org.eclipse.wst.sse.ui.preferences.editor", DTDUIMessages._UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK, (IWorkbenchPreferenceContainer) getContainer(), null).getControl().setLayoutData(GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).grab(true, false).create());
    new Label(parent, SWT.NONE).setLayoutData(GridDataFactory.swtDefaults().create());
    return super.createContents(parent);
}
Also used : Label(org.eclipse.swt.widgets.Label) PreferenceLinkArea(org.eclipse.ui.dialogs.PreferenceLinkArea)

Example 12 with PreferenceLinkArea

use of org.eclipse.ui.dialogs.PreferenceLinkArea in project webtools.sourceediting by eclipse.

the class JSPSourcePreferencePage method createContents.

protected Control createContents(Composite parent) {
    Composite composite = createComposite(parent, 1);
    new // $NON-NLS-1$
    PreferenceLinkArea(// $NON-NLS-1$
    composite, // $NON-NLS-1$
    SWT.WRAP | SWT.MULTI, // $NON-NLS-1$
    "org.eclipse.wst.sse.ui.preferences.editor", // $NON-NLS-1$
    JSPUIMessages._UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK, (IWorkbenchPreferenceContainer) getContainer(), null).getControl().setLayoutData(GridDataFactory.fillDefaults().indent(5, 0).hint(150, SWT.DEFAULT).create());
    new Label(composite, SWT.NONE).setLayoutData(GridDataFactory.swtDefaults().create());
    Text label = new Text(composite, SWT.READ_ONLY);
    label.setText(JSPUIMessages.JSPSourcePreferencePage_0);
    GridData data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
    data.horizontalIndent = 0;
    label.setLayoutData(data);
    PreferenceLinkArea fileEditorsArea = new // $NON-NLS-1$
    PreferenceLinkArea(// $NON-NLS-1$
    composite, // $NON-NLS-1$
    SWT.NONE, // $NON-NLS-1$
    "org.eclipse.wst.html.ui.preferences.source", // $NON-NLS-1$
    JSPUIMessages.JSPSourcePreferencePage_1, (IWorkbenchPreferenceContainer) getContainer(), null);
    data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
    data.horizontalIndent = 5;
    fileEditorsArea.getControl().setLayoutData(data);
    PreferenceLinkArea contentTypeArea = new // $NON-NLS-1$
    PreferenceLinkArea(// $NON-NLS-1$
    composite, // $NON-NLS-1$
    SWT.NONE, // $NON-NLS-1$
    "org.eclipse.wst.sse.ui.preferences.xml.source", // $NON-NLS-1$
    JSPUIMessages.JSPSourcePreferencePage_2, (IWorkbenchPreferenceContainer) getContainer(), null);
    data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
    data.horizontalIndent = 5;
    contentTypeArea.getControl().setLayoutData(data);
    fFormatterButton = new Button(composite, SWT.CHECK);
    fFormatterButton.setText(JSPUIMessages.JSPSourcePreferencePage_format);
    fFormatterButton.setSelection(getPreferenceStore().getBoolean(JSPUIPreferenceNames.USE_HTML_FORMATTER));
    return composite;
}
Also used : Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) Label(org.eclipse.swt.widgets.Label) GridData(org.eclipse.swt.layout.GridData) Text(org.eclipse.swt.widgets.Text) PreferenceLinkArea(org.eclipse.ui.dialogs.PreferenceLinkArea)

Example 13 with PreferenceLinkArea

use of org.eclipse.ui.dialogs.PreferenceLinkArea in project webtools.sourceediting by eclipse.

the class XMLSourcePreferencePage method createContents.

protected Control createContents(Composite parent) {
    final Composite composite = super.createComposite(parent, 1);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.XML_PREFWEBX_SOURCE_HELPID);
    new // $NON-NLS-1$
    PreferenceLinkArea(// $NON-NLS-1$
    composite, // $NON-NLS-1$
    SWT.WRAP | SWT.MULTI, // $NON-NLS-1$
    "org.eclipse.wst.sse.ui.preferences.editor", // $NON-NLS-1$
    XMLUIMessages._UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK, (IWorkbenchPreferenceContainer) getContainer(), null).getControl().setLayoutData(GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).create());
    new Label(composite, SWT.NONE).setLayoutData(GridDataFactory.swtDefaults().create());
    createContentsForFormattingGroup(composite);
    createContentsForGrammarConstraintsGroup(composite);
    setSize(composite);
    loadPreferences();
    return composite;
}
Also used : Composite(org.eclipse.swt.widgets.Composite) Label(org.eclipse.swt.widgets.Label) PreferenceLinkArea(org.eclipse.ui.dialogs.PreferenceLinkArea)

Aggregations

PreferenceLinkArea (org.eclipse.ui.dialogs.PreferenceLinkArea)13 Label (org.eclipse.swt.widgets.Label)11 Composite (org.eclipse.swt.widgets.Composite)10 GridData (org.eclipse.swt.layout.GridData)5 SelectionEvent (org.eclipse.swt.events.SelectionEvent)3 GridLayout (org.eclipse.swt.layout.GridLayout)3 Button (org.eclipse.swt.widgets.Button)3 IWorkbenchPreferenceContainer (org.eclipse.ui.preferences.IWorkbenchPreferenceContainer)3 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2 IWorkbenchHelpSystem (org.eclipse.ui.help.IWorkbenchHelpSystem)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 SimpleContentProposalProvider (org.eclipse.jface.fieldassist.SimpleContentProposalProvider)1 TextContentAdapter (org.eclipse.jface.fieldassist.TextContentAdapter)1 AccessibleAdapter (org.eclipse.swt.accessibility.AccessibleAdapter)1 AccessibleEvent (org.eclipse.swt.accessibility.AccessibleEvent)1 SelectionListener (org.eclipse.swt.events.SelectionListener)1 Link (org.eclipse.swt.widgets.Link)1