提交 8f47f1a0 编写于 作者: S serge-rider

#3049 Session manager refresh fix (do not force focus change)

上级 f5fae93c
......@@ -144,6 +144,9 @@ public class SessionManagerViewer
protected void onSessionSelect(DBAServerSession session)
{
if (curSession == session) {
return;
}
curSession = session;
updateSQL();
if (session == null) {
......@@ -183,15 +186,11 @@ public class SessionManagerViewer
}
protected void updateSQL() {
try {
String text = curSession == null ? "" : CommonUtils.notEmpty(curSession.getActiveQuery());
StringEditorInput sqlInput = new StringEditorInput(sessionTable.getShell().getText(), text, true, GeneralUtils.getDefaultFileEncoding());
sqlViewer.init(subSite, sqlInput);
if (sqlViewer.getTextViewer() != null) {
sqlViewer.reloadSyntaxRules();
}
} catch (PartInitException e) {
DBUserInterface.getInstance().showError(sessionTable.getShell().getText(), null, e);
String text = curSession == null ? "" : CommonUtils.notEmpty(curSession.getActiveQuery());
StringEditorInput sqlInput = new StringEditorInput(sessionTable.getShell().getText(), text, true, GeneralUtils.getDefaultFileEncoding());
sqlViewer.setInput(sqlInput);
if (sqlViewer.getTextViewer() != null) {
sqlViewer.reloadSyntaxRules();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册