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

Examples of org.apache.directory.ldapstudio.browser.core.model.schema.SyntaxValueProviderRelation


    protected void editSyntax()
    {
        StructuredSelection sel = ( StructuredSelection ) this.syntaxViewer.getSelection();
        if ( !sel.isEmpty() )
        {
            SyntaxValueProviderRelation relation = ( SyntaxValueProviderRelation ) sel.getFirstElement();
            SyntaxValueEditorDialog dialog = new SyntaxValueEditorDialog( getShell(), relation,
                this.class2ValueEditorProxyMap, this.syntaxDescsAndOids );
            if ( dialog.open() == SyntaxValueEditorDialog.OK )
            {
                int index = this.syntaxList.indexOf( relation );
View Full Code Here


    {
        public String getColumnText( Object obj, int index )
        {
            if ( obj instanceof SyntaxValueProviderRelation )
            {
                SyntaxValueProviderRelation relation = ( SyntaxValueProviderRelation ) obj;
                if ( index == 0 )
                {
                    return relation.getSyntaxOID();
                }
                else if ( index == 1 )
                {
                    if ( relation.getSyntaxOID() != null )
                    {
                        if ( syntaxOid2LsdMap.containsKey( relation.getSyntaxOID() ) )
                        {
                            LdapSyntaxDescription lsd = ( LdapSyntaxDescription ) syntaxOid2LsdMap.get( relation
                                .getSyntaxOID() );
                            return lsd.toString();
                        }
                    }
                }
                else if ( index == 2 )
                {
                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
                    return vp != null ? vp.name : null;
                }
            }
            return null;
        }
View Full Code Here

        public Image getColumnImage( Object obj, int index )
        {
            if ( obj instanceof SyntaxValueProviderRelation )
            {
                SyntaxValueProviderRelation relation = ( SyntaxValueProviderRelation ) obj;
                if ( index == 2 )
                {
                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
                    return vp != null ? vp.icon.createImage() : null;
                }
            }

            return null;
View Full Code Here

    }


    protected void okPressed()
    {
        this.returnRelation = new SyntaxValueProviderRelation( this.oidCombo.getText(), ( String ) this.vpName2classMap
            .get( this.valueEditorCombo.getText() ) );
        super.okPressed();
    }
View Full Code Here

                    proxy.className );
                avprs.add( avpr );
            }
            for ( String syntaxOid : proxy.syntaxOids )
            {
                SyntaxValueProviderRelation svpr = new SyntaxValueProviderRelation( syntaxOid, proxy.className );
                svprs.add( svpr );
            }
        }
        BrowserCommonActivator.getDefault().getValueEditorsPreferences().setDefaultAttributeValueProviderRelations(
            avprs.toArray( new AttributeValueProviderRelation[0] ) );
View Full Code Here

                    proxy.className );
                avprs.add( avpr );
            }
            for ( String syntaxOid : proxy.syntaxOids )
            {
                SyntaxValueProviderRelation svpr = new SyntaxValueProviderRelation( syntaxOid, proxy.className );
                svprs.add( svpr );
            }
        }
        BrowserUIPlugin.getDefault().getUIPreferences().setDefaultAttributeValueProviderRelations(
            avprs.toArray( new AttributeValueProviderRelation[0] ) );
View Full Code Here

    {
        public String getColumnText( Object obj, int index )
        {
            if ( obj instanceof SyntaxValueProviderRelation )
            {
                SyntaxValueProviderRelation relation = ( SyntaxValueProviderRelation ) obj;
                if ( index == 0 )
                {
                    return relation.getSyntaxOID();
                }
                else if ( index == 1 )
                {
                    if ( relation.getSyntaxOID() != null )
                    {
                        if ( syntaxOid2LsdMap.containsKey( relation.getSyntaxOID() ) )
                        {
                            LdapSyntaxDescription lsd = ( LdapSyntaxDescription ) syntaxOid2LsdMap.get( relation
                                .getSyntaxOID() );
                            return lsd.toString();
                        }
                    }
                }
                else if ( index == 2 )
                {
                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
                    return vp != null ? vp.name : null;
                }
            }
            return null;
        }
View Full Code Here

        public Image getColumnImage( Object obj, int index )
        {
            if ( obj instanceof SyntaxValueProviderRelation )
            {
                SyntaxValueProviderRelation relation = ( SyntaxValueProviderRelation ) obj;
                if ( index == 2 )
                {
                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
                    return vp != null ? vp.icon.createImage() : null;
                }
            }

            return null;
View Full Code Here

    }


    protected void okPressed()
    {
        this.returnRelation = new SyntaxValueProviderRelation( this.oidCombo.getText(), ( String ) this.vpName2classMap
            .get( this.valueEditorCombo.getText() ) );
        super.okPressed();
    }
View Full Code Here

    protected void editSyntax()
    {
        StructuredSelection sel = ( StructuredSelection ) this.syntaxViewer.getSelection();
        if ( !sel.isEmpty() )
        {
            SyntaxValueProviderRelation relation = ( SyntaxValueProviderRelation ) sel.getFirstElement();
            SyntaxValueEditorDialog dialog = new SyntaxValueEditorDialog( getShell(), relation,
                this.class2ValueEditorProxyMap, this.syntaxDescsAndOids );
            if ( dialog.open() == SyntaxValueEditorDialog.OK )
            {
                int index = this.syntaxList.indexOf( relation );
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.model.schema.SyntaxValueProviderRelation

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.