提交 55b31ef5 编写于 作者: S Serge Rider

IDEA project update

上级 2b353c60
......@@ -1007,17 +1007,19 @@ public class ResultSetViewer extends Viewer
@Override
public <T> T getAdapter(Class<T> adapter)
{
if (UIUtils.hasFocus(filtersPanel)) {
T result = filtersPanel.getAdapter(adapter);
if (result != null) {
return result;
}
} else if (UIUtils.hasFocus(panelFolder)) {
IResultSetPanel visiblePanel = getVisiblePanel();
if (visiblePanel instanceof IAdaptable) {
T adapted = ((IAdaptable) visiblePanel).getAdapter(adapter);
if (adapted != null) {
return adapted;
if (UIUtils.isUIThread()) {
if (UIUtils.hasFocus(filtersPanel)) {
T result = filtersPanel.getAdapter(adapter);
if (result != null) {
return result;
}
} else if (UIUtils.hasFocus(panelFolder)) {
IResultSetPanel visiblePanel = getVisiblePanel();
if (visiblePanel instanceof IAdaptable) {
T adapted = ((IAdaptable) visiblePanel).getAdapter(adapter);
if (adapted != null) {
return adapted;
}
}
}
}
......
......@@ -1100,6 +1100,10 @@ public class UIUtils {
}
}
public static boolean isUIThread() {
return Display.getDefault().getThread() == Thread.currentThread();
}
/**
* Determine whether this control or any of it's child has focus
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册