提交 4789f425 编写于 作者: S serge-rider

#795 Execute commands enablement fix

上级 f4a60fc5
......@@ -55,12 +55,11 @@ public class SQLEditorPropertyTester extends PropertyTester
if (editorControl == null) {
return false;
}
boolean isFocused = editorControl.isFocusControl();
boolean hasConnection = editor.getDataSourceContainer() != null;
switch (property) {
case PROP_CAN_EXECUTE:
// Do not check hasActiveQuery - sometimes jface don't update action enablement after cursor change/typing
return hasConnection && isFocused;/* && (!"statement".equals(expectedValue) || editor.hasActiveQuery())*/
return hasConnection;/* && (!"statement".equals(expectedValue) || editor.hasActiveQuery())*/
case PROP_CAN_EXPLAIN:
return hasConnection && editor.hasActiveQuery() && DBUtils.getAdapter(DBCQueryPlanner.class, editor.getDataSource()) != null;
case PROP_CAN_NAVIGATE: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册