1 /******************************************************************************* 2 * Copyright (c) 2000, 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.ui.internal.dialogs; 12 13 import org.eclipse.jface.preference.IPreferenceStore; 14 import org.eclipse.jface.preference.PreferencePage; 15 import org.eclipse.swt.SWT; 16 import org.eclipse.swt.widgets.Composite; 17 import org.eclipse.swt.widgets.Control; 18 import org.eclipse.ui.IWorkbench; 19 import org.eclipse.ui.IWorkbenchPreferencePage; 20 import org.eclipse.ui.internal.WorkbenchPlugin; 21 22 /* 23 * A page used as a filler for nodes in the preference tree 24 * for which no page is suppplied. 25 */ 26 public class EmptyPreferencePage extends PreferencePage implements 27 IWorkbenchPreferencePage { 28 protected Control createContents(Composite parent) { 29 return new Composite(parent, SWT.NULL); 30 } 31 32 /** 33 * Hook method to get a page specific preference store. Reimplement this 34 * method if a page don't want to use its parent's preference store. 35 */ 36 protected IPreferenceStore doGetPreferenceStore() { 37 return WorkbenchPlugin.getDefault().getPreferenceStore(); 38 } 39 40 /** 41 * @see IWorkbenchPreferencePage 42 */ 43 public void init(IWorkbench workbench) { 44 } 45 } 46