Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Add Save Action into Editor Toolbar
Add Save Action into Editor Toolbar [message #632809] Thu, 14 October 2010 06:47 Go to next message
Sebastian  is currently offline Sebastian
Messages: 22
Registered: September 2010
Junior Member
Hey guys, I am trying to add the save action into my editors toolbar but for some reason it won't show up.

Here is what I did.

1. Create the editor.

2. Add a 'menus' extension

3. add a menu contributuion with target = toolbar.editorID

4. add the save command (id=org.eclipse.ui.file.save)


What's wrong with that.
Re: Add Save Action into Editor Toolbar [message #632852 is a reply to message #632809] Thu, 14 October 2010 09:41 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Sebastian wrote:
> Hey guys, I am trying to add the save action into my editors toolbar but
> for some reason it won't show up.
>
> Here is what I did.
>
> 1. Create the editor.
>
> 2. Add a 'menus' extension
> 3. add a menu contributuion with target = toolbar.editorID

Please post the exact locationURI you are using.


PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Add Save Action into Editor Toolbar [message #632854 is a reply to message #632809] Thu, 14 October 2010 09:46 Go to previous messageGo to next message
Sebastian  is currently offline Sebastian
Messages: 22
Registered: September 2010
Junior Member
toolbar:de.c1wps.geneal.hpa.oa.tool.ActivityEditor

de.c1wps.geneal.hpa.oa.tool.ActivityEditor is the ID of the editor.
Re: Add Save Action into Editor Toolbar [message #632972 is a reply to message #632854] Thu, 14 October 2010 16:28 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Sebastian wrote:
> toolbar:de.c1wps.geneal.hpa.oa.tool.ActivityEditor

I don't think editor toolbars are supported, not unless you can create
them through a menuContribution first (before the editor action bar
contributor does).

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Add Save Action into Editor Toolbar [message #632984 is a reply to message #632809] Thu, 14 October 2010 17:29 Go to previous messageGo to next message
Sebastian  is currently offline Sebastian
Messages: 22
Registered: September 2010
Junior Member
Ok, how exactly do i do that ?
Re: Add Save Action into Editor Toolbar [message #633173 is a reply to message #632984] Fri, 15 October 2010 10:37 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

a menuContribution to toolbar:org.eclipse.ui.main.toolbar (figure out
the correct location for before or after) and include a toolbar element
with the ID you want.

That's the only thing I can think of that *might* work. But how
EditorActionBars contribute their editor toolbar to the main coolbar
involves use of SubContributionManager type wrappers.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Info how display property in property view
Next Topic:Localizing Splash Screen on AIX
Goto Forum:
  


Current Time: Wed Aug 27 15:11:47 EDT 2014

Powered by FUDForum. Page generated in 0.03909 seconds