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();
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;