plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java [321:371]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void dialogChanged()
    {
        if ( schemaComboViewer.getSelection().isEmpty() )
        {
            displayErrorMessage( Messages.getString( "NewObjectClassGeneralPageWizardPage.ErrorNoSchemaSpecified" ) ); //$NON-NLS-1$
            return;
        }
        if ( oidCombo.getText().equals( "" ) ) //$NON-NLS-1$
        {
            displayErrorMessage( Messages.getString( "NewObjectClassGeneralPageWizardPage.ErrorNoOIDSpecified" ) ); //$NON-NLS-1$
            return;
        }
        if ( ( !oidCombo.getText().equals( "" ) ) && ( !Oid.isOid( oidCombo.getText() ) ) ) //$NON-NLS-1$
        {
            displayErrorMessage( Messages.getString( "NewObjectClassGeneralPageWizardPage.ErrorIncorrectOID" ) ); //$NON-NLS-1$
            return;
        }
        if ( ( !oidCombo.getText().equals( "" ) ) && ( Oid.isOid( oidCombo.getText() ) ) //$NON-NLS-1$
            && ( schemaHandler.isOidAlreadyTaken( oidCombo.getText() ) ) )
        {
            displayErrorMessage( Messages.getString( "NewObjectClassGeneralPageWizardPage.ErrorObjectOIDExists" ) ); //$NON-NLS-1$
            return;
        }
        if ( aliases.size() == 0 )
        {
            displayWarningMessage( Messages.getString( "NewObjectClassGeneralPageWizardPage.ErrorObjectClassNoName" ) ); //$NON-NLS-1$
            return;
        }
        else
        {
            for ( Alias alias : aliases )
            {
                if ( alias instanceof AliasWithStartError )
                {
                    displayErrorMessage( NLS
                        .bind(
                            Messages.getString( "NewObjectClassGeneralPageWizardPage.AliasStartInvalid" ), new Object[] { alias, ( ( AliasWithStartError ) alias ).getErrorChar() } ) ); //$NON-NLS-1$
                    return;
                }
                else if ( alias instanceof AliasWithPartError )
                {
                    displayErrorMessage( NLS
                        .bind(
                            Messages.getString( "NewObjectClassGeneralPageWizardPage.AliasPartInvalid" ), new Object[] { alias, ( ( AliasWithPartError ) alias ).getErrorChar() } ) ); //$NON-NLS-1$
                    return;
                }
            }
        }

        displayErrorMessage( null );
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java [320:370]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void dialogChanged()
    {
        if ( schemaComboViewer.getSelection().isEmpty() )
        {
            displayErrorMessage( Messages.getString( "NewAttributeTypeGeneralWizardPage.ErrorNoSchemaSpecified" ) ); //$NON-NLS-1$
            return;
        }
        if ( oidCombo.getText().equals( "" ) ) //$NON-NLS-1$
        {
            displayErrorMessage( Messages.getString( "NewAttributeTypeGeneralWizardPage.ErrorNoOIDSpecified" ) ); //$NON-NLS-1$
            return;
        }
        if ( ( !oidCombo.getText().equals( "" ) ) && ( !Oid.isOid( oidCombo.getText() ) ) ) //$NON-NLS-1$
        {
            displayErrorMessage( Messages.getString( "NewAttributeTypeGeneralWizardPage.ErrorIncorrectOID" ) ); //$NON-NLS-1$
            return;
        }
        if ( ( !oidCombo.getText().equals( "" ) ) && ( Oid.isOid( oidCombo.getText() ) ) //$NON-NLS-1$
            && ( schemaHandler.isOidAlreadyTaken( oidCombo.getText() ) ) )
        {
            displayErrorMessage( Messages.getString( "NewAttributeTypeGeneralWizardPage.ErrorObjectOIDExists" ) ); //$NON-NLS-1$
            return;
        }
        if ( aliases.size() == 0 )
        {
            displayWarningMessage( Messages.getString( "NewAttributeTypeGeneralWizardPage.ErrorAttributeTypeNoName" ) ); //$NON-NLS-1$
            return;
        }
        else
        {
            for ( Alias alias : aliases )
            {
                if ( alias instanceof AliasWithStartError )
                {
                    displayErrorMessage( NLS
                        .bind(
                            Messages.getString( "NewAttributeTypeGeneralWizardPage.AliasStartInvalid" ), new Object[] { alias, ( ( AliasWithStartError ) alias ).getErrorChar() } ) ); //$NON-NLS-1$
                    return;
                }
                else if ( alias instanceof AliasWithPartError )
                {
                    displayErrorMessage( NLS
                        .bind(
                            Messages.getString( "NewAttributeTypeGeneralWizardPage.AliasPartInvalid" ), new Object[] { alias, ( ( AliasWithPartError ) alias ).getErrorChar() } ) ); //$NON-NLS-1$
                    return;
                }
            }
        }

        displayErrorMessage( null );
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



