int levelsOfUndo = ERXValueUtilities.intValueWithDefault(System.getProperty("WODefaultUndoStackLimit"), 10);
if (levelsOfUndo == 0) {
ec.setUndoManager(null);
}
else {
ec.undoManager().setLevelsOfUndo(levelsOfUndo < 0 ? 10 : levelsOfUndo);
}
setDefaultDelegateOnEditingContext(ec, validationEnabled);
if (!useSharedEditingContext()) {
ec.lock();
ec.setSharedEditingContext(null);