Reputation: 39
I created one perspective in my plugin eclipse. I want hide the perspective bar and "Quick Access".
I tried to use this:
((WorkbenchWindow)PlatformUI.getWorkbench().getActiveWorkbenchWindow()).setPerspectiveBarVisible(false);
but doesn't work.
Any idea for this and for hide "Quick Access"?
Upvotes: 1
Views: 270
Reputation: 8100
For the perspective bar, in your org.eclipse.ui.application.WorkbenchWindowAdvisor
do the following:
@Override
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setShowPerspectiveBar(false);
}
As for the "Quick Access", Eclipse 3.x did not have this search field. You probably run an Eclipse 4.x using 3.x layout style (e.g. not e4).
You can try to remove it using CSS. In the plugin.xml where your org.eclipse.core.runtime.products
is declared add the following to the <product>
declaration:
<property
name="applicationCSS"
value="platform:/plugin/PLUGIN_NAME/css/default.css ">
</property>
And your CSS should contain:
#SearchField {
visibility:hidden;
}
Upvotes: 1