Toolbar Contributions in a pure e4 app [message #1731889] |
Tue, 10 May 2016 12:41  |
Eclipse User |
|
|
|
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 02:31  |
Eclipse User |
|
|
|
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:41I'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
|
|
|
Powered by
FUDForum. Page generated in 0.02971 seconds