Core expression, adapt to inner class [message #335871] |
Thu, 07 May 2009 10:24  |
Eclipse User |
|
|
|
Hey,
I'm trying to use the <adapt> element in a core expression, where the
target type is an inner class. So that looks like:
<activeWhen>
<and>
<count
value="1">
</count>
<iterate>
<adapt type="com.example.Outer.Inner">
</adapt>
</iterate>
</and>
</activeWhen>
That doesn't work. I also tried type="com.example.Outer$Inner", doesn't
work either.
Using type="java.lang.Object" and then adapting programatically inside
the handler's execute method works fine for test selections, so I'm sure
I have some objects for which the handler should be active..
Hope that someone can help.
Felix
|
|
|
Re: Core expression, adapt to inner class [message #335872 is a reply to message #335871] |
Thu, 07 May 2009 10:44   |
Eclipse User |
|
|
|
Hm it must be some other problem. I extracted the inner class to be a
toplevel type and the handler remains inactive. I just read that the
expression returns not loaded if
"either the adapter* or the type referenced isn't loaded yet"
This is what probably happens in my case.
*) But I don't understand to which "adapter" the above phrase refers to.
Thanks for help,
Felix
|
|
|
|
Re: Core expression, adapt to inner class [message #335883 is a reply to message #335877] |
Thu, 07 May 2009 13:55   |
Eclipse User |
|
|
|
Paul Webster wrote:
> <adapt .../> does not use the IAdapter#getAdapter(*) interface. It only
> uses org.eclipse.core.runtime.adapters and IAdapterManager#getAdapter(*)
> Do you provide an adapter factory for the adapter manager?
No... *crying*. Thanks so much for telling me this :-)
Any reasons why the IAdapter interface itself isn't considered?
I might have been able to nail the problem down with a proper debug
entry point for the evaluation of such core expressions. Any Tip?
Thanks again,
Felix
|
|
|
|
Powered by
FUDForum. Page generated in 0.03152 seconds