예제 #1
0
 @Override
 public void execute(final GUI gui) {
   final StringBuilder sb = new StringBuilder();
   final Nodes n = gui.context.copied;
   for (int i = 0; i < n.size(); ++i) {
     if (i > 0) sb.append(',');
     sb.append(openPre(n, i));
   }
   gui.context.copied = null;
   gui.execute(new XQuery("insert nodes (" + sb + ") into " + openPre(gui.context.marked, 0)));
 }
예제 #2
0
 @Override
 public void execute(final GUI gui) {
   if (!BaseXDialog.confirm(gui, DELETE_NODES)) return;
   final StringBuilder sb = new StringBuilder();
   final Nodes n = gui.context.marked;
   for (int i = 0; i < n.size(); ++i) {
     if (i > 0) sb.append(',');
     sb.append(openPre(n, i));
   }
   gui.context.marked = new Nodes(n.data);
   gui.context.copied = null;
   gui.context.focused = -1;
   gui.execute(new XQuery("delete nodes (" + sb + ')'));
 }
예제 #3
0
파일: Preds.java 프로젝트: dirkk/basex
 @Override
 public String toString() {
   final StringBuilder sb = new StringBuilder();
   for (final Expr e : preds) sb.append('[').append(e).append(']');
   return sb.toString();
 }
예제 #4
0
파일: Try.java 프로젝트: runeengh/basex
 @Override
 public String toString() {
   final StringBuilder sb = new StringBuilder("try { " + expr + " }");
   for (final Catch c : catches) sb.append(' ').append(c);
   return sb.toString();
 }