Perspective specific menu [message #453934] |
Thu, 14 April 2005 09:11 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03115 seconds