Package org.apache.directory.ldapstudio.browser.core.events

Examples of org.apache.directory.ldapstudio.browser.core.events.ValueDeletedEvent


                ValueModifiedEvent vmEvent = ( ValueModifiedEvent ) event;
                this.viewer.setSelection( new StructuredSelection( vmEvent.getNewValue() ), true );
            }
            else if ( event instanceof ValueDeletedEvent )
            {
                ValueDeletedEvent vdEvent = ( ValueDeletedEvent ) event;
                if ( vdEvent.getDeletedValue().getAttribute().getValueSize() > 0 )
                {
                    this.viewer.setSelection( new StructuredSelection( vdEvent.getDeletedValue().getAttribute()
                        .getValues()[0] ), true );
                }
            }
            else if ( event instanceof EmptyValueAddedEvent )
            {
View Full Code Here


            viewer.refresh();
        }
        else if ( event instanceof ValueDeletedEvent )
        {
            // select another value of the deleted attribute
            ValueDeletedEvent vdEvent = ( ValueDeletedEvent ) event;
            if ( viewer.getSelection().isEmpty() && vdEvent.getDeletedValue().getAttribute().getValueSize() > 0 )
            {
                viewer.setSelection(
                    new StructuredSelection( vdEvent.getDeletedValue().getAttribute().getValues()[0] ), true );
            }
        }
        else if ( event instanceof EmptyValueAddedEvent )
        {
            // select the added value and start editing
View Full Code Here

    {
        this.checkValue( valueToDelete );

        if ( this.internalDeleteValue( valueToDelete ) )
        {
            this.attributeModified( new ValueDeletedEvent( getEntry().getConnection(), getEntry(), this, valueToDelete ) );
        }
    }
View Full Code Here

        entry.getConnection().delete( attributes, monitor );
        entry.getConnection().delete( values, monitor );

        if ( values.length > 0 )
        {
            this.event = new ValueDeletedEvent( entry.getConnection(), entry, values[0].getAttribute(), values[0] );
        }
        else if ( attributes.length > 0 )
        {
            this.event = new AttributeDeletedEvent( entry.getConnection(), entry, attributes[0] );
        }
View Full Code Here

                    .getModifiedAttribute(), e.getAddedValue() );
                EventRegistry.fireEntryUpdated( delegateEvent, this );
            }
            else if ( event instanceof ValueDeletedEvent )
            {
                ValueDeletedEvent e = ( ValueDeletedEvent ) event;
                ValueDeletedEvent delegateEvent = new ValueDeletedEvent( e.getConnection(), this, e
                    .getModifiedAttribute(), e.getDeletedValue() );
                EventRegistry.fireEntryUpdated( delegateEvent, this );
            }
            else if ( event instanceof ValueModifiedEvent )
            {
View Full Code Here

            viewer.refresh();
        }
        else if ( event instanceof ValueDeletedEvent )
        {
            // select another value of the deleted attribute
            ValueDeletedEvent vdEvent = ( ValueDeletedEvent ) event;
            if ( viewer.getSelection().isEmpty() && vdEvent.getDeletedValue().getAttribute().getValueSize() > 0 )
            {
                viewer.setSelection(
                    new StructuredSelection( vdEvent.getDeletedValue().getAttribute().getValues()[0] ), true );
            }
        }
        else if ( event instanceof EmptyValueAddedEvent )
        {
            // select the added value and start editing
View Full Code Here

            viewer.setSelection( new StructuredSelection( vaEvent.getAddedValue() ), true );
            this.viewer.refresh();
        }
        else if ( event instanceof ValueDeletedEvent )
        {
            ValueDeletedEvent vdEvent = ( ValueDeletedEvent ) event;
            if ( viewer.getSelection().isEmpty() && vdEvent.getDeletedValue().getAttribute().getValueSize() > 0 )
            {
                viewer.setSelection(
                    new StructuredSelection( vdEvent.getDeletedValue().getAttribute().getValues()[0] ), true );
            }
        }
        else if ( event instanceof EmptyValueAddedEvent )
        {
            EmptyValueAddedEvent evaEvent = ( EmptyValueAddedEvent ) event;
View Full Code Here

                    .getModifiedAttribute(), e.getAddedValue() );
                EventRegistry.fireEntryUpdated( delegateEvent, this );
            }
            else if ( event instanceof ValueDeletedEvent )
            {
                ValueDeletedEvent e = ( ValueDeletedEvent ) event;
                ValueDeletedEvent delegateEvent = new ValueDeletedEvent( e.getOriginalConnection(), this, e
                    .getModifiedAttribute(), e.getDeletedValue() );
                EventRegistry.fireEntryUpdated( delegateEvent, this );
            }
            else if ( event instanceof ValueModifiedEvent )
            {
View Full Code Here

                ValueModifiedEvent vmEvent = ( ValueModifiedEvent ) event;
                this.viewer.setSelection( new StructuredSelection( vmEvent.getNewValue() ), true );
            }
            else if ( event instanceof ValueDeletedEvent )
            {
                ValueDeletedEvent vdEvent = ( ValueDeletedEvent ) event;
                if ( vdEvent.getDeletedValue().getAttribute().getValueSize() > 0 )
                {
                    this.viewer.setSelection( new StructuredSelection( vdEvent.getDeletedValue().getAttribute()
                        .getValues()[0] ), true );
                }
            }
            else if ( event instanceof EmptyValueAddedEvent )
            {
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.events.ValueDeletedEvent

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.