Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




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;

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

	 * @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))
		return adapter;

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire