use of org.pentaho.ui.xul.impl.DefaultSettingsManager in project pentaho-kettle by pentaho.
the class XulDatabaseExplorerDialog method open.
public boolean open() {
try {
KettleXulLoader theLoader = new KettleXulLoader();
theLoader.setSettingsManager(XulSpoonSettingsManager.getInstance());
theLoader.setSettingsManager(new DefaultSettingsManager(new File(Const.getKettleDirectory() + Const.FILE_SEPARATOR + "xulSettings.properties")));
theLoader.setOuterContext(this.shell);
this.container = theLoader.loadXul(XUL, new XulDatabaseExplorerResourceBundle());
XulDialog theExplorerDialog = (XulDialog) this.container.getDocumentRoot().getElementById("databaseExplorerDialog");
SpoonPluginManager.getInstance().applyPluginsForContainer("database_dialog", container);
this.controller = new XulDatabaseExplorerController(this.shell, this.databaseMeta, this.databases, look);
this.container.addEventHandler(this.controller);
this.runner = new SwtXulRunner();
this.runner.addContainer(this.container);
this.runner.initialize();
this.controller.setSelectedSchemaAndTable(schemaName, selectedTable);
// show dialog if connection is success only.
if (controller.getActionStatus() == UiPostActionStatus.OK) {
theExplorerDialog.show();
}
} catch (Exception e) {
LogChannel.GENERAL.logError("Error exploring database", e);
}
return this.controller.getSelectedTable() != null;
}
Aggregations