# DeveloperAdapterFactory Class After Editing

    package samples.model;

    import org.eclipse.core.runtime.IAdapterFactory;
    import org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory;
    import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
    import org.eclipse.ui.views.properties.IPropertySource;

    /**
     * This factory maps requests for an adapter object from a given remote object.
     */
    public class DeveloperAdapterFactory
    	extends AbstractSystemRemoteAdapterFactory
    	implements IAdapterFactory
    {
    	private TeamResourceAdapter teamAdapter = new TeamResourceAdapter();
    	private DeveloperResourceAdapter developerAdapter = new DeveloperResourceAdapter();

    	/**
    	 * Constructor for DeveloperAdapterFactory.
    	 */
    	public DeveloperAdapterFactory()
    	{
    		super();
    	}

    	/**
    	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(Object, Class)
    	 */
    	public Object getAdapter(Object adaptableObject, Class adapterType)
    	{
    		ISystemViewElementAdapter adapter = null;
    		if (adaptableObject instanceof TeamResource)
    		  adapter = teamAdapter;
    		else if (adaptableObject instanceof DeveloperResource)
    		  adapter = developerAdapter;
    		// these lines are very important!
    		if ((adapter != null) && (adapterType == IPropertySource.class))
    		  adapter.setPropertySourceInput(adaptableObject);
    		return adapter;
    	}
    }