提交 0371795d 编写于 作者: S serge-rider

#12237 Restore sash form on query/plan execute

上级 446e4a15
......@@ -1818,9 +1818,7 @@ public class SQLEditor extends SQLEditorBase implements
}
private void explainQueryPlan(SQLQuery sqlQuery) {
if (resultsSash.getMaximizedControl() != null) {
toggleResultPanel();
}
showResultsPanel();
DBCQueryPlanner planner = GeneralUtils.adapt(getDataSource(), DBCQueryPlanner.class);
DBCPlanStyle planStyle = planner.getPlanStyle();
......@@ -1838,6 +1836,15 @@ public class SQLEditor extends SQLEditorBase implements
}
}
private void showResultsPanel() {
if (resultsSash.getMaximizedControl() != null) {
toggleResultPanel();
}
if (resultsSash.isDownHidden()) {
resultsSash.showDown();
}
}
private ExplainPlanViewer getPlanView(SQLQuery sqlQuery, DBCQueryPlanner planner) {
// 1. Determine whether planner supports plan extraction
......@@ -3774,6 +3781,8 @@ public class SQLEditor extends SQLEditorBase implements
}
private void runPostExecuteActions(@Nullable SQLQueryResult result) {
showResultsPanel();
final DBCExecutionContext executionContext = getExecutionContext();
if (executionContext != null) {
// Refresh active object
......
......@@ -261,6 +261,21 @@ public class CustomSashForm extends SashForm {
downHideClicked(currentSashInfo);
}
public boolean isDownHidden() {
if (currentSashInfo == null || currentSashInfo.restoreWeight <= 0) {
return false;
}
int[] weights = getWeights();
return weights.length == 2 && weights[1] == 0;
}
public void showDown() {
if (currentSashInfo == null || currentSashInfo.restoreWeight <= 0) {
hideDown();
}
downRestoreClicked(currentSashInfo);
}
/**
* Call to set to hide right
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册