Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Can't find contributed HandledToolItem in MApplication(A HandledToolItem contributed to a ToolBar Contribution element in the main app isn't found in the Application by find)
Can't find contributed HandledToolItem in MApplication [message #1219053] Sat, 30 November 2013 12:53 Go to next message
Ozgur Cagdas is currently offline Ozgur CagdasFriend
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 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
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.
>
Re: Can't find contributed HandledToolItem in MApplication [message #1219857 is a reply to message #1219162] Fri, 06 December 2013 10:00 Go to previous message
Eclipse UserFriend
https://bugs.eclipse.org/bugs/show_bug.cgi?id=383403
Previous Topic:Opening dialog from E4 command/handler
Next Topic:Exporting Feature-based Product
Goto Forum:
  


Current Time: Tue Mar 19 03:44:24 GMT 2024

Powered by FUDForum. Page generated in 0.01879 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top