01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.ide.dialogs;
11:
12: import org.eclipse.jface.preference.IPreferenceStore;
13: import org.eclipse.swt.widgets.Composite;
14: import org.eclipse.swt.widgets.Control;
15: import org.eclipse.ui.IWorkbenchPreferencePage;
16: import org.eclipse.ui.PlatformUI;
17: import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
18: import org.eclipse.ui.internal.dialogs.WorkbenchPreferencePage;
19: import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
20:
21: /**
22: * The IDE workbench main preference page.
23: *
24: *Note: want IDE settings to appear in main Workbench preference page (via subclassing),
25: * however the superclass, WorkbenchPreferencePage, is internal
26: */
27: public class IDEWorkbenchPreferencePage extends WorkbenchPreferencePage
28: implements IWorkbenchPreferencePage {
29:
30: /*
31: * (non-Javadoc)
32: *
33: * @see org.eclipse.jface.preference.PreferencePage
34: */
35: protected Control createContents(Composite parent) {
36:
37: PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
38: IWorkbenchHelpContextIds.WORKBENCH_PREFERENCE_PAGE);
39:
40: Composite composite = createComposite(parent);
41:
42: createShowUserDialogPref(composite);
43: createStickyCyclePref(composite);
44: createHeapStatusPref(composite);
45:
46: createOpenModeGroup(composite);
47:
48: applyDialogFont(composite);
49:
50: return composite;
51: }
52:
53: /**
54: * Returns the IDE preference store.
55: * @return the preference store.
56: */
57: protected IPreferenceStore getIDEPreferenceStore() {
58: return IDEWorkbenchPlugin.getDefault().getPreferenceStore();
59: }
60:
61: /**
62: * The default button has been pressed.
63: */
64: protected void performDefaults() {
65: super .performDefaults();
66: }
67:
68: /**
69: * The user has pressed Ok. Store/apply this page's values appropriately.
70: */
71: public boolean performOk() {
72: return super.performOk();
73: }
74:
75: }
|