mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
handle project closing in ctrl+hover bg calculation (EA-104555)
This commit is contained in:
@@ -828,6 +828,8 @@ public class CtrlMouseHandler extends AbstractProjectComponent {
|
||||
|
||||
@Nullable
|
||||
private ReadTask.Continuation doExecute(@NotNull PsiFile file, int offset) {
|
||||
if (isTaskOutdated()) return null;
|
||||
|
||||
final Info info;
|
||||
final DocInfo docInfo;
|
||||
try {
|
||||
@@ -842,11 +844,15 @@ public class CtrlMouseHandler extends AbstractProjectComponent {
|
||||
|
||||
LOG.debug("Obtained info about element under cursor");
|
||||
return new ReadTask.Continuation(() -> {
|
||||
if (myDisposed || myEditor.isDisposed() || !myEditor.getComponent().isShowing()) return;
|
||||
if (isTaskOutdated()) return;
|
||||
showHint(info, docInfo);
|
||||
});
|
||||
}
|
||||
|
||||
private boolean isTaskOutdated() {
|
||||
return myDisposed || myProject.isDisposed() || myEditor.isDisposed() || !myEditor.getComponent().isShowing();
|
||||
}
|
||||
|
||||
private void showHint(@NotNull Info info, @NotNull DocInfo docInfo) {
|
||||
if (myDisposed || myEditor.isDisposed()) return;
|
||||
Component internalComponent = myEditor.getContentComponent();
|
||||
|
||||
Reference in New Issue
Block a user