WodParserCache cache = null;
IWodElement wodElement = null;
if (editor instanceof IWOEditor) {
try {
IWOEditor woEditor = (IWOEditor) editor;
cache = woEditor.getParserCache();
wodElement = woEditor.getSelectedElement(true, true);
} catch (Throwable t) {
t.printStackTrace();
}
}