mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
explicit assertion for starting find usages from within write action
This commit is contained in:
@@ -128,6 +128,9 @@ public class UsageViewManagerImpl extends UsageViewManager {
|
||||
@NotNull final UsageViewPresentation presentation,
|
||||
@NotNull final FindUsagesProcessPresentation processPresentation,
|
||||
@Nullable final UsageViewStateListener listener) {
|
||||
if (ApplicationManager.getApplication().isWriteAccessAllowed()) {
|
||||
throw new IllegalStateException("Can't start find usages from under write action. Please consider Application.invokeLater() it instead.");
|
||||
}
|
||||
final SearchScope searchScopeToWarnOfFallingOutOf = getMaxSearchScopeToWarnOfFallingOutOf(searchFor);
|
||||
final AtomicReference<UsageViewImpl> usageViewRef = new AtomicReference<>();
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
Reference in New Issue
Block a user