}
public void removeResultTab(ExecutionResult executionResult) {
try {
canScrollToSource = false;
ExecutionResultForm resultComponent = executionResult.getResultPanel();
TabInfo tabInfo = resultTabs.findInfo(resultComponent.getComponent());
if (resultTabs.getTabs().contains(tabInfo)) {
resultTabs.removeTab(tabInfo);
if (executionResult instanceof StatementExecutionResult) {
StatementExecutionResult statementExecutionResult = (StatementExecutionResult) executionResult;
StatementExecutionInput executionInput = statementExecutionResult.getExecutionInput();
if (executionInput != null && !executionInput.isDisposed()) {
DBLanguageFile file = executionInput.getExecutablePsiElement().getFile();
DocumentUtil.refreshEditorAnnotations(file);
}
}
resultComponent.dispose();
}
if (getTabCount() == 0) {
ExecutionManager.getInstance(project).hideExecutionConsole();
}