fileNames = fileNames.substring(0, fileNames
.lastIndexOf(", "));
obSourcePlugin.setInputInfo(streams, fileNames);
} else {
// Request a file or URL from the user.
AdditiveLoadFileOrUrlChooser fileChooser = PluginComponentFactory
.chooseFileForReading(
obSourcePlugin.getDisplayName(),
obSourcePlugin
.getAdditionalFileExtensions(),
obSourcePlugin.getInputType() == InputType.FILE_OR_URL);
if (fileChooser != null) {
// If a file was chosen or a URL obtained, use as input.
obSourcePlugin
.setAdditive(fileChooser.isLoadAdditive());
if (fileChooser.isUrlProvided()) {
String urlStr = fileChooser.getUrlString();
URL url = new URL(urlStr);
streams.add(url.openStream());
obSourcePlugin.setInputInfo(streams, urlStr);
} else {
File file = fileChooser.getSelectedFile();
streams.add(new FileInputStream(file));
obSourcePlugin
.setInputInfo(streams, file.getName());
}
} else {