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

Examples of org.apache.directory.ldapstudio.browser.core.model.IConnection


        {
            if ( ConnectionTransfer.getInstance().isSupportedType( event.currentDataType ) )
            {
                if ( event.item != null && event.item.getData() instanceof IConnection )
                {
                    IConnection overConn = ( IConnection ) event.item.getData();
                    if ( event.widget instanceof DropTarget )
                    {
                        DropTarget dropTarget = ( DropTarget ) event.widget;
                        if ( dropTarget.getControl() instanceof Table )
                        {
View Full Code Here


        {
            if ( ConnectionTransfer.getInstance().isSupportedType( event.currentDataType ) )
            {
                // get connection to handle
                IConnection[] connections = ( IConnection[] ) event.data;
                IConnection targetConnection = ( IConnection ) event.item.getData();

                if ( event.detail == DND.DROP_MOVE )
                {
                    boolean fromTop = connectionManager.indexOf( connections[0] ) < connectionManager
                        .indexOf( targetConnection );
                    for ( int i = 0; i < connections.length; i++ )
                    {
                        connectionManager.removeConnection( connections[i] );
                    }
                    for ( int i = 0; i < connections.length; i++ )
                    {
                        int index = connectionManager.indexOf( targetConnection );
                        if ( fromTop )
                        {
                            index++;
                            connectionManager.addConnection( index + i, connections[i] );
                        }
                        else
                        {
                            connectionManager.addConnection( index, connections[i] );
                        }
                    }
                }
                else if ( event.detail == DND.DROP_COPY )
                {
                    for ( int i = 0; i < connections.length; i++ )
                    {
                        IConnection newConnection = ( IConnection ) connections[i].clone();
                        int index = connectionManager.indexOf( targetConnection );
                        connectionManager.addConnection( index + i + 1, newConnection );
                    }
                }
            }
View Full Code Here

    public Object getRawValue( IValue value )
    {
        Object o = super.getRawValue( value );
        if ( o != null && o instanceof String )
        {
            IConnection connection = value.getAttribute().getEntry().getConnection();
            DN dn = value.getAttribute().getEntry().getDn();
            return new SubtreeSpecificationValueWrapper( connection, dn, value.getStringValue() );
        }

        return null;
View Full Code Here

            public void widgetSelected( SelectionEvent e )
            {
                SelectConnectionDialog dialog = new SelectConnectionDialog( PlatformUI.getWorkbench()
                    .getActiveWorkbenchWindow().getShell(), "Select Connection", null );
                dialog.open();
                IConnection connection = dialog.getSelectedConnection();
                setConnection( connection );
                validate();
            }
        } );
        useThisSettingsButton.addSelectionListener( new SelectionAdapter()
View Full Code Here

     */
    public IWizardPage getNextPage()
    {
        if ( templateButton.getSelection() )
        {
            final IConnection connection = entryWidget.getConnection();
            final DN dn = entryWidget.getDn();
            final IEntry[] templateEntries = new IEntry[1];

            if ( connection == null )
            {
View Full Code Here

     */
    public void select( Object obj )
    {
        if ( obj instanceof IConnection )
        {
            IConnection connection = ( IConnection ) obj;

            mainWidget.getViewer().reveal( connection );
            mainWidget.getViewer().refresh( connection, true );
            mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
        }
View Full Code Here

    public Object getRawValue( IValue value )
    {
        Object o = super.getRawValue( value );
        if ( o != null && o instanceof String )
        {
            IConnection connection = value.getAttribute().getEntry().getConnection();
            return new DnValueEditorRawValueWrapper( connection, ( String ) o );
        }

        return null;
    }
View Full Code Here

            return null;
        }
        else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 0 )
        {
            IEntry entry = attributeHierarchy.getAttribute().getEntry();
            IConnection connection = entry.getConnection();
            return new ACIItemValueWithContext( connection, entry, "" ); //$NON-NLS-1$
        }
        else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 1 )
        {
            IEntry entry = attributeHierarchy.getAttribute().getEntry();
            IConnection connection = entry.getConnection();
            String value = getDisplayValue( attributeHierarchy );
            return new ACIItemValueWithContext( connection, entry, value );
        }
        else
        {
View Full Code Here

    {
        Object o = super.getRawValue( value );
        if ( o != null && o instanceof String )
        {
            IEntry entry = value.getAttribute().getEntry();
            IConnection connection = entry.getConnection();
            String v = (String) o;
            return new ACIItemValueWithContext( connection, entry, v );
        }

        return null;
View Full Code Here

        {
            return null;
        }
        else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 0 )
        {
            IConnection connection = attributeHierarchy.getAttribute().getEntry().getConnection();
            return new DnValueEditorRawValueWrapper( connection, null );
        }
        else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 1 )
        {
            IConnection connection = attributeHierarchy.getAttribute().getEntry().getConnection();
            return new DnValueEditorRawValueWrapper( connection, getDisplayValue( attributeHierarchy ) );
        }
        else
        {
            return null;
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.model.IConnection

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.