Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Lock Toolbar Option for RCP-Tool
Lock Toolbar Option for RCP-Tool [message #309006] Fri, 13 October 2006 10:22 Go to next message
Eclipse User
Originally posted by: baule.upb.de

Hello, we are creating a Tool with Eclipse and have one final problem with
out program layout. We do not have the option lock toolbar in our RCP. How
can i add this function to the tool?

public void fillCoolBar(ICoolBarManager coolBar) {
super.fillCoolBar(coolBar);
IToolBarManager toolBar = new ToolBarManager();
toolBar.add(saveAction);
toolBar.add(saveAsAction);
coolBar.add(toolBar);
coolBar.setLockLayout(true);
}

This does not do the trick. Could anyone please help. We are running out
of time. Our deadline is this weekend.
Re: Lock Toolbar Option for RCP-Tool [message #309093 is a reply to message #309006] Mon, 16 October 2006 05:10 Go to previous messageGo to next message
Xiang Qinxian is currently offline Xiang Qinxian
Messages: 119
Registered: July 2009
Senior Member
在 2006-10-13五的 14:22 +0000,Daniel Baule写道:
> Hello, we are creating a Tool with Eclipse and have one final problem with
> out program layout. We do not have the option lock toolbar in our RCP. How
> can i add this function to the tool?
>
> public void fillCoolBar(ICoolBarManager coolBar) {
> super.fillCoolBar(coolBar);
> IToolBarManager toolBar = new ToolBarManager();
> toolBar.add(saveAction);
> toolBar.add(saveAsAction);
> coolBar.add(toolBar);
> coolBar.setLockLayout(true);
> }
>
> This does not do the trick. Could anyone please help. We are running out
> of time. Our deadline is this weekend.
>
Hi,
in org.eclipse.ui.internal.ide.WorkbenchActionBuilder class you can find
lockToolBarAction, get it. Hooooope it not too late.

Regards,

QinXian.
Re: Lock Toolbar Option for RCP-Tool [message #896359 is a reply to message #309093] Wed, 18 July 2012 03:53 Go to previous message
Erki Kriks is currently offline Erki Kriks
Messages: 1
Registered: July 2012
Junior Member
To lock toolbars, just add one row to class ApplicationWorkbenchWindowAdvisor,
method preWindowOpen():

PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.LOCK_TRIM, "true");
Previous Topic:Disable Multiselection option is not available
Next Topic:Disable curved corners in Juno [solved]
Goto Forum:
  


Current Time: Sat Aug 23 09:29:08 EDT 2014

Powered by FUDForum. Page generated in 0.01600 seconds