benjamin84 / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

[fest-swing] ComponentFinder.listAll() for debugging #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From Volker:

OK, I have written the follow method and it work for me:

   public static void listAllComponents( RobotFixture robot, final
PrintStream out, final Class clas ){
       try {
           robot.finder().find( new ComponentMatcher(){
               public boolean matches( Component c ) {
                   if( clas == null || c.getClass().equals( clas )){
                       out.println( c.getName() + ", " +
c.getClass().getName() );
                   }
                   return false;
               }
           });
       } catch( ComponentLookupException e ) { /* nothing */ }

Original issue reported on code.google.com by Alex.Rui...@gmail.com on 14 Nov 2007 at 2:26

GoogleCodeExporter commented 9 years ago
Added methods:

public void printComponents(PrintStream out)

public void printComponents(PrintStream out, Class<? extends Component> type)

to ComponentFixture.

Original comment by Alex.Rui...@gmail.com on 22 Nov 2007 at 9:01

GoogleCodeExporter commented 9 years ago
My mistake, the methods were added to ComponentFinder.

Original comment by Alex.Rui...@gmail.com on 27 Nov 2007 at 3:24