Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Toolbar in Editor
Toolbar in Editor [message #245625] Wed, 26 May 2004 10:28 Go to next message
Eclipse UserFriend
hi,
I have problems contributing Toolbars to by own Editor. I try to add them
by calling:

myEditor.getEditorSite().getActionBars().getToolBarManager() .add(myAction);

I get the follwing exception:
java.lang.IllegalArgumentException: Group not found: group.editor
at
org.eclipse.jface.action.ContributionManager.addToGroup(Cont ributionManager.java:122)
at
org.eclipse.jface.action.ContributionManager.prependToGroup( ContributionManager.java:365)
at
org.eclipse.ui.internal.EditorActionBars.getToolBarManager(E ditorActionBars.java:254)
...

what am I doing wrong?
Re: Toolbar in Editor [message #246084 is a reply to message #245625] Thu, 27 May 2004 04:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: martin.kadlec.oseg.de

the EditorActionBars uses a constant from eclipse, but I don't know how to
register that group or even where to register.

Does anyone have more information about editors and toolbars? Does an
editor have a Toolbar, actually?
Re: Toolbar in Editor [message #246154 is a reply to message #246084] Thu, 27 May 2004 07:32 Go to previous messageGo to next message
Eclipse UserFriend
look at bug <a
href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=49494'>#49494</a>
and vote for it.
Re: Toolbar in Editor [message #246752 is a reply to message #246084] Fri, 28 May 2004 05:35 Go to previous message
Eclipse UserFriend
thanks to Olivier Crameri.

Actually you have to manually add the group marker for group.editor in
order for the toolbar items to work. Note that this is only necessary if
you are building a plugin that is intended to run in RCP mode.

You can do this via by inserting the following lines in your ActionBuilder:

ICoolBarManager cbManager = configurer.getCoolBarManager();
cbManager.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR));

Besides, bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=49494 was
resolved, so it will happen automatically.
Previous Topic:[2.1.3] Possible bug in plug-in deployment
Next Topic:Alternate api for adding fixedviews???
Goto Forum:
  


Current Time: Sat May 31 05:27:52 EDT 2025

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

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

Back to the top