Is there a way to override an existing adapterfactory / avoid it from adapting [message #553004] |
Mon, 16 August 2010 02:33 |
abalest lanclot Messages: 6 Registered: December 2009 |
Junior Member |
|
|
Hi there,
Currectly, I'm adding an commercial eclipse plugin(ClearCase from ibm rational, We rely on it for the project source management.) into our RCP product. However, after importing this plugin, I found it failed my property sheet page. When selecting an item in my graphical editor, the property sheet page says "Property Sheet is not available".
I checked the newly imported plugin's configuration file(plugin.xml) and found something which I think may lead to this problem.
There's an AdapterFacotry defined as follows,
<extension
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType=" org.eclipse.ui.part.EditorPart "
class="com.ibm.rational.XXX.adapterfactory">
<adapter
type="IPropertySheetPage">
</adapter>
</factory>
</extension>
I debuged and found that when selectionchanged event is happened while select an item on my graphical editor(an multi-page editor), it eventually entered into com.ibm.rational.XXX.adapterfactory, as this adapterfactory works for any type of " org.eclipse.ui.part.EditorPart ". As an graphical editor is typically an editorpart, it works everytime.
Then for adapter type "IPropertySheetPage", it builds its own PropertySheetPage instead of my propertypage. While with my model, of which it can not deal with, finally show the "Property sheet is not available".
I'm wondering if there's a method to override this adapterfactory. I've tried to add a new adapterfactory with a more specific adapter type, hoping to interpert com.ibm.rational.XXX.adapterfactory to take effect, but failed to see any effect.
If I just want to deactivated the adapter factroy or have it disabled when dealing with my own editor(a multipage editor), is there a way to do this?
If an adapter factroy has been defined to adapter a certain kind of class, is it possible to defined another adapter factroy to deal with the same class?
Or I just have to leave this ClearCase plugin from intergrating into our own product?
Can anyone give me some advice so that I could get my own PropertySheet function right?
Thanks for your nice help in advance .
|
|
|
|
Powered by
FUDForum. Page generated in 0.02842 seconds