WidgetDisposedCondition() takes a constructor parameter of type org.eclipse.swt.widgets.Widget. I have been looking over the SWTWidgetLocator methods to try and understand how I can get a reference to this widget, but found no method that returns a valid type.
Here's what I have in my code that compiles:
- Code: Select all
ui.wait(new WidgetDisposedCondition((Widget) new SWTWidgetLocator(ProgressBar.class, new ViewLocator("myView")).findAll(ui)[0]));
I have not tried this code out yet, but I have my suspicious as to whether or not it would be reliable to use, just because it looks "messy".
Is there a better way to write what it is I am trying to do, or a better way to reference this Widget object?