public class IndexNotReadyException extends java.lang.RuntimeException implements ExceptionWithAttachments
AnAction.actionPerformed(com.intellij.openapi.actionSystem.AnActionEvent)
is in stack trace,
consider making the action not implement DumbAware
.
DumbAware
action, having got this exception, may just notify the user that the requested activity is not possible while
indexing is in progress. It can be done via a dialog (see Messages
) or a status bar balloon
(see DumbService.showDumbModeNotification(String)
, ActionUtil.showDumbModeWarning(com.intellij.openapi.actionSystem.AnActionEvent...)
).
DumbService.smartInvokeLater(Runnable)
. Note that this 'later' can be very late, several minutes may pass. So if that code
involves user interaction, DumbService.smartInvokeLater(Runnable)
should probably not be used to avoid dialogs popping out of the blue.
DumbService.runReadActionInSmartMode(Computable)
.
DumbService.runWithAlternativeResolveEnabled(ThrowableRunnable)
or similar.
DumbService.completeJustSubmittedTasks()
before performing
those index queries.
DumbService.isDumb()
checks where necessary.
DumbService
,
DumbAware
,
Serialized FormModifier and Type | Method and Description |
---|---|
static IndexNotReadyException |
create() |
static IndexNotReadyException |
create(java.lang.Throwable startTrace) |
Attachment [] |
getAttachments() |
public Attachment [] getAttachments()
getAttachments
in interface ExceptionWithAttachments
public static IndexNotReadyException create()
public static IndexNotReadyException create(java.lang.Throwable startTrace)