public void onFailure(Throwable reason) {
callback.onFailure(reason);
}
@Override
public void onSuccess() {
LatexCommandSet set = SetSubscriptAndSuperscript.get();
LatexCommand[] cmds = set.getCommands();
ExtendedMenuItem[] items = new ExtendedMenuItem[cmds.length];
for (int i=0; i<cmds.length; i++) {
LatexCommand cmd = cmds[i];
items[i] = new ExtendedMenuItem(cmd.getIcon(), cmd.getTitle(), new SystemPasteCommand(cmd.getText()));
}