}
}
public void performCreateTrainingData() throws IOException {
CreateTrainingDataDialog dialog = new CreateTrainingDataDialog(
EncogWorkBench.getInstance().getMainWindow());
dialog.setType(TrainingDataType.CopyCSV);
if (dialog.process()) {
String name = dialog.getFilenameName();
if (name.trim().length() == 0) {
EncogWorkBench
.displayError("Error", "Must specify a filename.");
return;
}
name = FileUtil.forceExtension(name, "csv");
File targetFile = new File(EncogWorkBench.getInstance()
.getProjectDirectory(), name);
if (!EncogWorkBench.getInstance().getMainWindow().getTabManager()
.queryViews(targetFile)) {
return;
}
switch (dialog.getType()) {
case CopyCSV:
CreateTrainingData.copyCSV(name);
break;
case MarketWindow:
CreateTrainingData.downloadMarketData(name);