01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 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.dialogs;
11:
12: import org.eclipse.jface.preference.IPreferenceStore;
13: import org.eclipse.jface.preference.PreferencePage;
14: import org.eclipse.swt.SWT;
15: import org.eclipse.swt.widgets.Composite;
16: import org.eclipse.swt.widgets.Control;
17: import org.eclipse.ui.IWorkbench;
18: import org.eclipse.ui.IWorkbenchPreferencePage;
19: import org.eclipse.ui.internal.WorkbenchPlugin;
20:
21: /*
22: * A page used as a filler for nodes in the preference tree
23: * for which no page is suppplied.
24: */
25: public class EmptyPreferencePage extends PreferencePage implements
26: IWorkbenchPreferencePage {
27: protected Control createContents(Composite parent) {
28: return new Composite(parent, SWT.NULL);
29: }
30:
31: /**
32: * Hook method to get a page specific preference store. Reimplement this
33: * method if a page don't want to use its parent's preference store.
34: */
35: protected IPreferenceStore doGetPreferenceStore() {
36: return WorkbenchPlugin.getDefault().getPreferenceStore();
37: }
38:
39: /**
40: * @see IWorkbenchPreferencePage
41: */
42: public void init(IWorkbench workbench) {
43: }
44: }
|