Warning: session_start(): open(/var/lib/php/sessions/sess_t0sq8d3c4jlpmtmu3tfbbaq8e3, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
srecord Entry(S text, S annotations, S guess) {
LS annotations() { ret tok_splitAtComma(annotations); }
}
/*c*/module QuickAnnotator > DynObjectTable {
start { addCountToName(); set debug; }
afterVisualize {
tablePopupMenuItemAndDoubleClick(table, "Edit annotations...", voidfunc(int row) {
Entry e = getRow(row);
if (e == null) ret;
JTextField tf = jTextField(e.annotations);
showFormTitled("Edit annotations",
"Line", e.text,
"Annotations (comma-separated)", tf, r {
e.annotations = gtt(tf);
fireDataChanged();
});
});
}
IntRange visibleRows() { ret jTable_visibleRows(table); }
// API
void fillData(Collection l) {
setList(map(l, p -> nu Entry(text := p.a, annotations := p.b)));
}
void fillData(SS map) {
fillData(mapToPairs(map));
}
void setItems(Collection l) {
fillData(map(l, s -> pair(s, "")));
}
Set allAnnotations() {
Set set = ciSet();
for (Entry e : data())
addAll(set, e.annotations());
ret set;
}
}