Skip to content

Commit

Permalink
1378: Исправление замечаний
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimeg committed Nov 29, 2023
1 parent edbf787 commit 2cdfa79
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.EcoreUtil2;
import org.eclipse.xtext.naming.QualifiedName;
import org.eclipse.xtext.resource.IEObjectDescription;

import com._1c.g5.v8.bm.core.BmUriUtil;
Expand Down Expand Up @@ -319,20 +320,24 @@ private String getRightName(IV8Project project)

private String getMdObjectName(MdObject mdObject, IV8Project project)
{
if (mdObject == null)
if (mdObject == null || project == null)
{
return "Unknown"; //$NON-NLS-1$
}

if (project != null && project.getScriptVariant() == ScriptVariant.RUSSIAN
&& MdUtil.getFullyQualifiedNameRu(mdObject) != null)
if (project.getScriptVariant() == ScriptVariant.RUSSIAN)
{
return MdUtil.getFullyQualifiedNameRu(mdObject).toString();
QualifiedName fqn = MdUtil.getFullyQualifiedNameRu(mdObject);
if (fqn != null)
{
return fqn.toString();
}
}

if (MdUtil.getFullyQualifiedName(mdObject) != null)
QualifiedName fqn = MdUtil.getFullyQualifiedName(mdObject);
if (fqn != null)
{
return MdUtil.getFullyQualifiedName(mdObject).toString();
return fqn.toString();
}

return "Unknown"; //$NON-NLS-1$
Expand Down

0 comments on commit 2cdfa79

Please sign in to comment.