fUseProjectSettings= new SelectionButtonDialogField(SWT.CHECK); fUseProjectSettings.setDialogFieldListener(listener); fUseProjectSettings.setLabelText(PreferencesMessages.getString("PropertyAndPreferencePage.useprojectsettings.label")); fUseProjectSettings.doFillIntoGrid(composite, 1); LayoutUtil.setHorizontalGrabbing(fUseProjectSettings.getSelectionButton(null));  fChangeWorkspaceSettings= new Hyperlink(composite, SWT.NONE); fChangeWorkspaceSettings.setText(PreferencesMessages.getString("PropertyAndPreferencePage.useworkspacesettings.change")); fChangeWorkspaceSettings.setLayoutData(new GridData()); fChangeWorkspaceSettings.setUnderlined(true); fChangeWorkspaceSettings.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.HYPERLINK_COLOR));  fChangeWorkspaceSettings.addHyperlinkListener(new HyperlinkAdapter() { public void linkActivated(HyperlinkEvent e) { openWorkspacePreferences(); }  public void linkEntered(HyperlinkEvent e) { fChangeWorkspaceSettings.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.ACTIVE_HYPERLINK_COLOR)); }  public void linkExited(HyperlinkEvent e) { fChangeWorkspaceSettings.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.HYPERLINK_COLOR)); }  }); Label horizontalLine= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); horizontalLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1)); }
	protected Control createContents(Composite parent) {		Composite composite= new Composite(parent, SWT.NONE);		GridLayout layout= new GridLayout();		layout.marginHeight= 0;		layout.marginWidth= 0;		layout.numColumns= 2;		composite.setLayout(layout);				if (isProjectPreferencePage()) {			IDialogFieldListener listener= new IDialogFieldListener() {				public void dialogFieldChanged(DialogField field) {					doProjectWorkspaceStateChanged();				}			};						fUseProjectSettings= new SelectionButtonDialogField(SWT.CHECK);			fUseProjectSettings.setDialogFieldListener(listener);			fUseProjectSettings.setLabelText(PreferencesMessages.getString("PropertyAndPreferencePage.useprojectsettings.label")); //$NON-NLS-1$			fUseProjectSettings.doFillIntoGrid(composite, 1);			LayoutUtil.setHorizontalGrabbing(fUseProjectSettings.getSelectionButton(null));						fChangeWorkspaceSettings= new Hyperlink(composite, SWT.NONE);			fChangeWorkspaceSettings.setText(PreferencesMessages.getString("PropertyAndPreferencePage.useworkspacesettings.change")); //$NON-NLS-1$			fChangeWorkspaceSettings.setLayoutData(new GridData());			fChangeWorkspaceSettings.setUnderlined(true);			fChangeWorkspaceSettings.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.HYPERLINK_COLOR));						fChangeWorkspaceSettings.addHyperlinkListener(new HyperlinkAdapter() {				public void linkActivated(HyperlinkEvent e) {					openWorkspacePreferences();				}								public void linkEntered(HyperlinkEvent e) {					fChangeWorkspaceSettings.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.ACTIVE_HYPERLINK_COLOR));				}								public void linkExited(HyperlinkEvent e) {					fChangeWorkspaceSettings.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.HYPERLINK_COLOR));				}							});			Label horizontalLine= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);			horizontalLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));		}				GridData data= new GridData(GridData.FILL, GridData.FILL, true, true);		data.horizontalSpan= 2;		data.heightHint= 0;				fConfigurationBlockControl= createPreferenceContent(composite);		fConfigurationBlockControl.setLayoutData(data);		if (isProjectPreferencePage()) {			boolean useProjectSettings= hasProjectSpecificOptions();						fUseProjectSettings.setSelection(useProjectSettings);			//fUseWorkspaceSettings.setSelection(!useProjectSettings);						doProjectWorkspaceStateChanged();		}		Dialog.applyDialogFont(composite);		return composite;	}