[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.dsdp.ercp] Re: Is it posssible to catch eWorkbench CLOSE event?

The exit command is created this way in the default view:

exitCommand = new Command(parent.getShell(), Command.EXIT, 0);
exitCommand.setText(Messages.getString("DefaultView.1")); //$NON-NLS-1$
exitCommand.addSelectionListener(this);

I don't know how to get a reference of this command or the menu containing the
item. getMenu() and getMenuBar() (of Shell) both return null.

The best way in my opinion is to use your own workbench where you can add your
own commands and handle them like you want to.

On 23.05.2009 14:48, Arunagiri.K wrote:
Dear All,
Is it possible to catch the workbench's close event (Exit menu item's event on the workbench menu)? If yes, how?


Thanks.

-arun