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

Method doAction

src/main/java/Menu/RosterItemActions.java:331–664  ·  view source on GitHub ↗
(final int index)

Source from the content-addressed store, hash-verified

329 }
330
331 private void doAction(final int index) {
332 boolean isContact = (item instanceof Contact);
333 Contact c = null;
334 Group g = null;
335 if (isContact) {
336 c = (Contact) item;
337 } else {
338 g = (Group) item;
339 }
340
341 String to = null;
342 if (isContact) {
343 to = (index < 3) ? c.getJid().toString() : c.jid.getBare();
344 }
345 switch (index) {
346 case 0: // version
347 sd.roster.setQuerySign(true);
348 sd.getTheStream().send(IqVersionReply.query(to));
349 break;
350 case 86: // info
351 sd.roster.showInfo();
352 break;
353//#ifdef STATUSES_WINDOW
354//# case 87:
355//# new ContactStatusesList(c);
356//# return;
357//#endif
358 case 1: // vCard
359 if (c.vcard != null) {
360 if (c.getGroupType() == Groups.TYPE_SELF) {
361 new VCardEdit(c.vcard);
362 } else {
363 new VCardView(c);
364 }
365 return;
366 }
367 VCard.request(
368//#ifndef WMUC
369 (c instanceof MucContact)? c.getJid().toString():
370//#endif
371 c.jid.getBare(), c.getJid().toString());
372 break;
373 case 2:
374 new ContactEdit(c);
375 return; //break;
376 case 3: //subscription
377 new SubscriptionEdit(c);
378 return; //break;
379 case 4:
380 new AlertBox(SR.MS_DELETE_ASK, c.getNickJid()) {
381
382 public void yes() {
383 sd.roster.deleteContact((Contact) item);
384 }
385
386 public void no() {
387 }
388 };

Callers 1

eventOkMethod · 0.95

Calls 15

getJidMethod · 0.95
queryMethod · 0.95
getGroupTypeMethod · 0.95
requestMethod · 0.95
getNickJidMethod · 0.95
setToMethod · 0.95
queryMethod · 0.95
getResourceMethod · 0.95
queryMethod · 0.95
getInstanceMethod · 0.95
queryMethod · 0.95
getSkinMethod · 0.95

Tested by

no test coverage detected