|
|
|
Re: How to test whether the active editor part is adaptable to something [message #758917 is a reply to message #758867] |
Fri, 25 November 2011 09:19 |
Jan Krakora Messages: 477 Registered: December 2009 Location: Prague |
Senior Member |
|
|
I have read the Extension Point Description but still I'm not able to achieve this. What is the exact use of those two elements? I have tried:
<visibleWhen checkEnabled="false">
<with variable="activeEditor">
<adapt type="cz.example.MyObjectINeedAdaptTo">
<instanceof value="cz.example.MyObjectINeedAdaptTo">
</instanceof>
</adapt>
</with>
</visibleWhen>
But it doesn't work.
I my editorpart I have
@Override
public Object getAdapter(Class adapter) {
if (adapter == MyObjectINeedAdaptTo.class) {
return new MyObjectINeedAdaptTo();
}
return super.getAdapter(adapter);
}
But the code inside if statement isn't called at all.
[Updated on: Fri, 25 November 2011 09:51] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03256 seconds