{
if ( element instanceof DuplicateAliasError )
{
DuplicateAliasError duplicateAliasError = ( DuplicateAliasError ) element;
SchemaObject duplicate = duplicateAliasError.getDuplicate();
if ( duplicate instanceof AttributeTypeImpl )
{
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.DuplicateAliasErrorAttributeType" ), new String[] { duplicateAliasError.getAlias(), duplicate.getOid() } ); //$NON-NLS-1$
}
else if ( duplicate instanceof ObjectClassImpl )
{
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.DuplicateAliasErrorObjectClass" ), new String[] { duplicateAliasError.getAlias(), duplicate.getOid() } ); //$NON-NLS-1$
}
}
else if ( element instanceof DuplicateOidError )
{
DuplicateOidError duplicateOidError = ( DuplicateOidError ) element;
SchemaObject duplicate = duplicateOidError.getDuplicate();
if ( duplicate instanceof AttributeTypeImpl )
{
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.DuplicateOidErrorAttributeType" ), new String[] { duplicateOidError.getOid(), duplicate.getName() } ); //$NON-NLS-1$
}
else if ( duplicate instanceof ObjectClassImpl )
{
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.DuplicateOidErrorObjectClass" ), new String[] { duplicateOidError.getOid(), duplicate.getName() } ); //$NON-NLS-1$
}
}
else if ( element instanceof NonExistingATSuperiorError )
{
NonExistingATSuperiorError nonExistingATSuperiorError = ( NonExistingATSuperiorError ) element;
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.NonExistingSuperiorAttribute" ), new String[] { nonExistingATSuperiorError.getSuperiorAlias() } ); //$NON-NLS-1$
}
else if ( element instanceof NonExistingOCSuperiorError )
{
NonExistingOCSuperiorError nonExistingOCSuperiorError = ( NonExistingOCSuperiorError ) element;
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.NonExistingSuperiorObject" ), new String[] { nonExistingOCSuperiorError.getSuperiorAlias() } ); //$NON-NLS-1$
}
else if ( element instanceof NonExistingMandatoryATError )
{
NonExistingMandatoryATError nonExistingMandatoryATError = ( NonExistingMandatoryATError ) element;
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.NonExistingMandatoryAttribute" ), new String[] { nonExistingMandatoryATError.getAlias() } ); //$NON-NLS-1$
}
else if ( element instanceof NonExistingOptionalATError )
{
NonExistingOptionalATError nonExistingOptionalATError = ( NonExistingOptionalATError ) element;
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.NonExistingOptionalAttribute" ), new String[] { nonExistingOptionalATError.getAlias() } ); //$NON-NLS-1$
}
else if ( element instanceof NonExistingSyntaxError )
{
NonExistingSyntaxError nonExistingSyntaxError = ( NonExistingSyntaxError ) element;
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.NonExistingSyntax" ), new String[] { nonExistingSyntaxError.getSyntaxOid() } ); //$NON-NLS-1$
}
else if ( element instanceof NonExistingMatchingRuleError )
{
NonExistingMatchingRuleError nonExistingMatchingRuleError = ( NonExistingMatchingRuleError ) element;
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.NonExistingMatchingRule" ), new String[] { nonExistingMatchingRuleError.getMatchingRuleAlias() } ); //$NON-NLS-1$
}
else if ( element instanceof NoAliasWarning )
{
NoAliasWarning noAliasWarning = ( NoAliasWarning ) element;
SchemaObject source = noAliasWarning.getSource();
if ( source instanceof AttributeTypeImpl )
{
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.NoAliasWarningAttributeType" ), new String[] { source.getOid() } ); //$NON-NLS-1$
}
else if ( source instanceof ObjectClassImpl )
{
return NLS
.bind(
Messages.getString( "ProblemsViewLabelProvider.NoAliasWarningObjectClass" ), new String[] { source.getOid() } ); //$NON-NLS-1$
}
}
else if ( element instanceof ClassTypeHierarchyError )
{
ClassTypeHierarchyError classTypeHierarchyError = ( ClassTypeHierarchyError ) element;
ObjectClassImpl source = ( ObjectClassImpl ) classTypeHierarchyError.getSource();
ObjectClassImpl superior = ( ObjectClassImpl ) classTypeHierarchyError.getSuperior();
if ( source.getType().equals( ObjectClassTypeEnum.ABSTRACT ) )
{
if ( superior.getType().equals( ObjectClassTypeEnum.STRUCTURAL ) )
{
return NLS
.bind(
Messages
.getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAbstractStructuralObject" ), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
}
else if ( superior.getType().equals( ObjectClassTypeEnum.AUXILIARY ) )
{
return NLS
.bind(
Messages
.getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAbstractAuxiliaryObject" ), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
}
}
else if ( source.getType().equals( ObjectClassTypeEnum.AUXILIARY ) )
{
if ( superior.getType().equals( ObjectClassTypeEnum.STRUCTURAL ) )
{
return NLS
.bind(