ASTNode elem = ASTNodeFinder.findElement(neoModule, offset);
if(elem instanceof DefSymbol) {
DefSymbol defSymbol = (DefSymbol) elem;
defunit = defSymbol.getDefUnit();
} else if(elem instanceof Reference) {
Reference ref = (Reference) elem;
IModuleResolver mr = DToolClient_Bad.getResolverFor(inputPath);
defunit = ref.findTargetDefElement(mr);
if(defunit == null) {
errorMessage = "No DefUnit found when resolving reference.";
}
} else {
errorMessage = "Element is not a Definition nor a Reference";