Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Toolbar Contributions in a pure e4 app
Toolbar Contributions in a pure e4 app [message #1731889] Tue, 10 May 2016 16:41 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
I'm having difficulties with toolbar contributions in a pure e4 application. Some of my toolbar content is defined in the application model. Some additions are contributed through model fragments in the form of TrimContribution elements.

The problem comes with new windows: Whenever I cone a window, it already contains the elements of the original application model and also those that have been contributed through TrimContributions. But then, the TrimContributions are being applied again to the new window resulting in duplicated items.

I have thought about removing everything from the new window's trimbars that was contributed through TrimContributions. But it is not clear how to see whether an item is contributed or not.

Also it is not clear for me whether a pure e4 application should use TrimContributions (and their siblings) at all. Is it better to contribute through direct model extensions than to use TrimContributions? Is it only a feature to allow the compatibility layer to work?

Thanks for clarifications
Peter
Re: Toolbar Contributions in a pure e4 app [message #1731925 is a reply to message #1731889] Wed, 11 May 2016 06:31 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 836
Registered: July 2009
Senior Member
I have not tried, but, maybe, using snippets would help here? I.e. provide the window model as a snippet within the application and reference it once in the application itself and use it to open a new window (with the snippet as template).

Peter Kullmann wrote on Tue, 10 May 2016 18:41
I'm having difficulties with toolbar contributions in a pure e4 application. Some of my toolbar content is defined in the application model. Some additions are contributed through model fragments in the form of TrimContribution elements.

The problem comes with new windows: Whenever I cone a window, it already contains the elements of the original application model and also those that have been contributed through TrimContributions. But then, the TrimContributions are being applied again to the new window resulting in duplicated items.

I have thought about removing everything from the new window's trimbars that was contributed through TrimContributions. But it is not clear how to see whether an item is contributed or not.

Also it is not clear for me whether a pure e4 application should use TrimContributions (and their siblings) at all. Is it better to contribute through direct model extensions than to use TrimContributions? Is it only a feature to allow the compatibility layer to work?

Thanks for clarifications
Peter

Previous Topic:Checking if a part inside of a PartStack was closed by pressing the close icon in the tab.
Next Topic:Import/Export Perspectives
Goto Forum:
  


Current Time: Mon Sep 25 18:58:49 GMT 2017

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

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