1 package net.sourceforge.phpeclipse.resourcesview;
3 import org.eclipse.core.resources.IResource;
4 import org.eclipse.core.runtime.IAdapterFactory;
6 public class PHPElementAdapterFactory implements IAdapterFactory {
8 protected static Class[] ADAPTERS_I_CREATE = new Class[] {
12 public PHPElementAdapterFactory() {
16 public Object getAdapter(Object adaptableObject, Class adapterType) {
17 PHPElement phpElement = (PHPElement) adaptableObject;
19 if (IResource.class.equals(adapterType))
20 return getResource(phpElement);
25 public Class[] getAdapterList() {
26 return ADAPTERS_I_CREATE;
29 protected IResource getResource(PHPElement phpElement) {
30 return phpElement.getUnderlyingResource();