Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Perspective specific menu
Perspective specific menu [message #453934] Thu, 14 April 2005 09:11
Eclipse UserFriend
Originally posted by: pankajsanghi.hotmail.com

hello everybody,

I have created a eclipse plugin with its own perspective. My requirement
says that when the perspective is activated then the default menu bar of
eclipse should be overwritten by my own menubar. I implemented this
feature by setting SWT menubar to shell in my plugin class as shown below

window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
shell = window.getShell();
Menu menu = new Menu(shell, SWT.BAR);
shell.setMenuBar(menu);

Now the problem is that once i open my perspective in eclipse then my menu
bar appears but it does not go even if the perspective is switched back to
some other perspective of eclipse as Java or plugin development.

How can I ensure that my customised menu bar comes only if my perspective
is opened and goes as soon as some other perspective is opened. To my
undesrtanding, we can only contribute some more actions for our
perspective using action sets but can not completely overwrite the default
menu bar. Pls tell me if I am wrong in drawing this inference.

Looking forward to an early reply

Pankaj Sanghi
Previous Topic:How to Change color content of an image
Next Topic:Double click to set breakpoint doesn't work ???
Goto Forum:
  


Current Time: Sat Feb 27 10:56:44 GMT 2021

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

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

Back to the top