if ((doc1 == null) || (doc2 == null)){
return;
}
Node n = yoshikoder.getSelectedNode();
CategoryNode cnode = null;
if (n instanceof CategoryNode)
cnode = (CategoryNode)n;
else // patternnode
cnode = (CategoryNode)n.getParent();
final CategoryNode catnode = cnode;
dworker = new DialogWorker(yoshikoder){
protected void doWork() throws Exception {
DocumentList dl = new DocumentListImpl();
dl.add(doc1);
dl.add(doc2);
TokenizationCache tcache = yoshikoder.getTokenizationCache();
TokenList tl1 = tcache.getTokenList(doc1);
TokenList tl2 = tcache.getTokenList(doc2);
if (tl1 == null){
tl1 = TokenizationService.getTokenizationService().tokenize(doc1);
tcache.putTokenList(doc1, tl1);
}
if (tl2 == null){
tl2 = TokenizationService.getTokenizationService().tokenize(doc2);
tcache.putTokenList(doc2, tl2);
}
//YKDictionary dict = yoshikoder.getDictionary();
EntryFrequencyMap efm1 = new EntryFrequencyMap(catnode, tl1);
EntryFrequencyMap efm2 = new EntryFrequencyMap(catnode, tl2);
String key = doc1.getTitle() +
" vs. " + doc2.getTitle();
DictionaryRRDocumentComparisonReport report =
new DictionaryRRDocumentComparisonReport(key,
key,
catnode.getName(), dl, efm1, efm2);
System.err.println(report==null);
dia = new YKReportDialog(yoshikoder, report);
}
protected void onError() {