public BasePsiElement getObjectNavigationElement(DBSchemaObject parentObject, DBContentType contentType, DBObjectType objectType, CharSequence objectName) {
DatabaseEditableObjectFile databaseFile = parentObject.getVirtualFile();
PsiManager psiManager = PsiManager.getInstance(parentObject.getProject());
DatabaseContentFile contentFile = databaseFile.getContentFile(contentType);
if (contentFile != null) {
PSQLFile file = (PSQLFile) psiManager.findFile(contentFile);
if (file != null) {
return
contentType == DBContentType.CODE_BODY ? file.lookupObjectDeclaration(objectType, objectName) :
contentType == DBContentType.CODE_SPEC ? file.lookupObjectSpecification(objectType, objectName) : null;
}