PrefsMediator prefsMed = new PrefsMediator();
// set OUTPUT dir in PrefsMediator, not input dir.
// PrefsMediator is also used in DocumentAnalyzer, where the
// output dir is the directory containing XCAS files.
prefsMed.setOutputDir(inputDir.toString());
AnnotationViewerDialog viewerDialog = new AnnotationViewerDialog(this,
"Analyzed Documents", prefsMed, styleMapFile, null, cas.getTypeSystem(), null, false,
cas);
viewerDialog.pack();
viewerDialog.setModal(true);
viewerDialog.setVisible(true);
}