提交 9fc0f23f 编写于 作者: S Serge Rider

SQL editor tabs order fix (Log & output always in the tail).

Plan action removed
上级 bbcb5f32
......@@ -476,6 +476,7 @@ public class SQLEditor extends SQLEditorBase implements
{
ToolBar rsToolbar = new ToolBar(resultTabs, SWT.HORIZONTAL | SWT.RIGHT | SWT.WRAP);
/*
ToolItem planItem = new ToolItem(rsToolbar, SWT.NONE);
planItem.setText("Plan");
planItem.setImage(IMG_EXPLAIN_PLAN);
......@@ -492,6 +493,7 @@ public class SQLEditor extends SQLEditorBase implements
}
}
});
*/
final ToolItem logItem = new ToolItem(rsToolbar, SWT.CHECK);
logItem.setText("Log");
......@@ -540,29 +542,6 @@ public class SQLEditor extends SQLEditorBase implements
// Create results tab
createQueryProcessor(true);
/*
{
// Create extra tabs
CTabItem item = new CTabItem(resultTabs, SWT.NONE);
item.setControl(planView.getControl());
item.setText(CoreMessages.editors_sql_explain_plan);
item.setImage(IMG_EXPLAIN_PLAN);
item.setData(planView);
item = new CTabItem(resultTabs, SWT.NONE);
item.setControl(logViewer);
item.setText(CoreMessages.editors_sql_execution_log);
item.setImage(IMG_LOG);
item.setData(logViewer);
item = new CTabItem(resultTabs, SWT.NONE);
item.setControl(outputViewer);
item.setText(CoreMessages.editors_sql_output);
item.setImage(IMG_OUTPUT);
item.setData(outputViewer);
}
*/
{
MenuManager menuMgr = new MenuManager();
Menu menu = menuMgr.createContextMenu(resultTabs);
......@@ -1576,8 +1555,14 @@ public class SQLEditor extends SQLEditorBase implements
this.resultSetNumber = resultSetNumber;
viewer = new ResultSetViewer(resultTabs, getSite(), this);
//boolean firstResultSet = queryProcessors.isEmpty();
int tabIndex = resultTabs.getItemCount();
int tabCount = resultTabs.getItemCount();
int tabIndex = 0;
for (int i = tabCount; i > 0; i--) {
if (resultTabs.getItem(i - 1).getData() instanceof QueryResultsContainer) {
tabIndex = i;
break;
}
}
tabItem = new CTabItem(resultTabs, SWT.NONE, tabIndex);
int queryIndex = queryProcessors.indexOf(queryProcessor);
String tabName = getResultsTabName(resultSetNumber, queryIndex, null);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册