未验证 提交 693447b7 编写于 作者: S Serge Rider 提交者: GitHub

Merge pull request #14389 from dbeaver/trimExplainTip#13070

#13070 avoid long tooltips for execution plans tabs
......@@ -2101,7 +2101,15 @@ public class SQLEditor extends SQLEditorBase implements
item.setControl(planView.getControl());
item.setText(SQLEditorMessages.editors_sql_error_execution_plan_title + " - " + maxPlanNumber);
if (sqlQuery != null) {
item.setToolTipText(sqlQuery.getText());
// Prepare query for tooltip
String preparedText = sqlQuery.getText()
.replaceAll(CommonUtils.getLineSeparator() + "\t" + CommonUtils.getLineSeparator(), "")
.replaceAll(CommonUtils.getLineSeparator() + CommonUtils.getLineSeparator(), "");
if (preparedText.length() > 300) {
item.setToolTipText(preparedText.substring(0, 300) + "...");
} else {
item.setToolTipText(preparedText);
}
}
item.setImage(IMG_EXPLAIN_PLAN);
item.setData(planView);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册