Open PHP perspective automatically then a new PHP Project is created
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ui / JavaUI.java
index 3120edf..6236042 100644 (file)
@@ -17,7 +17,6 @@ import net.sourceforge.phpdt.core.JavaModelException;
 import net.sourceforge.phpdt.core.JavaCore;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 import net.sourceforge.phpeclipse.phpeditor.EditorUtility;
-import net.sourceforge.phpeclipse.phpeditor.PHPDocumentProvider;
 
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.ISharedImages;
@@ -55,7 +54,7 @@ public final class JavaUI {
         * The id of the Java perspective
         * (value <code>"org.eclipse.jdt.ui.JavaPerspective"</code>).
         */     
-//     public static final String ID_PERSPECTIVE=              "org.eclipse.jdt.ui.JavaPerspective"; //$NON-NLS-1$
+ //    public static final String ID_PERSPECTIVE=              "org.eclipse.jdt.ui.JavaPerspective"; //$NON-NLS-1$
        
        /**
         * The id of the Java hierarchy perspective
@@ -149,7 +148,7 @@ public final class JavaUI {
         * @see org.eclipse.ui.IWorkbenchPage#findView(java.lang.String)
         * @see org.eclipse.ui.IWorkbenchPage#showView(java.lang.String)
         */ 
-//     public static final String ID_TYPE_HIERARCHY=           "org.eclipse.jdt.ui.TypeHierarchy"; //$NON-NLS-1$
+       public static final String ID_TYPE_HIERARCHY=           "net.sourceforge.phpdt.ui.TypeHierarchy"; //$NON-NLS-1$
 
        /**
         * The id of the Java Browsing Perspective
@@ -583,7 +582,7 @@ public final class JavaUI {
 //             }
 //             return (IWorkingCopy[])result.toArray(new IWorkingCopy[result.size()]);
 //     }
-       
+        
        /**
         * Returns the BufferFactory for the Java UI plug-in.
         *
@@ -591,14 +590,13 @@ public final class JavaUI {
         * 
         * @see org.eclipse.jdt.core.IBufferFactory
         * @since 2.0
+        * @deprecated {@link IBufferFactory} has been replaced by {@link org.eclipse.jdt.core.WorkingCopyOwner}.
+        * The Java UI plug-in uses the <i>primary working copy owner</i> that can be accessed with <code>null</code> in
+        * API's that require an owner
         */
        public static IBufferFactory getBufferFactory() {
-               PHPDocumentProvider provider= PHPeclipsePlugin.getDefault().getCompilationUnitDocumentProvider();
-               if (provider != null)
-                       return provider.getBufferFactory();
-               return null;
+               return PHPeclipsePlugin.getDefault().getBufferFactory();
        }
-
        /**
         * Returns the DocumentProvider used for Java compilation units.
         *