MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / commandAction

Method commandAction

src/main/java/Console/StanzaEdit.java:88–127  ·  view source on GitHub ↗
(Command c, Displayable d)

Source from the content-addressed store, hash-verified

86 }
87
88 public void commandAction(Command c, Displayable d) {
89
90 if (!executeCommand(c, d)) {
91
92 if (c == cmdPasteIQDisco) {
93 insert(TEMPLATE_IQ_DISCO, caretPos);
94 return;
95 }
96 if (c == cmdPasteIQVersion) {
97 insert(TEMPLATE_IQ_VERSION, caretPos);
98 return;
99 }
100 if (c == cmdPastePresence) {
101 insert(TEMPLATE_PRESENCE, caretPos);
102 return;
103 }
104 if (c == cmdPasteMessage) {
105 insert(TEMPLATE_MESSAGE, caretPos);
106 return;
107 }
108
109 if (c == cmdCancel) {
110 body = null;
111 }
112
113 if (c == cmdSend && body != null && body.length() > 0) {
114 try {
115 JabberStream stream = StaticData.getInstance().getTheStream();
116 if (stream != null && stream.loggedIn) {
117 stream.send(body.trim());
118 }
119 } catch (IOException ex) {
120 if (StaticData.Debug) {
121 ex.printStackTrace();
122 }
123 }
124 }
125 destroyView();
126 }
127 }
128}
129
130//#endif

Callers

nothing calls this directly

Calls 6

getInstanceMethod · 0.95
sendMethod · 0.95
getTheStreamMethod · 0.80
insertMethod · 0.65
executeCommandMethod · 0.45
destroyViewMethod · 0.45

Tested by

no test coverage detected