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 CSCheckDirAction extends CallableSystemAction {
24:
25: /**
26: * Gets the helpCtx attribute of the PrettyPrinterAction 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 (CSCheckDirAction.class);
34: }
35:
36: /**
37: * Gets the name attribute of the CSCheckDirAction object
38: *
39: *@return The name value
40: */
41: public String getName() {
42: return NbBundle.getMessage(CSCheckDirAction.class,
43: "LBL_CSCheckDirAction");
44: }
45:
46: /**
47: * Get the path to the icon to be displayed in menus, etc
48: *
49: *@return Icon to be displayed in menus, etc.
50: */
51: protected String iconResource() {
52: return "org/acm/seguin/ide/netbeans/CSCheckDirActionIcon.gif";
53: }
54:
55: /**
56: * Perform extra initialization of this action's singleton. PLEASE do not
57: * use constructors for this purpose!
58: */
59: protected void initialize() {
60: super .initialize();
61: putProperty(CSCheckDirAction.SHORT_DESCRIPTION, NbBundle
62: .getMessage(CSCheckDirAction.class,
63: "HINT_CSCheckDirAction"));
64: }
65:
66: /** this means that performAction is expecting to be run in its own thread */
67: protected boolean asynchronous() {
68: return true;
69: }
70:
71: /**
72: * Description of the Method
73: *
74: *@param nodes Description of the Parameter
75: */
76: public void performAction() {
77: JRefactory.ensureVisible();
78: java.awt.Frame frame = org.openide.windows.WindowManager
79: .getDefault().getMainWindow();
80: IDEPlugin.checkDirectory(frame, false);
81: }
82:
83: }
|