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 ContactTerracottaAction extends Action implements
16: IActionDelegate, IWorkbenchWindowActionDelegate {
17: public ContactTerracottaAction() {
18: super ();
19: }
20:
21: public void run(IAction action) {
22: String id = action.getId();
23: String url = null;
24:
25: if (id.equals("visitForumsAction")) {
26: url = "http://www.terracottatech.com/forums/";
27: } else if (id.equals("contactSupportAction")) {
28: url = "http://www.terracottatech.com/support_services.shtml";
29: } else if (id.equals("contactFieldAction")) {
30: url = "http://www.terracottatech.com/contact/field/";
31: } else if (id.equals("contactSalesAction")) {
32: url = "http://www.terracottatech.com/contact/";
33: }
34:
35: if (url != null) {
36: BrowserLauncher.openURL(url);
37: }
38: }
39:
40: public void selectionChanged(IAction action, ISelection selection) {/**/
41: }
42:
43: public void dispose() {/**/
44: }
45:
46: public void init(IWorkbenchWindow window) {/**/
47: }
48: }
|