code cleaning (no functional changes)
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / wizards / NewProjectCreationWizard.java
index 4378e2f..c895758 100644 (file)
@@ -2,7 +2,8 @@ package net.sourceforge.phpeclipse.wizards;
 
 import java.lang.reflect.InvocationTargetException;
 
-import net.sourceforge.phpeclipse.PHPCore;
+import net.sourceforge.phpdt.core.JavaCore;
+import net.sourceforge.phpdt.ui.actions.OpenPHPPerspectiveAction;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.resources.IProject;
@@ -43,7 +44,8 @@ public class NewProjectCreationWizard extends BasicNewResourceWizard implements
 
                BasicNewProjectResourceWizard.updatePerspective(configurationElement);
                selectAndReveal(newProject);
-
+        // open the PHP perspective
+               new OpenPHPPerspectiveAction().run();
                return true;
        }
 
@@ -73,7 +75,7 @@ public class NewProjectCreationWizard extends BasicNewResourceWizard implements
                                                newProject.open(new SubProgressMonitor(monitor, 1));
                                                remainingWorkUnits--;
                                        }
-                                       PHPCore.addPHPNature(newProject, new SubProgressMonitor(monitor, remainingWorkUnits));
+                                       JavaCore.addPHPNature(newProject, new SubProgressMonitor(monitor, remainingWorkUnits));
                                } catch (CoreException e) {
                                        throw new InvocationTargetException(e);
                                } finally {