Package org.apache.directory.studio.schemaeditor.view.wrappers

Examples of org.apache.directory.studio.schemaeditor.view.wrappers.AttributeTypeWrapper


                }
            }
            else if ( ( workbenchPart instanceof AttributeTypeEditor ) && ( wrapper instanceof AttributeTypeWrapper ) )
            {
                AttributeTypeEditor editor = ( AttributeTypeEditor ) workbenchPart;
                AttributeTypeWrapper atw = ( AttributeTypeWrapper ) wrapper;
                if ( editor.getOriginalAttributeType().equals( atw.getAttributeType() ) )
                {
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop( workbenchPart );
                    return;
                }
            }
View Full Code Here


            ObjectClassWrapper ocw = ( ObjectClassWrapper ) firstElement;
            openTypeHierarchy( ocw.getObjectClass() );
        }
        else if ( firstElement instanceof AttributeTypeWrapper )
        {
            AttributeTypeWrapper atw = ( AttributeTypeWrapper ) firstElement;
            openTypeHierarchy( atw.getAttributeType() );
        }
    }
View Full Code Here

                }
            }
            else if ( ( workbenchPart instanceof AttributeTypeEditor ) && ( wrapper instanceof AttributeTypeWrapper ) )
            {
                AttributeTypeEditor editor = ( AttributeTypeEditor ) workbenchPart;
                AttributeTypeWrapper atw = ( AttributeTypeWrapper ) wrapper;
                if ( editor.getOriginalAttributeType().equals( atw.getAttributeType() ) )
                {
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop( workbenchPart );
                    return;
                }
            }
View Full Code Here

                }
            }
            else if ( ( workbenchPart instanceof AttributeTypeEditor ) && ( wrapper instanceof AttributeTypeWrapper ) )
            {
                AttributeTypeEditor editor = ( AttributeTypeEditor ) workbenchPart;
                AttributeTypeWrapper atw = ( AttributeTypeWrapper ) wrapper;
                if ( editor.getOriginalAttributeType().equals( atw.getAttributeType() ) )
                {
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop( workbenchPart );
                    return;
                }
            }
View Full Code Here

                }
            }
            else if ( ( workbenchPart instanceof AttributeTypeEditor ) && ( wrapper instanceof AttributeTypeWrapper ) )
            {
                AttributeTypeEditor editor = ( AttributeTypeEditor ) workbenchPart;
                AttributeTypeWrapper atw = ( AttributeTypeWrapper ) wrapper;
                if ( editor.getOriginalAttributeType().equals( atw.getAttributeType() ) )
                {
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop( workbenchPart );
                    return;
                }
            }
View Full Code Here

                Folder folder = ( Folder ) child;
                if ( folder.getType() == FolderType.ATTRIBUTE_TYPE )
                {
                    for ( TreeNode folderChild : folder.getChildren() )
                    {
                        AttributeTypeWrapper atw = ( AttributeTypeWrapper ) folderChild;
                        if ( atw.getAttributeType().equals( at ) )
                        {
                            return atw;
                        }
                    }
                }
            }
        }
        else if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_MIXED )
        {
            for ( Object child : children )
            {
                if ( child instanceof AttributeTypeImpl )
                {
                    AttributeTypeWrapper atw = ( AttributeTypeWrapper ) child;
                    if ( atw.getAttributeType().equals( at ) )
                    {
                        return atw;
                    }
                }
            }
View Full Code Here

            ObjectClassWrapper ocw = ( ObjectClassWrapper ) firstElement;
            openTypeHierarchy( ocw.getObjectClass() );
        }
        else if ( firstElement instanceof AttributeTypeWrapper )
        {
            AttributeTypeWrapper atw = ( AttributeTypeWrapper ) firstElement;
            openTypeHierarchy( atw.getAttributeType() );
        }
    }
View Full Code Here

                Folder folder = ( Folder ) child;
                if ( folder.getType() == FolderType.ATTRIBUTE_TYPE )
                {
                    for ( TreeNode folderChild : folder.getChildren() )
                    {
                        AttributeTypeWrapper atw = ( AttributeTypeWrapper ) folderChild;
                        if ( atw.getAttributeType().equals( at ) )
                        {
                            return atw;
                        }
                    }
                }
            }
        }
        else if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_MIXED )
        {
            for ( Object child : children )
            {
                if ( child instanceof AttributeTypeImpl )
                {
                    AttributeTypeWrapper atw = ( AttributeTypeWrapper ) child;
                    if ( atw.getAttributeType().equals( at ) )
                    {
                        return atw;
                    }
                }
            }
View Full Code Here

                            Folder atFolder = new Folder( FolderType.ATTRIBUTE_TYPE, schemaWrapper );
                            schemaWrapper.addChild( atFolder );

                            for ( AttributeTypeImpl attributeType : schema.getAttributeTypes() )
                            {
                                atFolder.addChild( new AttributeTypeWrapper( attributeType, atFolder ) );
                            }

                            Folder ocFolder = new Folder( FolderType.OBJECT_CLASS, schemaWrapper );
                            schemaWrapper.addChild( ocFolder );

                            for ( ObjectClassImpl objectClass : schema.getObjectClasses() )
                            {
                                ocFolder.addChild( new ObjectClassWrapper( objectClass, ocFolder ) );
                            }
                        }
                        else if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_MIXED )
                        {
                            for ( AttributeTypeImpl attributeType : schema.getAttributeTypes() )
                            {
                                schemaWrapper.addChild( new AttributeTypeWrapper( attributeType, schemaWrapper ) );
                            }

                            for ( ObjectClassImpl objectClass : schema.getObjectClasses() )
                            {
                                schemaWrapper.addChild( new ObjectClassWrapper( objectClass, schemaWrapper ) );
View Full Code Here

        }
        else if ( parentElement instanceof AttributeTypeImpl )
        {
            AttributeTypeImpl at = ( AttributeTypeImpl ) parentElement;

            AttributeTypeWrapper atw = new AttributeTypeWrapper( at, null );
            children = new ArrayList<TreeNode>();
            children.add( atw );
        }
        else if ( parentElement instanceof ObjectClassWrapper )
        {
            ObjectClassWrapper ocw = ( ObjectClassWrapper ) parentElement;
            ObjectClassImpl oc = ocw.getObjectClass();

            if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUPERTYPE )
            {
                String[] superiors = oc.getSuperClassesNames();
                for ( String superior : superiors )
                {
                    if ( superior != null || "".equals( superior ) ) //$NON-NLS-1$
                    {
                        ObjectClassImpl supOC = schemaHandler.getObjectClass( superior );
                        if ( supOC != null )
                        {
                            ObjectClassWrapper supOCW = new ObjectClassWrapper( supOC, ocw );
                            ocw.addChild( supOCW );
                        }
                    }
                }
            }
            else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUBTYPE )
            {
                for ( ObjectClassImpl objectClass : objectClasses )
                {
                    String[] superiors = objectClass.getSuperClassesNames();
                    for ( String superior : superiors )
                    {
                        if ( superior != null || "".equals( superior ) ) //$NON-NLS-1$
                        {
                            ObjectClassImpl supOC = schemaHandler.getObjectClass( superior );
                            if ( supOC != null && oc.equals( supOC ) )
                            {
                                ObjectClassWrapper supOCW = new ObjectClassWrapper( objectClass, ocw );
                                ocw.addChild( supOCW );
                            }
                        }
                    }
                }
            }

            children = ocw.getChildren();
        }
        else if ( parentElement instanceof AttributeTypeWrapper )
        {
            AttributeTypeWrapper atw = ( AttributeTypeWrapper ) parentElement;
            AttributeTypeImpl at = atw.getAttributeType();

            if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUPERTYPE )
            {
                String superior = at.getSuperiorName();
                if ( superior != null || "".equals( superior ) ) //$NON-NLS-1$
                {
                    AttributeTypeImpl supAT = schemaHandler.getAttributeType( superior );
                    if ( supAT != null )
                    {
                        AttributeTypeWrapper supATW = new AttributeTypeWrapper( supAT, atw );
                        atw.addChild( supATW );
                    }
                }
            }
            else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUBTYPE )
            {
                for ( AttributeTypeImpl attributeType : attributeTypes )
                {
                    String superior = attributeType.getSuperiorName();
                    if ( superior != null && !"".equals( superior ) ) //$NON-NLS-1$
                    {
                        AttributeTypeImpl supAT = schemaHandler.getAttributeType( superior );
                        if ( supAT != null && at.equals( supAT ) )
                        {
                            AttributeTypeWrapper supATW = new AttributeTypeWrapper( attributeType, atw );
                            atw.addChild( supATW );
                        }
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.schemaeditor.view.wrappers.AttributeTypeWrapper

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.