urlStrs = urlStrs.substring(0, urlStrs.lastIndexOf(", "));
obSourcePlugin.setInputInfo(streams, urlStrs);
} else {
// Request a URL from the user.
TextField urlField = new TextField("URL");
Checkbox additiveLoadCheckbox = new Checkbox(
"Add to current?", false);
MultiEntryComponentDialog urlDialog = new MultiEntryComponentDialog(
"Enter URL", urlField, additiveLoadCheckbox);
if (!urlDialog.isCancelled()
&& !urlField.getValue().matches("^\\s*$")) {
String urlStr = urlField.getValue();
obSourcePlugin.setAdditive(additiveLoadCheckbox.getValue());
URL url = new URL(urlStr);
streams.add(url.openStream());
obSourcePlugin.setInputInfo(streams, urlStr);
} else {
throw new CancellationException();