Package org.eclipse.swtbot.swt.finder.widgets

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem



    void editValue( String attributeType, String value )
    {
        cancelEditValue();
        SWTBotTreeItem treeItem = getTreeItem( attributeType, value );
        treeItem.doubleClick();
    }
View Full Code Here


    }


    void deleteValue( String attributeType, String value )
    {
        SWTBotTreeItem treeItem = getTreeItem( attributeType, value );
        treeItem.click();
        ContextMenuHelper.clickContextMenu( bot.tree(), "Delete Value" );
        DeleteDialogBot deleteDialogBot = new DeleteDialogBot( DeleteDialogBot.DELETE_VALUE_TITLE );
        deleteDialogBot.clickOkButton();
    }
View Full Code Here

        partition.setId( "example" );
        partition.setSuffix( "dc=example,dc=com" );
        ldapServer.getDirectoryService().addPartition( partition );

        // refresh root DSE and ensure that the partition is in root DSE
        SWTBotTreeItem rootDSE = SWTBotUtils.selectEntry( eBot, browserTree, false, "DIT", "Root DSE" );
        ContextMenuHelper.clickContextMenu( browserTree, "Reload Entry" );

        // ensure context entry is not there
        rootDSE = SWTBotUtils.selectEntry( eBot, browserTree, false, "DIT", "Root DSE" );
        List<String> nodes = rootDSE.getNodes();
        for ( String node : nodes )
        {
            if ( node.startsWith( "dc=example,dc=com" ) )
            {
                fail( "dc=example,dc=com should not exist yet" );
View Full Code Here

    }


    public void selectEntry( String... path )
    {
        SWTBotTreeItem entry = getEntry( path );
        select( entry );
    }
View Full Code Here

    }


    public void selectChildrenOfEnty( String[] children, String... path )
    {
        SWTBotTreeItem entry = getEntry( path );
        entry.select( children );
    }
View Full Code Here

    }


    public ReferralDialogBot selectEntryExpectingReferralDialog( String... path )
    {
        SWTBotTreeItem entry = getEntry( path );
        select( entry );
        return new ReferralDialogBot();
    }
View Full Code Here

    }


    public void expandEntry( String... path )
    {
        SWTBotTreeItem entry = getEntry( path );
        expand( entry, true, null );
    }
View Full Code Here

    }


    public ReferralDialogBot expandEntryExpectingReferralDialog( String... path )
    {
        SWTBotTreeItem entry = getEntry( path );
        expand( entry, false, null );
        return new ReferralDialogBot();
    }
View Full Code Here

    private SWTBotTreeItem getEntry( String... path )
    {
        SWTBotTree browserTree = getBrowserTree();
        List<String> pathList = new ArrayList<String>( Arrays.asList( path ) );
        SWTBotTreeItem entry = null;

        while ( !pathList.isEmpty() )
        {
            String node = pathList.remove( 0 );

            if ( entry == null )
            {
                node = adjustNodeName( browserTree, node );
                entry = browserTree.getTreeItem( node );
            }
            else
            {
                // adjust current path, because the label is decorated with the
                // number of children
                node = adjustNodeName( entry, node );
                entry = entry.getNode( node );
            }

            if ( !pathList.isEmpty() )
            {
                // expand entry and wait till
View Full Code Here

     */
    public static SWTBotTreeItem selectEntry( final SWTWorkbenchBot bot, final SWTBotTree tree,
        final boolean expandChild, final String... path )
    {
        List<String> pathList = new ArrayList<String>( Arrays.asList( path ) );
        SWTBotTreeItem entry = null;

        while ( !pathList.isEmpty() )
        {
            String currentPath = pathList.remove( 0 );

            if ( entry == null )
            {
                currentPath = adjustNodeName( tree, currentPath );
                entry = tree.getTreeItem( currentPath );
            }
            else
            {
                // adjust current path, because the label is decorated with the
                // number of children
                currentPath = adjustNodeName( entry, currentPath );
                entry = entry.getNode( currentPath );
            }
            entry.click();

            if ( !pathList.isEmpty() || expandChild )
            {
                // expand entry and wait till
                // - children are displayed
                // - next child is visible
                final String nextName = !pathList.isEmpty() ? pathList.get( 0 ) : null;
                expandEntry( bot, entry, nextName );
            }

            entry.select();
        }
        return entry;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem

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.