01: package com.salmonllc.ideTools.eclipse;
02:
03: import org.eclipse.jface.action.IAction;
04: import org.eclipse.jface.viewers.ISelection;
05: import org.eclipse.ui.IWorkbenchWindow;
06: import org.eclipse.ui.IWorkbenchWindowActionDelegate;
07:
08: /**
09: * @author Administrator
10: *
11: * To change this generated comment edit the template variable "typecomment":
12: * Window>Preferences>Java>Templates.
13: * To enable and disable the creation of type comments go to
14: * Window>Preferences>Java>Code Generation.
15: */
16: public class SiteMapAction implements IWorkbenchWindowActionDelegate {
17:
18: /**
19: * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
20: */
21: public void dispose() {
22: }
23:
24: /**
25: * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
26: */
27: public void init(IWorkbenchWindow window) {
28: }
29:
30: /**
31: * @see org.eclipse.ui.IActionDelegate#run(IAction)
32: */
33: public void run(IAction action) {
34: try {
35: String docRoot = SalmonPlugin.getDefaultJSPDirectory();
36: if (docRoot != null) {
37: String progArgs[] = new String[] { "-SITEMAP",
38: "-DOCUMENTROOT", docRoot, "-DONTAPPENDPROJECT" };
39: SalmonPlugin.runIDETool(progArgs, true);
40: } else {
41: String progArgs[] = new String[] { "-SITEMAP",
42: "-DONTAPPENDPROJECT" };
43: SalmonPlugin.runIDETool(progArgs, true);
44: }
45:
46: } catch (Exception e) {
47: e.printStackTrace();
48: }
49: }
50:
51: public void selectionChanged(IAction action, ISelection selection) {
52:
53: }
54:
55: }
|