Package net.sf.swtbot.matcher

Examples of net.sf.swtbot.matcher.ClassMatcher


   * @return a wrapper around the list widget.
   * @throws WidgetNotFoundException if the widget is not found.
   * @since 1.0
   */
  public SWTBotList list(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(org.eclipse.swt.widgets.List.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any table");
    return new SWTBotList((org.eclipse.swt.widgets.List) findControls.get(index));
  }
View Full Code Here


   * @return a wrapper around the tree widget.
   * @throws WidgetNotFoundException if the widget is not found.
   * @since 1.0
   */
  public SWTBotTree tree(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(Tree.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any tree");
    return new SWTBotTree((Tree) findControls.get(index));
  }
View Full Code Here

   *
   * @param composite The composite to use.
   * @return The {@link StyledText} item.
   */
  private StyledText findEditor(final Composite composite) {
    final ClassMatcher classMatcher = new ClassMatcher(StyledText.class);
    return (StyledText) syncExec(new WidgetResult() {
      public Widget run() {
        StyledText styledText = null;
        try {
          List findControls = finder.findControls(composite, classMatcher, true);
View Full Code Here

    public static SWTBotTree getConnectionsTree( SWTEclipseBot bot ) throws Exception
    {
        SWTBotView view = bot.view( "Connections" );
        view.show();

        List<Tree> findControls = new ControlFinder().findControls( view.widget, new ClassMatcher( Tree.class ), true );
        if ( findControls.isEmpty() )
        {
            throw new WidgetNotFoundException( "Could not find Connections tree" );
        }
        return new SWTBotTree( findControls.get( 0 ) );
View Full Code Here

    public static SWTBotTree getLdapBrowserTree( SWTEclipseBot bot ) throws Exception
    {
        SWTBotView view = bot.view( "LDAP Browser" );
        view.show();

        List<Tree> findControls = new ControlFinder().findControls( view.widget, new ClassMatcher( Tree.class ), true );
        if ( findControls.isEmpty() )
        {
            throw new WidgetNotFoundException( "Could not find LDAP Browser tree" );
        }
        return new SWTBotTree( findControls.get( 0 ) );
View Full Code Here

                    }
                } );

                final SWTBotView editor = new SWTBotView( editorReference );
                List<Tree> findControls = new ControlFinder().findControls( editor.widget,
                    new ClassMatcher( Tree.class ), true );
                if ( findControls.isEmpty() )
                {
                    throw new WidgetNotFoundException( "Could not find Entry Editor tree" );
                }
                return new SWTBotTree( findControls.get( 0 ) );
View Full Code Here

TOP

Related Classes of net.sf.swtbot.matcher.ClassMatcher

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.