How to remove the default diagram toolbar and actions? [message #185636] |
Tue, 06 May 2008 13:53 |
Eclipse User |
|
|
|
Originally posted by: cmarbur.iti.upv.es
Hi all.
Hi have build a diagram application in wich an
DiagramActionBarContributor class has been generated wich seems to
implement actions contributor to the GUI.
My problem is that I wish to disable the main diagram actions and leave
only the zoom action but I don't know how to do it. I have impemented a
contributionItemProvider extension to add it but I can't disable the
main diagram toolbar and menus.
Could you point me in the right direction?
Thanks in advance.
|
|
|
Re: How to remove the default diagram toolbar and actions? [message #207547 is a reply to message #185636] |
Tue, 30 September 2008 15:44 |
Eclipse User |
|
|
|
Originally posted by: uwe.suedbeck.koeln.de
Did you find a solution for this? I need exactly the same.
If this helps you, you can also try to remove these Items from the
toolbar. For this you have to override the init()-Method within your
Contributor and remove the Tools you want.
@Override
public void init(IActionBars pBars) {
super.init(pBars);
IToolBarManager toolBarManager = pBars.getToolBarManager();
IContributionItem[] items = toolBarManager.getItems();
for (IContributionItem contributionItem : items) {
if (excludeList.contains(contributionItem.getId())) {
contributionItem.setVisible(false);
toolBarManager.remove(contributionItem);
}
}
}
Carlos Martínez Burgos schrieb:
> Hi all.
>
> Hi have build a diagram application in wich an
> DiagramActionBarContributor class has been generated wich seems to
> implement actions contributor to the GUI.
>
> My problem is that I wish to disable the main diagram actions and leave
> only the zoom action but I don't know how to do it. I have impemented a
> contributionItemProvider extension to add it but I can't disable the
> main diagram toolbar and menus.
>
> Could you point me in the right direction?
>
> Thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.03586 seconds