relevantPsiElement = psiElement;
this.objectType = objectType;
if (psiElement.getElementType().isVirtualObjectInsideLookup()) {
PsiLookupAdapter lookupAdapter = new AliasDefinitionLookupAdapter(null, objectType);
BasePsiElement relevantPsiElement = lookupAdapter.findInElement(psiElement);
if (relevantPsiElement == null) {
lookupAdapter = new SimpleObjectLookupAdapter(null, objectType);
relevantPsiElement = lookupAdapter.findInElement(psiElement);
}
if (relevantPsiElement != null) {
this.relevantPsiElement = relevantPsiElement;
this.name = relevantPsiElement.getText();
}
}
objectRef = new DBObjectRef(this);
}