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

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


    }


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


    }


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

    }


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

    }


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

    }


    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 = bot.tree();
        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


    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.select();
        ContextMenuHelper.clickContextMenu( bot.tree(), "Delete Value" );
        DeleteDialogBot deleteDialogBot = new DeleteDialogBot( DeleteDialogBot.DELETE_VALUE_TITLE );
        deleteDialogBot.clickOkButton();
    }
View Full Code Here

    }


    public void copyValue( String attributeType, String value )
    {
        SWTBotTreeItem treeItem = getTreeItem( attributeType, value );
        treeItem.select();
        ContextMenuHelper.clickContextMenu( bot.tree(), "Copy Value" );
    }
View Full Code Here

  private void setupProjectDependency(String projectName) {
    bot.menu("Window").menu("Show View").menu("Navigator").click();
    SWTBot localBot = bot.viewByTitle("Navigator").bot();
    SWTBotTree tree = localBot.tree();
    SWTBotTreeItem node = tree.expandNode(projectName + "Test");
    node = node.expandNode(".classpath").select();

    final SWTBotContextMenu cmenu = new SWTBotContextMenu(tree);
    bot.performWithTimeout(new VoidResult() {

      @Override
      public void run() {
        cmenu.click("Open With").click("Text Editor");
      }
    }, 5000);

    Matcher<IEditorReference> withPartName = WithPartName
        .withPartName(Matchers.containsString("classpath"));
    try {
      bot.waitUntil(Conditions.waitForEditor(withPartName));
    } catch (TimeoutException toe) {
      node.doubleClick();
      bot.waitUntil(Conditions.waitForEditor(withPartName));
    }

    String classpathText = getClassPathText(projectName);
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.