1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / preferences / AbstractConfigurationBlockPreferencePage.java
index e2bf8be..2746a17 100644 (file)
@@ -1,10 +1,10 @@
 /*******************************************************************************
  * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -19,9 +19,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-
+import org.eclipse.ui.PlatformUI;
 
 /**
  * Abstract preference page which is used to wrap a
@@ -29,12 +27,12 @@ import org.eclipse.ui.help.WorkbenchHelp;
  * 
  * @since 3.0
  */
-public abstract class AbstractConfigurationBlockPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-       
-       
+public abstract class AbstractConfigurationBlockPreferencePage extends
+               PreferencePage implements IWorkbenchPreferencePage {
+
        private IPreferenceConfigurationBlock fConfigurationBlock;
+
        private OverlayPreferenceStore fOverlayStore;
-       
 
        /**
         * Creates a new preference page.
@@ -42,18 +40,23 @@ public abstract class AbstractConfigurationBlockPreferencePage extends Preferenc
        public AbstractConfigurationBlockPreferencePage() {
                setDescription();
                setPreferenceStore();
-               fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), new OverlayPreferenceStore.OverlayKey[] {});
-               fConfigurationBlock= createConfigurationBlock(fOverlayStore);
+               fOverlayStore = new OverlayPreferenceStore(getPreferenceStore(),
+                               new OverlayPreferenceStore.OverlayKey[] {});
+               fConfigurationBlock = createConfigurationBlock(fOverlayStore);
        }
-               
-       protected abstract IPreferenceConfigurationBlock createConfigurationBlock(OverlayPreferenceStore overlayPreferenceStore);
+
+       protected abstract IPreferenceConfigurationBlock createConfigurationBlock(
+                       OverlayPreferenceStore overlayPreferenceStore);
+
        protected abstract String getHelpId();
+
        protected abstract void setDescription();
+
        protected abstract void setPreferenceStore();
-       
+
        /*
         * @see IWorkbenchPreferencePage#init()
-        */     
+        */
        public void init(IWorkbench workbench) {
        }
 
@@ -62,66 +65,67 @@ public abstract class AbstractConfigurationBlockPreferencePage extends Preferenc
         */
        public void createControl(Composite parent) {
                super.createControl(parent);
-               WorkbenchHelp.setHelp(getControl(), getHelpId());
+               PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
+                               getHelpId());
        }
-       
+
        /*
         * @see PreferencePage#createContents(Composite)
         */
        protected Control createContents(Composite parent) {
-               
+
                fOverlayStore.load();
                fOverlayStore.start();
-               
+
                fConfigurationBlock.createControl(parent);
-               
+
                initialize();
-               
+
                Dialog.applyDialogFont(parent);
                return parent;
        }
-       
+
        private void initialize() {
                fConfigurationBlock.initialize();
        }
-       
-    /*
+
+       /*
         * @see PreferencePage#performOk()
         */
        public boolean performOk() {
-               
+
                fConfigurationBlock.performOk();
 
                fOverlayStore.propagate();
-               
+
                PHPeclipsePlugin.getDefault().savePluginPreferences();
-               
+
                return true;
        }
-       
+
        /*
         * @see PreferencePage#performDefaults()
         */
        public void performDefaults() {
-               
+
                fOverlayStore.loadDefaults();
                fConfigurationBlock.performDefaults();
 
                super.performDefaults();
        }
-       
+
        /*
         * @see DialogPage#dispose()
         */
        public void dispose() {
-               
+
                fConfigurationBlock.dispose();
-               
+
                if (fOverlayStore != null) {
                        fOverlayStore.stop();
-                       fOverlayStore= null;
+                       fOverlayStore = null;
                }
-               
+
                super.dispose();
        }
 }