fix browse button in create new PHP file wizard
authorbananeweizen <bananeweizen>
Mon, 19 Dec 2005 20:33:37 +0000 (20:33 +0000)
committerbananeweizen <bananeweizen>
Mon, 19 Dec 2005 20:33:37 +0000 (20:33 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizardPage.java

index 1b64440..ec91d2b 100644 (file)
@@ -138,10 +138,13 @@ public class PHPFileWizardPage extends WizardPage {
         ResourcesPlugin.getWorkspace().getRoot(), false, PHPWizardMessages
             .getString("WizardPage.selectNewFileContainer"));
     if (dialog.open() == ContainerSelectionDialog.OK) {
-      Object[] result = dialog.getResult();
-      if (result.length == 1) {
-        IContainer container = (IContainer) result[0];
-        containerText.setText(container.getFullPath().toString());
+      Object[] results = dialog.getResult();
+      if (results.length == 1) {
+         Object result=results[0];
+         if (result instanceof IPath) {
+                 IPath ipath = (IPath) result;
+                 containerText.setText(ipath.toString());
+         }
       }
     }
   }