Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-vcm-dev] Using ICVSRemoteFile from custom plugin

Hi

I'm trying to do

 IResource resource = (IResource)selection.getFirstElement();
 ((IAdaptable)resource).getAdapter(ICVSRemoteFile.class)

in my own plugin to get to a ICVSRemoteFile for a local
resource.

But that doesn't work :( I've traced it down to the
fact that CVSAdapterFactory isn't registered as a
IAdapterFactory when my plugin runs even though the
plugin org.eclipse.team.cvs.ui is up and running.
(getAdapter() returns null above)

I guess that has something to do with the way Eclipse
uses its own classloader for every plugin. It's
probably not o.k. to do the following myself:

 CVSAdapterFactory factory = new CVSAdapterFactory();
 Platform.getAdapterManager().registerAdapters(factory, 
   ICVSRemoteFile.class);
 Platform.getAdapterManager().registerAdapters(factory, 
   ICVSRemoteFolder.class);
 Platform.getAdapterManager().registerAdapters(factory, 
   ICVSRepositoryLocation.class);
 
So is this an oversight or did I miss something? I think
it makes sense to try to use this plugin's features
from another plugin (no?)

Thanks for pointers here

Nils
 


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/


Back to the top