Added constants from David Foerster to phpsyntax.xml file
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / wizards / NewClassCreationWizard.java
index a98164c..23bf845 100644 (file)
  *******************************************************************************/
 package net.sourceforge.phpdt.internal.ui.wizards;
 
+import net.sourceforge.phpdt.core.ICompilationUnit;
+import net.sourceforge.phpdt.internal.corext.util.JavaModelUtil;
 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
 import net.sourceforge.phpdt.ui.wizards.NewClassWizardPage;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 
@@ -44,13 +48,13 @@ public class NewClassCreationWizard extends NewElementWizard {
         * @see org.eclipse.jdt.internal.ui.wizards.NewElementWizard#finishPage(org.eclipse.core.runtime.IProgressMonitor)
         */
        protected void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException {
-//             fPage.createType(monitor); // use the full progress monitor
-//             ICompilationUnit cu= JavaModelUtil.toOriginal(fPage.getCreatedType().getCompilationUnit());
-//             if (cu != null) {
-//                     IResource resource= cu.getResource();
-//                     selectAndReveal(resource);
-//                     openResource((IFile) resource);
-//             }       
+               fPage.createType(monitor); // use the full progress monitor
+               ICompilationUnit cu= JavaModelUtil.toOriginal(fPage.getCreatedType().getCompilationUnit());
+               if (cu != null) {
+                       IResource resource= cu.getResource();
+                       selectAndReveal(resource);
+                       openResource((IFile) resource);
+               }       
        }
        
        /* (non-Javadoc)