typeBuilderDiagnostic.getSeverity() == Diagnostic.OK &&
instanceTypeName.equals(formattedName = EcoreUtil.toJavaInstanceTypeName((EGenericType)typeBuilderDiagnostic.getData().get(0))) :
eClassifier instanceof EClass || eClassifier instanceof EEnum;
if (!result && diagnostics != null)
{
BasicDiagnostic diagnosic =
createDiagnostic
(Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
WELL_FORMED_INSTANCE_TYPE_NAME,
"_UI_EClassifierInstanceTypeNameNotWellFormed_diagnostic",
new Object[] { getValueLabel(EcorePackage.Literals.ESTRING, instanceTypeName, context) },
new Object[] { eClassifier },
context);
if (typeBuilderDiagnostic != null)
{
if (!typeBuilderDiagnostic.getChildren().isEmpty())
{
diagnosic.addAll(typeBuilderDiagnostic);
}
else if (instanceTypeName != null && formattedName != null)
{
// The string must contain inappropriate whitespace, so find the index for the first difference.
//
int i = 0;
for (int length = Math.min(instanceTypeName.length(), formattedName.length());
i < length;
i = Character.offsetByCodePoints(instanceTypeName, i, 1))
{
if (instanceTypeName.codePointAt(i) != formattedName.codePointAt(i))
{
break;
}
}
diagnosic.add
(createDiagnostic
(Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
WELL_FORMED_INSTANCE_TYPE_NAME,
instanceTypeName.codePointAt(i) == ' ' ? "_UI_EClassifierInstanceTypeNameUnexpectedSpace_diagnostic" : "_UI_EClassifierInstanceTypeNameExpectedSpace_diagnostic",