if (wordRegion == null)
return null;
if (input instanceof ISourceModule) {
ISourceModule sm = (ISourceModule) input;
IModelElement modelElement = sm.getModelElement();
RutaSelectionParser parser = new RutaSelectionParser();
ModuleDeclaration moduleDeclaration = parser.parse(sm);
String word = document.get(wordRegion.getOffset(), wordRegion.getLength());
RutaReferenceVisitor referenceVisitor = new RutaReferenceVisitor(wordRegion.getOffset());
moduleDeclaration.traverse(referenceVisitor);
ASTNode node = referenceVisitor.getResult();
if (node instanceof RutaVariableReference