01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package org.terracotta.dso.actions;
05:
06: import org.eclipse.jface.action.Action;
07: import org.eclipse.jface.action.IAction;
08: import org.eclipse.jface.viewers.ISelection;
09: import org.eclipse.ui.IActionDelegate;
10: import org.eclipse.ui.IWorkbenchWindow;
11: import org.eclipse.ui.IWorkbenchWindowActionDelegate;
12:
13: import com.tc.admin.common.BrowserLauncher;
14:
15: public class HelpAction extends Action implements IActionDelegate,
16: IWorkbenchWindowActionDelegate {
17: private String m_url;
18:
19: public HelpAction(String label, String url) {
20: super (label);
21: m_url = url;
22: }
23:
24: public void run(IAction action) {
25: run();
26: }
27:
28: public void run() {
29: if (m_url != null) {
30: BrowserLauncher.openURL(m_url);
31: }
32: }
33:
34: public void selectionChanged(IAction action, ISelection selection) {/**/
35: }
36:
37: public void dispose() {/**/
38: }
39:
40: public void init(IWorkbenchWindow window) {/**/
41: }
42: }
|