1 19 package org.netbeans.modules.xml.schema.actions; 20 21 import org.openide.nodes.*; 22 import org.openide.util.HelpCtx; 23 import org.openide.util.actions.CookieAction; 24 25 import org.netbeans.modules.xml.core.actions.*; 26 27 import org.netbeans.api.xml.cookies.*; 28 29 36 public class CheckSchemaAction extends CookieAction { 37 38 39 private static final long serialVersionUID = -4617456591768900199L; 40 41 42 protected Class [] cookieClasses () { 43 return new Class [] { CheckXMLCookie.class }; 44 } 45 46 47 protected int mode () { 48 return MODE_ALL; 49 } 50 51 52 protected void performAction (Node[] nodes) { 53 54 if (nodes == null) return; 55 56 InputOutputReporter console = new InputOutputReporter(); 57 58 for (int i = 0; i<nodes.length; i++) { 59 Node node = nodes[i]; 60 CheckXMLCookie cake = (CheckXMLCookie) node.getCookie(CheckXMLCookie.class); 61 if (cake == null) continue; 62 console.setNode(node); cake.checkXML(console); 64 } 65 66 console.message(Util.THIS.getString("MSG_XML_check_end")); 67 console.moveToFront(true); 68 } 69 70 71 public String getName() { 72 return Util.THIS.getString("NAME_Check_XML"); 73 } 74 75 76 protected String iconResource () { 77 return null; 78 } 79 80 81 public HelpCtx getHelpCtx () { 82 return new HelpCtx (CheckSchemaAction.class); 83 } 84 85 } 86 | Popular Tags |