public boolean hasErrors() {
return errorMap != null && errorMap.size() > 0;
}
private DBDataType lookupDataType(ExecVariablePsiElement variablePsiElement) {
BasePsiElement parent = variablePsiElement.lookupEnclosingNamedPsiElement();
Set<BasePsiElement> bucket = null;
while (parent != null) {
bucket = parent.collectObjectPsiElements(bucket, DBObjectType.COLUMN.getFamilyTypes(), IdentifierCategory.REFERENCE);
if (bucket != null) {
if (bucket.size() > 1) {
return null;
}
if (bucket.size() == 1) {
Object psiElement = bucket.toArray()[0];
if (psiElement instanceof IdentifierPsiElement) {
IdentifierPsiElement columnPsiElement = (IdentifierPsiElement) psiElement;
DBObject object = columnPsiElement.resolveUnderlyingObject();
if (object != null && object instanceof DBColumn) {
DBColumn column = (DBColumn) object;
return column.getDataType();
}
}
return null;
}
}
parent = parent.lookupEnclosingNamedPsiElement();
if (parent instanceof ExecutablePsiElement) break;
}
return null;
}