monitor.subTask("Processing documents, please wait!");
for (DocumentElement documentElement : documents) {
final IDocument doc;
try {
doc = documentElement.getDocument(false);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
boolean wasCasChanged = process(doc.getCAS());
if (wasCasChanged) {
Display.getDefault().syncExec(new Runnable() {
public void run() {
doc.changed();
}
});
try {