(Command c, Displayable d)
| 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 |
nothing calls this directly
no test coverage detected