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

Method executeCommand

src/main/java/ui/controls/ExTextBox.java:179–214  ·  view source on GitHub ↗
(Command c, Displayable displayable)

Source from the content-addressed store, hash-verified

177 }
178
179 public boolean executeCommand(Command c, Displayable displayable) {
180
181 body = textbox.getString();
182 caretPos = getCaretPos();
183
184 if (body.length() == 0)
185 body = null;
186
187//#ifdef ARCHIVE
188 if (c==cmdArchive) { new ArchiveList(caretPos, 1, textbox); return true; }
189//#endif
190//#ifdef CLIPBOARD
191 if (c == cmdCopy) {
192 try {
193 ClipBoardIO.getInstance().setClipBoard(body);
194 if (!ClipBoardIO.getInstance().isEmpty()) {
195 textbox.addCommand(cmdCopyPlus);
196 }
197 } catch (Exception e) {/*no messages*/}
198 return true;
199 }
200 if (c==cmdCopyPlus) {
201 try {
202 ClipBoardIO.getInstance().append(body);
203 } catch (Exception e) {/*no messages*/}
204 return true;
205 }
206 if (c==cmdPasteText) {
207 insert(ClipBoardIO.getInstance().getClipBoard(), getCaretPos(), writespaces);
208 return true; }
209//#endif
210//#if TEMPLATES
211 if (c==cmdTemplate) { new ArchiveList(caretPos, 2, textbox); return true; }
212//#endif
213 return false;
214 }
215}

Callers 4

commandActionMethod · 0.45
commandActionMethod · 0.45
commandActionMethod · 0.45
commandActionMethod · 0.45

Calls 9

getCaretPosMethod · 0.95
getInstanceMethod · 0.95
insertMethod · 0.95
appendMethod · 0.80
getStringMethod · 0.65
setClipBoardMethod · 0.45
isEmptyMethod · 0.45
addCommandMethod · 0.45
getClipBoardMethod · 0.45

Tested by

no test coverage detected