Adapter mechanism [message #467250] |
Wed, 02 May 2007 06:21 |
Eclipse User |
|
|
|
Originally posted by: qsi.nerotech.ch
Hello everyone.
I got a little problem here. I'm using the rcp Adapter-Mechanism to view objects of the model in the views. Now I have two viewers they show the same type of model object but should have different labels-etc.
On my viewer I set WorkbenchTreeTableLabelProvider as LabelProvider. This provider gets the right WorkbenchAdapter for every type of ModelObject I previously registered a Adapter for. This happens with the Line: Platform.getAdapterManager().registerAdapters(myFactory,adap table.class);
Everything well till now: I want to register a different factory in a different viewer for the same Adaptable class. Like this:
Platform.getAdapterManager().registerAdapters(myFactory2,ada ptable.class);
Since the Adapters are registered on the platform, my second viewer still adapts the ModelOpjects with the old adapter.
So my question is how can I let the viewer use the new adapter?
Thanks a lot for your help and information. I'm sure you can help me ;)
Markus
|
|
|
|
Re: Adapter mechanism [message #467275 is a reply to message #467256] |
Wed, 02 May 2007 09:59 |
Eclipse User |
|
|
|
Originally posted by: qsi.nerotech.ch
O thanks for your hint. I think I was just a little bit too fixed on the adapters ;). So I write my own provider and everything should be alright... Thanks anyway. Sometimes it's hard to follow the concepts of RCP...
|
|
|
Powered by
FUDForum. Page generated in 5.04127 seconds