mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
catch INRE (EA-36351)
This commit is contained in:
@@ -38,6 +38,7 @@ import com.intellij.openapi.keymap.KeymapUtil;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.progress.Task;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.IndexNotReadyException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
@@ -407,6 +408,9 @@ public class FindUsagesManager implements JDOMExternalizable {
|
||||
try {
|
||||
searcher.processElementUsages(element, processor, options);
|
||||
}
|
||||
catch (IndexNotReadyException e) {
|
||||
DumbService.getInstance(element.getProject()).showDumbModeNotification("Find usages is not available during indexing");
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
|
||||
@@ -221,9 +221,13 @@ public class DumbServiceImpl extends DumbService {
|
||||
|
||||
@Override
|
||||
public void showDumbModeNotification(final String message) {
|
||||
final IdeFrame ideFrame = WindowManager.getInstance().getIdeFrame(myProject);
|
||||
StatusBarEx statusBar = (StatusBarEx)ideFrame.getStatusBar();
|
||||
statusBar.notifyProgressByBalloon(MessageType.WARNING, message, null, null);
|
||||
UIUtil.invokeLaterIfNeeded(new Runnable() {
|
||||
public void run() {
|
||||
final IdeFrame ideFrame = WindowManager.getInstance().getIdeFrame(myProject);
|
||||
StatusBarEx statusBar = (StatusBarEx)ideFrame.getStatusBar();
|
||||
statusBar.notifyProgressByBalloon(MessageType.WARNING, message, null, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static final Ref<CacheUpdateRunner> NULL_ACTION = new Ref<CacheUpdateRunner>(null);
|
||||
|
||||
Reference in New Issue
Block a user