Skip to content

Commit

Permalink
#2046 SQL editor status message update fix (connection events reflect…
Browse files Browse the repository at this point in the history
…ed only in the active tab)
  • Loading branch information
serge-rider committed Sep 21, 2017
1 parent 4914bea commit 8d515cb
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1195,15 +1195,13 @@ private void onDataSourceChange()
if (syntaxLoaded && lastExecutionContext == executionContext) {
return;
}
for (QueryProcessor queryProcessor : queryProcessors) {
for (QueryResultsContainer resultsProvider : queryProcessor.getResultContainers()) {
ResultSetViewer rsv = resultsProvider.getResultSetController();
if (rsv != null) {
if (executionContext == null) {
rsv.setStatus(CoreMessages.editors_sql_status_not_connected_to_database);
} else {
rsv.setStatus(CoreMessages.editors_sql_staus_connected_to + executionContext.getDataSource().getContainer().getName() + "'"); //$NON-NLS-2$
}
if (curResultsContainer != null) {
ResultSetViewer rsv = curResultsContainer.getResultSetController();
if (rsv != null) {
if (executionContext == null) {
rsv.setStatus(CoreMessages.editors_sql_status_not_connected_to_database);
} else {
rsv.setStatus(CoreMessages.editors_sql_staus_connected_to + executionContext.getDataSource().getContainer().getName() + "'"); //$NON-NLS-2$
}
}
}
Expand Down

2 comments on commit 8d515cb

@r-richmond
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was your 7,000th commit. Just thought I'd take the time to point that out and thank you for the great tool.

@serge-rider
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, thanks for noticing 👍
I'm going to celebrate this somehow :)

Please sign in to comment.