1) Fixed issue #872.
[phpeclipse.git] / net.sourceforge.phpeclipse.externaltools / src / net / sourceforge / phpdt / externaltools / preferences / ApachePrefencePage.java
index 1f410f3..871b96a 100644 (file)
@@ -38,8 +38,10 @@ public class ApachePrefencePage extends PreferencePage implements
 
        public ApachePrefencePage() {
                super();
-               setPreferenceStore(ExternalToolsPlugin.getDefault()
-                               .getPreferenceStore());
+               
+               if (ExternalToolsPlugin.getDefault () != null) {
+                 setPreferenceStore (ExternalToolsPlugin.getDefault().getPreferenceStore());
+               }
        }
 
        protected Control createContents(Composite parent) {
@@ -51,7 +53,7 @@ public class ApachePrefencePage extends PreferencePage implements
                apacheStartSFE = new StringFieldEditor(
                                ExternalToolsPlugin.APACHE_START_PREF, PHPPreferencesMessages
                                                .getString("PHPBasePreferencePage.apacheGroup.start"),
-                                               composite);
+                               composite);
                apacheStartSFE.setPage(this);
                apacheStartSFE.setPreferenceStore(getPreferenceStore());
                apacheStartSFE.load();
@@ -62,17 +64,16 @@ public class ApachePrefencePage extends PreferencePage implements
                                ExternalToolsPlugin.APACHE_START_BACKGROUND,
                                PHPPreferencesMessages
                                                .getString("PHPBasePreferencePage.apacheGroup.start_background"),
-                                               composite);
+                               composite);
                apacheStartBFE.setPage(this);
                apacheStartBFE.setPreferenceStore(getPreferenceStore());
                apacheStartBFE.load();
                new Label(composite, SWT.NONE);
 
-
                apacheStopSFE = new StringFieldEditor(
                                ExternalToolsPlugin.APACHE_STOP_PREF, PHPPreferencesMessages
                                                .getString("PHPBasePreferencePage.apacheGroup.stop"),
-                                               composite);
+                               composite);
                apacheStopSFE.setPage(this);
                apacheStopSFE.setPreferenceStore(getPreferenceStore());
                apacheStopSFE.load();
@@ -83,18 +84,17 @@ public class ApachePrefencePage extends PreferencePage implements
                                ExternalToolsPlugin.APACHE_STOP_BACKGROUND,
                                PHPPreferencesMessages
                                                .getString("PHPBasePreferencePage.apacheGroup.stop_background"),
-                                               composite);
+                               composite);
                apacheStopBFE.setPage(this);
                apacheStopBFE.setPreferenceStore(getPreferenceStore());
                apacheStopBFE.load();
                new Label(composite, SWT.NONE);
 
-
                apacheRestartSFE = new StringFieldEditor(
                                ExternalToolsPlugin.APACHE_RESTART_PREF,
                                PHPPreferencesMessages
                                                .getString("PHPBasePreferencePage.apacheGroup.restart"),
-                                               composite);
+                               composite);
                apacheRestartSFE.setPage(this);
                apacheRestartSFE.setPreferenceStore(getPreferenceStore());
                apacheRestartSFE.load();
@@ -105,17 +105,16 @@ public class ApachePrefencePage extends PreferencePage implements
                                ExternalToolsPlugin.APACHE_RESTART_BACKGROUND,
                                PHPPreferencesMessages
                                                .getString("PHPBasePreferencePage.apacheGroup.restart_background"),
-                                               composite);
+                               composite);
                apacheRestartBFE.setPage(this);
                apacheRestartBFE.setPreferenceStore(getPreferenceStore());
                apacheRestartBFE.load();
                new Label(composite, SWT.NONE);
 
-
                apacheRunFFE = new FileFieldEditor(ExternalToolsPlugin.APACHE_RUN_PREF,
                                PHPPreferencesMessages
                                                .getString("PHPBasePreferencePage.apacheGroup.run"),
-                                               composite);
+                               composite);
                apacheRunFFE.setPage(this);
                apacheRunFFE.setPreferenceStore(getPreferenceStore());
                apacheRunFFE.load();