提交 61aa9ef0 编写于 作者: R RiedNyko

Added_option_to_open_selected_part#4978 fix3

Former-commit-id: a998eb04
上级 ae408e98
......@@ -44,22 +44,22 @@ public class SQLSourceViewer<T extends DBPScriptObject & DBSObject> extends SQLE
private IAction OPEN_CONSOLE_ACTION = new Action("Open in SQL console",
DBeaverIcons.getImageDescriptor(UIIcon.SQL_CONSOLE)) {
@Override
public void run() {
String sqlText = getDocument().get();
ISelection selection = getSelectionProvider().getSelection();
if (selection instanceof TextSelection) {
if (((TextSelection) selection).getLength() > 0) {
sqlText = ((TextSelection) selection).getText();
}
}
final DBPDataSource dataSource = getDataSource();
OpenHandler.openSQLConsole(
UIUtils.getActiveWorkbenchWindow(),
dataSource == null ? null : dataSource.getContainer(),
"Source",
sqlText
);
}
public void run() {
String sqlText = getDocument().get();
ISelection selection = getSelectionProvider().getSelection();
if (selection instanceof TextSelection) {
if (((TextSelection) selection).getLength() > 0) {
sqlText = ((TextSelection) selection).getText();
}
}
final DBPDataSource dataSource = getDataSource();
OpenHandler.openSQLConsole(
UIUtils.getActiveWorkbenchWindow(),
dataSource == null ? null : dataSource.getContainer(),
"Source",
sqlText
);
}
};
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册