MCPcopy Create free account
hub / github.com/TheCyaniteProject/exit_code_java / run

Method run

addons/navComPack/src/main/java/addon/Plugin.java:40–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 }
39
40 @Override
41 public void run() {
42 String path = console.getNavigator().getCurrentDirectory();
43
44 Element dataElement = (Element) console.getNavigator().getDirectory(path);
45 Node childNode = dataElement.getFirstChild();
46 try {
47 while( childNode.getNextSibling()!=null ){
48 childNode = childNode.getNextSibling();
49 if (childNode.getNodeType() == Node.ELEMENT_NODE) {
50 Element childElement = (Element) childNode;
51 if(childElement.hasAttribute("name")) {
52 if (childNode.getNodeName().trim().equals("dir")) {
53 Console.printText(termArea, String.format(
54 "%s d%s%s%s",
55 childElement.getAttribute("name"),
56 childElement.getAttribute("ownerp"),
57 childElement.getAttribute("groupp"),
58 childElement.getAttribute("otherp")
59 ));
60 } else {
61 Console.printText(termArea, String.format(
62 "%s -%s%s%s",
63 childElement.getAttribute("name"),
64 childElement.getAttribute("ownerp"),
65 childElement.getAttribute("groupp"),
66 childElement.getAttribute("otherp")
67 ));
68 }
69 }
70 }
71 }
72 }
73 catch(Exception ex) {
74 System.out.println(ex.getMessage());
75 }
76
77 }
78
79}
80

Callers

nothing calls this directly

Calls 5

printTextMethod · 0.95
getCurrentDirectoryMethod · 0.80
getNavigatorMethod · 0.80
getDirectoryMethod · 0.80
printlnMethod · 0.45

Tested by

no test coverage detected