Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] Extend main toolbar

On 11.01.2017 21:26, Raphael Geissler wrote:
Hi *,

if I understood it correctly we cannot extend the main toolbar at the
moment by scripts.
I did some prototyping to check how this could be done.

The result is quite successful, I committed my prototype plug-in here:
https://github.com/rage5474/de.ragedev.example.dynamictoolbar/

Looks great already.

In this example the toolbar change is triggered by a menu item not by
a script registration, but it uses also an eventbus message, so it
should be somehow similar. After clicking the button a new icon is
shown in the main tool bar.

The important class is this one here:
https://github.com/rage5474/de.ragedev.example.dynamictoolbar/blob/master/src/de.ragedev.example.dynamictoolbar/src/de/ragedev/example/dynamictoolbar/dynamictoolbarhandler/DynamicToolbarItemHandler.java
You are modifying the e4 model directly. That's exact the way we should do it.

If you want we can integrate it in EASE.
Yes, please. I would love to replace the whole mechanism for toolbar and menu extensions by modifying the underlying e4 model. Currently scripts cannot contribute to pure e4 views. Its simply luck that most projects did not migrate so far, but this will become a problem in the future.

Do you think you can extend your main toolbar implementation to work for view toolbars & menus, too?

Christian


Back to the top