Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCan't find contributed HandledToolItem in MApplication
https://www.eclipse.org/forums/index.php/mv/msg/627861/1219053/#msg_1219053
I have a main e4 rcp application and a contributing fragment. The fragment is contributing an HandledTool Item to a ToolBar Contribution element in the main application. However, Emodelserviceinstance.find("com.contributed.element.id", application) returns 'null'.
When I observe the application object by debugger, I can see the contributed Item under the toolBarContributions -> data[0] -> children -> data but when I check the implementation of the recursive find function, it does not walk through any of the contributed item lists, so it's no surprise that 'find' returns 'null' in this case. Is this intentional or missing implementation?
The other point is, if I contribute the HandledTool Item directly to the ToolBar in the main application, 'find' does return the expected element however this breaks the Visible-When ability of the contributed item, so I cannot use this approach. Even if there is a way to make the Visible-When work in this scenario, I'd still like to know why the above search is not walking through contributed items.
There's a bug report open for that but I can't remember the id as of now.
Tom
On 30.11.13 13:53, Ozgur Cagdas wrote:
> Hi,
>
> I have a main e4 rcp application and a contributing fragment. The
> fragment is contributing an HandledTool Item to a ToolBar Contribution
> element in the main application. However,
> Emodelserviceinstance.find("com.contributed.element.id", application)
> returns 'null'.
>
> When I observe the application object by the debugger, I can see the
> contributed Item under the toolBarContributions -> data[0] -> children
> -> data but when I check the implementation of the recursive find
> function, it does not walk through any of the contributed item lists, so
> it's no surprise that 'find' returns 'null' in this case. Is this
> intentional or missing implementation?
>
> The other point is, if I contribute the HandledTool Item directly to the
> ToolBar in the main application, 'find' does return the expected element
> however this breaks the Visible-When ability of the contributed item, so
> I cannot use this approach. Even if there is a way to make the
> Visible-When work in this scenario, I'd still like to know why the above
> search is not walking through contributed items.
>
> Regards,
>
> Ozgur.
>]]>Thomas Schindl2013-12-02T12:51:21-00:00Re: Can't find contributed HandledToolItem in MApplication
https://www.eclipse.org/forums/index.php/mv/msg/627861/1219857/#msg_1219857
https://bugs.eclipse.org/bugs/show_bug.cgi?id=383403]]>2013-12-06T10:00:49-00:00