Community
Participate
Working Groups
Created attachment 258913 [details] dbviewer with toolbar combobox and tree not in sync I have two datasources defined in my dirigible instance besides the default Derby. The names are mongodb and postgre. My observation is that upon the IDE DB viewer's first initialization, the currently selected datasource in the toolbar combobox is postgre and the content is the tables of the default datasource (derby). See the screenshot in the attachment. After some debugging here's what happens: It seems that a SelectionEvent is never raised by DatabaseViewerToolBar's datasourcesCombo for programmatic selections, such as datasourcesCombo.select(0); /line 115 in DatabaseViewerToolBar/. As a consequence the listener method in DatabaseViewer is never invoked and the selected datasource is not set in CommonParameters. Next, DatabaseViewer tries to work on the database content tree and for that it requests the selected datasource from CommonParameters. Since it's not there it falls back to the default datasource and that is how we end up with selection for one datasource and content for another.
https://github.com/eclipse/dirigible/commit/bac7637e407fa60d72ece8b15c56a1ecadb144f2 But it may take a more comprehensive solution that binds more tightly the selected datasource name and tree content provider