|Ribbon-like menu/toolbar in E4 RCP application - guidance needed [message #1802187]
||Sun, 03 February 2019 13:51
| Daniel Matheis
Registered: February 2019
In good ol e3.x RCP times we created a Ribbon-like toolbar implementation which arranges toolbar items (commands as push buttons) in a CTabFolder with separators etc. to group such items nicely. Internally we used WorkbenchWindowAdvisor#createWindowContents, AbstractContributionFactory, Command Contribution Items etc. to make such toolbar like enablement and disablement for the buttons according to Handler active/enabled state. (This is clearly not functional anymore with e4.)
An own extension point was defined for the grouping, button size etc. meta data. Thus, the content of the toolbar was configurable by different plugins defining such extensions and was filled/built during application "initialization time" - so it was not hard coded.
Now, I am curious how to implement this kind of Ribbon-like toolbar / menu with e4 means.
To get a grasp of the new concepts i have done some resarch and trials with e4 RCP examples. I have studied some tutorials / comments etc. of Tom Schindl and have read the e4 RCP book by Lars Vogel. Now I am at a point where I would like to get some guidance from the others how to achieve my goal. I understood that e4 is very flexible and nicely extensible if you know where and how! :)
If Tom is reading this it might be nice to make his old source code example available again - or just point me to it - which he mentioned in the forum /mailing list some years ago: svn.tomsondev.com/svn/ufacekit/desktop/org.ufacekit.ui.e4.renderer/src/org/ufacekit/ui/e4/renderer/
(this is not available anymore)
Also he has shown something similar in his blog post:
How was this achieved, Tom?
So what I think could be a plan - please correct me - mainly it is inspired by [u]www.vogella.com/tutorials/Eclipse4ExtendModel/article.htm [/u]:
- extend e4 application EMF model to add ribbons, groups and size for toolbar items model
- implement own renderer & renderer factory to consume such model and to build and layout the stuff correctly
questions to this plan:
a) is it right to extend classes with discourage access warning? The examples i have found all extend renderer classes from org.eclipse.e4.ui.workbench.renderers.swt. Are those examples deprecated?
b) even if it might be the right plan, how does it look actually in more details, where should i start, which classes to extend etc.
Thanks in advance for any comments!
really noone with a best practice?
[Updated on: Mon, 14 October 2019 08:46]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01579 seconds