View Javadoc

1   /*
2    * This file is a part of CAST project.
3    * (c) Copyright 2007, AGH University of Science & Technology
4    * https://caribou.iisg.agh.edu.pl/trac/cast
5    *
6    * Licensed under the Eclipse Public License, Version 1.0 (the "License").
7    * You may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    * http://www.eclipse.org/legal/epl-v10.html
10   */
11  /*
12   * File: AboutAction.java
13   * Created: 2007-00-00
14   * Author: awos
15   * $Id: AboutAction.java 2300 2009-01-12 17:24:04Z tmilos $
16   */
17  
18  package pl.edu.agh.cast.action;
19  
20  import org.eclipse.jface.action.IAction;
21  import org.eclipse.jface.viewers.ISelection;
22  import org.eclipse.ui.IWorkbenchWindow;
23  import org.eclipse.ui.IWorkbenchWindowActionDelegate;
24  import org.eclipse.ui.actions.ActionFactory;
25  
26  /**
27   * Action for displaying th <em>About</em> dialog.
28   *
29   * @author AGH CAST Team
30   */
31  public class AboutAction implements IWorkbenchWindowActionDelegate {
32  
33  	private IAction aboutAction;
34  
35  	/**
36  	 * {@inheritDoc}
37  	 *
38  	 * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
39  	 */
40  	public void dispose() {
41  	}
42  
43  	/**
44  	 * {@inheritDoc}
45  	 *
46  	 * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
47  	 */
48  	public void init(IWorkbenchWindow window) {
49  		this.aboutAction = ActionFactory.ABOUT.create(window);
50  	}
51  
52  	/**
53  	 * {@inheritDoc}
54  	 *
55  	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
56  	 */
57  	public void run(IAction action) {
58  		aboutAction.run();
59  	}
60  
61  	/**
62  	 * {@inheritDoc}
63  	 *
64  	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
65  	 *      org.eclipse.jface.viewers.ISelection)
66  	 */
67  	public void selectionChanged(IAction action, ISelection selection) {
68  	}
69  
70  }