mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
apply fast check first to make update faster
GitOrigin-RevId: acf2bdba85abaa449f2d0e3c8001f8eec3439c13
This commit is contained in:
committed by
intellij-monorepo-bot
parent
17d0b46af3
commit
9309eaa37f
@@ -84,9 +84,11 @@ public class FindUsagesInFileAction extends AnAction implements PossiblyDumbAwar
|
||||
Boolean.TRUE.equals(dataContext.getData(CommonDataKeys.EDITOR_VIRTUAL_SPACE))) {
|
||||
return false;
|
||||
}
|
||||
if (!allTargets(dataContext).isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
return canFindUsages(project, dataContext) ||
|
||||
!allTargets(dataContext).isEmpty();
|
||||
}
|
||||
|
||||
private static boolean canFindUsages(@NotNull Project project, @NotNull DataContext dataContext) {
|
||||
Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
|
||||
if (editor == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user