public Set<BasePsiElement> lookupVariableDefinition(int offset) {
BasePsiElement scope = PsiUtil.lookupElementAtOffset(this, ElementTypeAttribute.SCOPE_DEMARCATION, offset);
Set<BasePsiElement> variableDefinitions = new THashSet<BasePsiElement>();
while (scope != null) {
PsiLookupAdapter lookupAdapter = new IdentifierDefinitionLookupAdapter(null, DBObjectType.ARGUMENT, null);
variableDefinitions = scope.collectPsiElements(lookupAdapter, variableDefinitions, 0);
lookupAdapter = new VariableDefinitionLookupAdapter(null, DBObjectType.ANY, null);
variableDefinitions = scope.collectPsiElements(lookupAdapter, variableDefinitions, 0);