Can't find contributed HandledToolItem in MApplication [message #1219053] |
Sat, 30 November 2013 12:53 |
Ozgur Cagdas Messages: 32 Registered: May 2013 |
Member |
|
|
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 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.
[Updated on: Sat, 30 November 2013 12:58] Report message to a moderator
|
|
|
Re: Can't find contributed HandledToolItem in MApplication [message #1219162 is a reply to message #1219053] |
Mon, 02 December 2013 12:51 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Unfortunately teh EModelService does not search through all parts of the
model!
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.
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03533 seconds