KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > about > AboutHandler


1 /*******************************************************************************
2  * Copyright (c) 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  ******************************************************************************/

11 package org.eclipse.ui.internal.about;
12
13 import org.eclipse.core.commands.AbstractHandler;
14 import org.eclipse.core.commands.ExecutionEvent;
15 import org.eclipse.core.commands.ExecutionException;
16 import org.eclipse.ui.IWorkbenchWindow;
17 import org.eclipse.ui.handlers.HandlerUtil;
18 import org.eclipse.ui.internal.dialogs.AboutDialog;
19
20 /**
21  * Creates an About dialog and opens it.
22  *
23  * @since 3.3
24  */

25 public class AboutHandler extends AbstractHandler {
26
27     /*
28      * (non-Javadoc)
29      *
30      * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
31      */

32     public Object JavaDoc execute(ExecutionEvent event) throws ExecutionException {
33         IWorkbenchWindow window = HandlerUtil
34                 .getActiveWorkbenchWindowChecked(event);
35         new AboutDialog(window.getShell()).open();
36         return null;
37     }
38 }
39
Popular Tags