Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to remove the default diagram toolbar and actions?
How to remove the default diagram toolbar and actions? [message #185636] Tue, 06 May 2008 13:53 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:how to Enable/Disable EditorActions
Next Topic:Modify palette tool to copy existing resource
Goto Forum:
  


Current Time: Thu Sep 26 14:37:46 GMT 2024

Powered by FUDForum. Page generated in 0.03586 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top