01: /*
02: * CSCheckAllBuffersAction.java
03: *
04: * Created on 01 October 2003, 22:09
05: */
06:
07: package org.acm.seguin.ide.netbeans;
08:
09: import javax.swing.*;
10: import org.openide.cookies.*;
11: import org.openide.util.HelpCtx;
12: import org.openide.util.NbBundle;
13: import org.openide.util.actions.*;
14:
15: import org.acm.seguin.ide.common.IDEPlugin;
16:
17: /**
18: * Check all the Java files in the selected directory.
19: *
20: *@author unknown
21: *@created October 18, 2001
22: */
23: public class CSCheckDirRecursiveAction extends CallableSystemAction {
24:
25: /**
26: * Gets the helpCtx attribute of the CSCheckDirRecursiveAction object
27: *
28: *@return The helpCtx value
29: */
30: public HelpCtx getHelpCtx() {
31: return HelpCtx.DEFAULT_HELP;
32: // (PENDING) context help
33: // return new HelpCtx (CSCheckDirRecursiveAction.class);
34: }
35:
36: /**
37: * Gets the menuPresenter attribute of the CSCheckDirRecursiveAction object
38: *
39: *@return The menuPresenter value
40: */
41: // public JMenuItem getMenuPresenter() {
42: // JMenuItem item = new JMenuItem(getName());
43: // item.addActionListener(this);
44: // return item;
45: // }
46:
47: /**
48: * Gets the name attribute of the CSCheckDirRecursiveAction object
49: *
50: *@return The name value
51: */
52: public String getName() {
53: return NbBundle.getMessage(CSCheckDirRecursiveAction.class,
54: "LBL_CSCheckDirRecursiveAction");
55: }
56:
57: /**
58: * Get the path to the icon to be displayed in menus, etc
59: *
60: *@return Icon to be displayed in menus, etc.
61: */
62: protected String iconResource() {
63: return "org/acm/seguin/ide/netbeans/CSCheckDirRecursiveActionIcon.gif";
64: }
65:
66: /**
67: * Perform extra initialization of this action's singleton. PLEASE do not
68: * use constructors for this purpose!
69: */
70: protected void initialize() {
71: super .initialize();
72: putProperty(CSCheckDirRecursiveAction.SHORT_DESCRIPTION,
73: NbBundle.getMessage(CSCheckDirRecursiveAction.class,
74: "HINT_CSCheckDirRecursiveAction"));
75: }
76:
77: /** this means that performAction is expecting to be run in its own thread */
78: protected boolean asynchronous() {
79: return true;
80: }
81:
82: /**
83: * Description of the Method
84: *
85: *@param nodes Description of the Parameter
86: */
87: public void performAction() {
88: JRefactory.ensureVisible();
89: java.awt.Frame frame = org.openide.windows.WindowManager
90: .getDefault().getMainWindow();
91: IDEPlugin.checkDirectory(frame, true);
92: }
93:
94: }
|