Package org.apache.directory.studio.schemaeditor.model.difference

Examples of org.apache.directory.studio.schemaeditor.model.difference.MandatoryATDifference


                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedMatchingRule" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof MandatoryATDifference )
        {
            MandatoryATDifference diff = ( MandatoryATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedMandatoryAttributeType" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.RemovedMandatoryAttributeType" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof NoUserModificationDifference )
        {
            NoUserModificationDifference diff = ( NoUserModificationDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedNoUserModificationValue" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof ObsoleteDifference )
        {
            ObsoleteDifference diff = ( ObsoleteDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedObsoleteValue" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof OptionalATDifference )
        {
            OptionalATDifference diff = ( OptionalATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedOptionalAttributeType" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.RemovedOptionalAttributeType" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof OrderingDifference )
        {
            OrderingDifference diff = ( OrderingDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedOrderingMatchingRule" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedOrderingMatchingRule" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedOrderingMatchingRule" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SingleValueDifference )
        {
            SingleValueDifference diff = ( SingleValueDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSingleValueValue" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SubstringDifference )
        {
            SubstringDifference diff = ( SubstringDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSubstringMatchingRule" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSubstringMatchingRule" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSubstringMatchingRule" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SuperiorATDifference )
        {
            SuperiorATDifference diff = ( SuperiorATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSuperior" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSuperior" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSuperior" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SuperiorOCDifference )
        {
            SuperiorOCDifference diff = ( SuperiorOCDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSuperior" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSuperior" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SyntaxDifference )
        {
            SyntaxDifference diff = ( SyntaxDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSyntax" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSyntax" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSyntax" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SyntaxLengthDifference )
        {
            SyntaxLengthDifference diff = ( SyntaxLengthDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSyntaxLength" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSyntaxLength" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSyntaxLength" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof UsageDifference )
        {
            UsageDifference diff = ( UsageDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedUsage" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
            }
        }

        // Default
        return super.getText( element );
View Full Code Here


                    return "Removed equality matching rule: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof MandatoryATDifference )
        {
            MandatoryATDifference diff = ( MandatoryATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added mandatory attribute type: '" + diff.getNewValue() + "'.";
                case REMOVED:
                    return "Removed mandatory attribute type: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof NoUserModificationDifference )
        {
            NoUserModificationDifference diff = ( NoUserModificationDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return "Modified 'no user modification' value to : '" + diff.getNewValue() + "' (was '"
                        + diff.getOldValue() + "').";
            }
        }
        else if ( element instanceof ObsoleteDifference )
        {
            ObsoleteDifference diff = ( ObsoleteDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return "Modified 'obsolete' value to : '" + diff.getNewValue() + "' (was '" + diff.getOldValue()
                        + "').";
            }
        }
        else if ( element instanceof OptionalATDifference )
        {
            OptionalATDifference diff = ( OptionalATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added optional attribute type: '" + diff.getNewValue() + "'.";
                case REMOVED:
                    return "Removed optional attribute type: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof OrderingDifference )
        {
            OrderingDifference diff = ( OrderingDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added ordering matching rule: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified ordering matching rule to : '" + diff.getNewValue() + "' (was '"
                        + diff.getOldValue() + "').";
                case REMOVED:
                    return "Removed ordering matching rule: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SingleValueDifference )
        {
            SingleValueDifference diff = ( SingleValueDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return "Modified 'single value' value to : '" + diff.getNewValue() + "' (was '"
                        + diff.getOldValue() + "').";
            }
        }
        else if ( element instanceof SubstringDifference )
        {
            SubstringDifference diff = ( SubstringDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added substring matching rule: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified substring matching rule to : '" + diff.getNewValue() + "' (was '"
                        + diff.getOldValue() + "').";
                case REMOVED:
                    return "Removed substring matching rule: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SuperiorATDifference )
        {
            SuperiorATDifference diff = ( SuperiorATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added superior: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified superior to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
                case REMOVED:
                    return "Removed superior: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SuperiorOCDifference )
        {
            SuperiorOCDifference diff = ( SuperiorOCDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added superior: '" + diff.getNewValue() + "'.";
                case REMOVED:
                    return "Removed superior: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SyntaxDifference )
        {
            SyntaxDifference diff = ( SyntaxDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added syntax: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified syntax to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
                case REMOVED:
                    return "Removed syntax: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SyntaxLengthDifference )
        {
            SyntaxLengthDifference diff = ( SyntaxLengthDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added syntax length: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified syntax length to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue()
                        + "').";
                case REMOVED:
                    return "Removed syntax length: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof UsageDifference )
        {
            UsageDifference diff = ( UsageDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return "Modified usage to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
            }
        }

        // Default
        return super.getText( element );
View Full Code Here

                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedMatchingRule" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof MandatoryATDifference )
        {
            MandatoryATDifference diff = ( MandatoryATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedMandatoryAttributeType" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.RemovedMandatoryAttributeType" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof NoUserModificationDifference )
        {
            NoUserModificationDifference diff = ( NoUserModificationDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedNoUserModificationValue" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof ObsoleteDifference )
        {
            ObsoleteDifference diff = ( ObsoleteDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedObsoleteValue" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof OptionalATDifference )
        {
            OptionalATDifference diff = ( OptionalATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedOptionalAttributeType" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.RemovedOptionalAttributeType" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof OrderingDifference )
        {
            OrderingDifference diff = ( OrderingDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedOrderingMatchingRule" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedOrderingMatchingRule" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedOrderingMatchingRule" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SingleValueDifference )
        {
            SingleValueDifference diff = ( SingleValueDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSingleValueValue" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SubstringDifference )
        {
            SubstringDifference diff = ( SubstringDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSubstringMatchingRule" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSubstringMatchingRule" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSubstringMatchingRule" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SuperiorATDifference )
        {
            SuperiorATDifference diff = ( SuperiorATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSuperior" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSuperior" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSuperior" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SuperiorOCDifference )
        {
            SuperiorOCDifference diff = ( SuperiorOCDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSuperior" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSuperior" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SyntaxDifference )
        {
            SyntaxDifference diff = ( SyntaxDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSyntax" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSyntax" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSyntax" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof SyntaxLengthDifference )
        {
            SyntaxLengthDifference diff = ( SyntaxLengthDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSyntaxLength" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSyntaxLength" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSyntaxLength" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
            }
        }
        else if ( element instanceof UsageDifference )
        {
            UsageDifference diff = ( UsageDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedUsage" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
            }
        }

        // Default
        return super.getText( element );
View Full Code Here

                    break;
            }
        }
        else if ( element instanceof MandatoryATDifference )
        {
            MandatoryATDifference diff = ( MandatoryATDifference ) element;

            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedMandatoryAttributeType" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.RemovedMandatoryAttributeType" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof NoUserModificationDifference )
        {
            NoUserModificationDifference diff = ( NoUserModificationDifference ) element;

            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedNoUserModificationValue" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof ObsoleteDifference )
        {
            ObsoleteDifference diff = ( ObsoleteDifference ) element;

            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedObsoleteValue" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof OptionalATDifference )
        {
            OptionalATDifference diff = ( OptionalATDifference ) element;

            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedOptionalAttributeType" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.RemovedOptionalAttributeType" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof OrderingDifference )
        {
            OrderingDifference diff = ( OrderingDifference ) element;

            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedOrderingMatchingRule" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedOrderingMatchingRule" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedOrderingMatchingRule" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof SingleValueDifference )
        {
            SingleValueDifference diff = ( SingleValueDifference ) element;

            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSingleValueValue" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof SubstringDifference )
        {
            SubstringDifference diff = ( SubstringDifference ) element;

            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSubstringMatchingRule" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSubstringMatchingRule" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages
                                .getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSubstringMatchingRule" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof SuperiorATDifference )
        {
            SuperiorATDifference diff = ( SuperiorATDifference ) element;

            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSuperior" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSuperior" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSuperior" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof SuperiorOCDifference )
        {
            SuperiorOCDifference diff = ( SuperiorOCDifference ) element;

            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSuperior" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSuperior" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof SyntaxDifference )
        {
            SyntaxDifference diff = ( SyntaxDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSyntax" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSyntax" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSyntax" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof SyntaxLengthDifference )
        {
            SyntaxLengthDifference diff = ( SyntaxLengthDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.AddedSyntaxLength" ), new Object[] { diff.getNewValue() } ); //$NON-NLS-1$
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedSyntaxLength" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                case REMOVED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.RemovedSyntaxLength" ), new Object[] { diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
        else if ( element instanceof UsageDifference )
        {
            UsageDifference diff = ( UsageDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return NLS
                        .bind(
                            Messages.getString( "DifferencesWidgetPropertiesLabelProvider.ModifiedUsage" ), new Object[] { diff.getNewValue(), diff.getOldValue() } ); //$NON-NLS-1$
                default:
                    break;
            }
        }
View Full Code Here

                    return "Removed equality matching rule: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof MandatoryATDifference )
        {
            MandatoryATDifference diff = ( MandatoryATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added mandatory attribute type: '" + diff.getNewValue() + "'.";
                case REMOVED:
                    return "Removed mandatory attribute type: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof NoUserModificationDifference )
        {
            NoUserModificationDifference diff = ( NoUserModificationDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return "Modified 'no user modification' value to : '" + diff.getNewValue() + "' (was '"
                        + diff.getOldValue() + "').";
            }
        }
        else if ( element instanceof ObsoleteDifference )
        {
            ObsoleteDifference diff = ( ObsoleteDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return "Modified 'obsolete' value to : '" + diff.getNewValue() + "' (was '" + diff.getOldValue()
                        + "').";
            }
        }
        else if ( element instanceof OptionalATDifference )
        {
            OptionalATDifference diff = ( OptionalATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added optional attribute type: '" + diff.getNewValue() + "'.";
                case REMOVED:
                    return "Removed optional attribute type: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof OrderingDifference )
        {
            OrderingDifference diff = ( OrderingDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added ordering matching rule: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified ordering matching rule to : '" + diff.getNewValue() + "' (was '"
                        + diff.getOldValue() + "').";
                case REMOVED:
                    return "Removed ordering matching rule: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SingleValueDifference )
        {
            SingleValueDifference diff = ( SingleValueDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return "Modified 'single value' value to : '" + diff.getNewValue() + "' (was '"
                        + diff.getOldValue() + "').";
            }
        }
        else if ( element instanceof SubstringDifference )
        {
            SubstringDifference diff = ( SubstringDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added substring matching rule: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified substring matching rule to : '" + diff.getNewValue() + "' (was '"
                        + diff.getOldValue() + "').";
                case REMOVED:
                    return "Removed substring matching rule: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SuperiorATDifference )
        {
            SuperiorATDifference diff = ( SuperiorATDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added superior: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified superior to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
                case REMOVED:
                    return "Removed superior: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SuperiorOCDifference )
        {
            SuperiorOCDifference diff = ( SuperiorOCDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added superior: '" + diff.getNewValue() + "'.";
                case REMOVED:
                    return "Removed superior: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SyntaxDifference )
        {
            SyntaxDifference diff = ( SyntaxDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added syntax: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified syntax to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
                case REMOVED:
                    return "Removed syntax: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof SyntaxLengthDifference )
        {
            SyntaxLengthDifference diff = ( SyntaxLengthDifference ) element;
            switch ( diff.getType() )
            {
                case ADDED:
                    return "Added syntax length: '" + diff.getNewValue() + "'.";
                case MODIFIED:
                    return "Modified syntax length to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue()
                        + "').";
                case REMOVED:
                    return "Removed syntax length: '" + diff.getOldValue() + "'.";
            }
        }
        else if ( element instanceof UsageDifference )
        {
            UsageDifference diff = ( UsageDifference ) element;
            switch ( diff.getType() )
            {
                case MODIFIED:
                    return "Modified usage to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
            }
        }

        // Default
        return super.getText( element );
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.schemaeditor.model.difference.MandatoryATDifference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.