Fix bug #1385272: Improved version for "Parsing of short open tags not fully compatib...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / wizards / PHPFileWizardPage.java
index d2d5d1e..4e6a174 100644 (file)
@@ -12,8 +12,6 @@ package net.sourceforge.phpeclipse.wizards;
  www.phpeclipse.de
  **********************************************************************/
 
-import net.sourceforge.phpdt.internal.ui.util.PHPFileUtil;
-
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
@@ -125,6 +123,7 @@ public class PHPFileWizardPage extends WizardPage {
         else
           container = ((IResource) obj).getParent();
         containerText.setText(container.getFullPath().toString());
+        fileText.setFocus();
       }
     }
     fileText.setText("*.php");
@@ -140,10 +139,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());
+         }
       }
     }
   }