initial quantum version
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / resourcesview / ResourceAdapterFactory.java
index 1cc64d2..4a5799c 100644 (file)
@@ -1,17 +1,15 @@
 package net.sourceforge.phpeclipse.resourcesview;
 
+import net.sourceforge.phpdt.core.JavaCore;
+import net.sourceforge.phpdt.internal.core.JavaProject;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IAdapterFactory;
 
-import net.sourceforge.phpeclipse.PHPCore;
-import net.sourceforge.phpeclipse.resourcesview.PHPElement;
-import net.sourceforge.phpeclipse.resourcesview.PHPFile;
-import net.sourceforge.phpeclipse.resourcesview.PHPProject;
-
 public class ResourceAdapterFactory implements IAdapterFactory {
 
-       protected static Class[] ADAPTERS_I_CREATE = new Class[] { PHPElement.class, PHPFile.class, PHPProject.class };
+       protected static Class[] ADAPTERS_I_CREATE = new Class[] { PHPElement.class, PHPFile.class, JavaProject.class };
 
        public ResourceAdapterFactory() {
                super();
@@ -19,17 +17,17 @@ public class ResourceAdapterFactory implements IAdapterFactory {
 
        public Object getAdapter(Object adaptableObject, Class adapterType) {
                if (PHPFile.class.equals(adapterType))
-                       return PHPCore.create((IFile) adaptableObject);
+                       return JavaCore.create((IFile) adaptableObject);
 
-               if (PHPProject.class.equals(adapterType))
-                       return PHPCore.create((IProject) adaptableObject);
+               if (JavaProject.class.equals(adapterType))
+                       return JavaCore.create((IProject) adaptableObject);
 
                if (PHPElement.class.equals(adapterType)) {
                        if (adaptableObject instanceof IFile)
-                               return PHPCore.create((IFile) adaptableObject);
+                               return JavaCore.create((IFile) adaptableObject);
 
                        if (adaptableObject instanceof IProject)
-                               return PHPCore.create((IProject) adaptableObject);
+                               return JavaCore.create((IProject) adaptableObject);
                }
 
                return null;