Skip to main content


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 14:22 Go to next message
Eclipse UserFriend
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 09:10 Go to previous messageGo to next message
Xiang Qinxian is currently offline Xiang QinxianFriend
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 07:53 Go to previous message
Erki Kriks is currently offline Erki KriksFriend
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: Fri Apr 26 05:22:14 GMT 2024

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

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

Back to the top