I am ok with this approach (I haven't looked at the code in detail) if
a quick and dirty solution is needed, but I think we need a more general
solution.
For example, rather than putting user-agent checks in a test or
disabling it, it would be nice if we could say don't run this in Chrome
DevMode or Safari Web/DevMode, and other combinations.
Since you can only have one @DoNotRunWith annotation, whatever we do
allowing different combinations to be excluded will have to be arguments
inside it. More generally, we probably want inheritance in the markers.
It could be something like this (just a hastily conceived idea, not
fully baked):
@DoNotRunWith(Platform.*)
just like now
@DoNotRunWith(o...@and(HtmlUnit.class, DevMode.class},
@And(WebKit.class, Mobile.class)})
to skip running with HtmlUnit only in DevMode (ProdMode would still
run) or on any mobile webkit-based browser
with an inheritance tree of marker interfaces like this:
DoNotRunWithMarker
Mode
DevMode
ProdMode
UserAgent
WebKit
Safari
Iphone (also extends Mobile)
Android (ditto)
Chrome
Gecko
IE
IE6
IE7
IE8
HtmlUnit
Profile
Mobile
The relevant annotations would look like:
public @interface DoNotRunWith {
public @interface And {
Class<? extends DoNotRunWithMarker>[] value();
}
And[] or() default {};
Platform[] value() default {};
}
http://gwt-code-reviews.appspot.com/171801
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors