Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to remove toolbar when Console view is firstly created.
How to remove toolbar when Console view is firstly created. [message #546763] Wed, 14 July 2010 06:55
Jeffery Yuan is currently offline Jeffery YuanFriend
Messages: 27
Registered: July 2009
Junior Member
Hi, all:

I would like to customize the Console view for our RCP application, to remove all unneeded toolbars.

In thread, sg13554.html
It suggests to create an extension for "org.eclipse.ui.console.consolePageParticipants". add an enablement for "org.eclipse.ui.console.IConsole".

It works, it can remove toolbar from the created console.

But one problem is that, when Console view is first created, the toolbars are not
removed, it still shows toolbar, like: "New Console View", and especially I don't want to expose this toolbar to user.

I checked the org.eclipse.ui.internal.console.ConsoleView code, in method protected PageRec doCreatePage(IWorkbenchPart dummyPart), it will get all IConsolePageParticipant, and apply them.
But in protected IPage createDefaultPage(PageBook book), it doesn't do same thing, it doesn't get all IConsolePageParticipant, and apply them.
Does Eclipse RCP team do this on purpose or not?

Then I tried to add the following code to ApplicationWorkbenchWindowAdvisor, but it also doesn't work.
public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
	public void postWindowCreate() {
		IWorkbenchPage workbenchPage = PlatformUI.getWorkbench()
		IViewPart viewPart = workbenchPage
		IViewSite viewSite = viewPart.getViewSite();
		IActionBars actionBars = viewSite.getActionBars();
		IToolBarManager toolBarManager = actionBars.getToolBarManager();

Anybody knows how to remove toolbar from the page when Console view is firstly created?
Many thanks for any help or suggestions in advance: )
Previous Topic:How to prompt a custom dialog when close editor and application
Next Topic:[CNF] FilteredTree support ?
Goto Forum:

Current Time: Fri Dec 09 04:00:16 GMT 2022

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

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

Back to the top