Avoid NPE when deleting a project
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / preferences / PHPMiscProjectPreferences.java
index c8b8145..c0073b1 100644 (file)
@@ -6,6 +6,9 @@ import net.sourceforge.phpeclipse.ui.overlaypages.FieldEditorOverlayPage;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PathEditor;
 import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.RowLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
@@ -34,7 +37,7 @@ public class PHPMiscProjectPreferences extends FieldEditorOverlayPage
   
   protected void createFieldEditors() {
     Composite composite = getFieldEditorParent();
-
+    
     addField(new StringFieldEditor(IPreferenceConstants.PHP_LOCALHOST_PREF,
         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.localhost"),
         composite));
@@ -44,10 +47,15 @@ public class PHPMiscProjectPreferences extends FieldEditorOverlayPage
     addField(new StringFieldEditor(IPreferenceConstants.PHP_DOCUMENTROOT_PREF,
         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.documentroot"),
         composite)); 
-    addField(new PathEditor(IPreferenceConstants.PHP_INCLUDE_PATHS,
+   
+    PathEditor pe = new PathEditor(IPreferenceConstants.PHP_INCLUDE_PATHS,
         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.include_paths"),
         "Choose Path...",
-        composite));
+        composite);
+    addField(pe);
+    
+    
+    
     //if (!isPropertyPage)) {
     //  
     //}