mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix leak in ClassSearchEverywhereContributor
GitOrigin-RevId: eb85e7ad753c761dc0e7184734b4492d28ee8a0a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b030aa407f
commit
10884998f7
@@ -34,22 +34,22 @@ public class GotoClassAction extends SearchEverywhereBaseAction implements DumbA
|
||||
if (project == null) return;
|
||||
|
||||
boolean dumb = DumbService.isDumb(project);
|
||||
if (!dumb){
|
||||
if (!dumb || isContributorDumbAware(e)) {
|
||||
showInSearchEverywherePopup(ClassSearchEverywhereContributor.class.getSimpleName(), e, true, true);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
invokeGoToFile(project, e);
|
||||
}
|
||||
}
|
||||
|
||||
ClassSearchEverywhereContributor contributor = new ClassSearchEverywhereContributor(e);
|
||||
private static boolean isContributorDumbAware(AnActionEvent e) {
|
||||
ClassSearchEverywhereContributor contributor = null;
|
||||
try {
|
||||
if (contributor.isDumbAware()) {
|
||||
showInSearchEverywherePopup(ClassSearchEverywhereContributor.class.getSimpleName(), e, true, true);
|
||||
}
|
||||
else {
|
||||
invokeGoToFile(project, e);
|
||||
}
|
||||
contributor = new ClassSearchEverywhereContributor(e);
|
||||
return contributor.isDumbAware();
|
||||
}
|
||||
finally {
|
||||
Disposer.dispose(contributor);
|
||||
if (contributor != null) Disposer.dispose(contributor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user