How to get access to MPart toolbar elements? [message #1401321] |
Tue, 15 July 2014 12:54 |
Natalie Mogilka Messages: 27 Registered: August 2010 Location: Kazakhstan, Almaty |
Junior Member |
|
|
All HandledToolItems of my part are added into Toolbar statically via an application model. Not all of them is push, some are check. During usage the program, the user can check or uncheck tool buttons, and MPart contents should be changed in view of the status of all check buttons.
Earlier in Eclipse 3.* I used this code:
for (MToolBarElement item : activePart.getToolbar().getChildren()) {
HandledToolItemImpl hti = (HandledToolItemImpl)item;
if (hti.isSelected())
switch (hti.getElementId()) {
case "harmonic": ...
In Eclipse 4 it does not work:
Access restriction: The method 'MElementContainer <MToolBarElement>. GetChildren ()' is not API (restriction on required library '/ home/nataly/soft/eclipsercp/plugins/org.eclipse.e4.ui.model.workbench_1.1.0.v20140512 -1820.jar ')
Please suggest how should I access the toolbar elements to check their status?
[Updated on: Tue, 15 July 2014 12:55] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04516 seconds