01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.ui.internal.about;
11:
12: import org.eclipse.core.commands.AbstractHandler;
13: import org.eclipse.core.commands.ExecutionEvent;
14: import org.eclipse.core.commands.ExecutionException;
15: import org.eclipse.ui.IWorkbenchWindow;
16: import org.eclipse.ui.handlers.HandlerUtil;
17: import org.eclipse.ui.internal.dialogs.AboutDialog;
18:
19: /**
20: * Creates an About dialog and opens it.
21: *
22: * @since 3.3
23: */
24: public class AboutHandler extends AbstractHandler {
25:
26: /*
27: * (non-Javadoc)
28: *
29: * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
30: */
31: public Object execute(ExecutionEvent event)
32: throws ExecutionException {
33: IWorkbenchWindow window = HandlerUtil
34: .getActiveWorkbenchWindowChecked(event);
35: new AboutDialog(window.getShell()).open();
36: return null;
37: }
38: }
|