public void actionPerformed(final ActionEvent e)
{
final KettleQueryEntry kettleQueryEntry = (KettleQueryEntry) queryNameList.getSelectedValue();
final KettleTransFromFileProducer fileProducer = kettleQueryEntry.createProducer();
final KettleDataFactory dataFactory = new KettleDataFactory();
dataFactory.setQuery(kettleQueryEntry.getName(), fileProducer);
try
{
final AbstractReportDefinition report = designTimeContext.getReport();
final MasterReport masterReport = DesignTimeUtil.getMasterReport(report);
final Configuration configuration;
final ResourceKey contentBase;
final ReportEnvironment reportEnvironment;
if (masterReport == null)
{
contentBase = null;
configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
reportEnvironment = new DefaultReportEnvironment(configuration);
}
else
{
contentBase = masterReport.getContentBase();
configuration = masterReport.getConfiguration();
reportEnvironment = masterReport.getReportEnvironment();
}
dataFactory.initialize(configuration,
report.getResourceManager(), contentBase, MasterReport.computeAndInitResourceBundleFactory
(report.getResourceBundleFactory(), reportEnvironment));
final DataPreviewDialog previewDialog = new DataPreviewDialog(KettleDataSourceDialog.this);