Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Re: Platform doesn't load adapters in inactive bundles
Re: Platform doesn't load adapters in inactive bundles [message #468351] Wed, 05 August 2009 08:13
Sascha Zak is currently offline Sascha ZakFriend
Messages: 11
Registered: July 2009
Junior Member
Robert Wilson wrote:
> Thanks - that seems to work.
>
> Less neat than adaptable.getAdapter(), but I suppose we have to make do..
>

As I understood, you have a custom IAdaptable implementation, so you
have to implement the adaptable.getAdapter(Class) method yourself, right?

This is what I did:

public Object getAdapter(Class adapterClass) {
if (adapterClass == null) {
return null;
}
IAdapterManager adapterManager = Platform.getAdapterManager();
if (adapterManager == null) {
return null;
}
// first try to get it the 'default way'
Object adapter = adapterManager.getAdapter(this, adapterClass);
if (adapter != null) {
return adapter;
}
// otherwise try by loading with bundle activation
return adapterManager.loadAdapter(this, adapterClass.getName());
}

This works fine and I always use adaptable.getAdapter()...
Previous Topic:Re: Problem with SAXBuilder
Next Topic:Different CellEditor per Row
Goto Forum:
  


Current Time: Thu Apr 18 09:29:54 GMT 2024

Powered by FUDForum. Page generated in 0.02433 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top