public class GotoTypeDeclarationAction extends BaseCodeInsightAction implements CodeInsightActionHandler, DumbAware
AnAction.TransparentUpdate
ACTIONS_KEY, EMPTY_ARRAY
Constructor and Description |
---|
GotoTypeDeclarationAction() |
Modifier and Type | Method and Description |
---|---|
static PsiElement |
findSymbolType(Editor editor,
int offset) |
static PsiElement [] |
findSymbolTypes(Editor editor,
int offset) |
protected CodeInsightActionHandler |
getHandler() |
void |
invoke(Project project,
Editor editor,
PsiFile file) |
protected boolean |
isValidForLookup() |
boolean |
startInWriteAction()
Indicate whether this action should be invoked inside write action.
|
void |
update(AnActionEvent event)
Updates the state of the action.
|
getBaseEditor, getEditor, getInjectedEditor, getInjectedEditor
actionPerformed, actionPerformedImpl, beforeActionPerformedUpdate, getCommandName, isValidForFile, update, update
addTextOverride, applyTextOverride, copyFrom, copyShortcutFrom, displayTextInToolbar, getEventProject, getShortcutSet, getTemplatePresentation, getTemplateText, isDefaultIcon, isEnabledInModalContext, isInInjectedContext, isTransparentUpdate, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, setDefaultIcon, setEnabledInModalContext, setInjectedContext, setShortcutSet, startInTransaction, toString, unregisterCustomShortcutSet, useSmallerFontForTextInToolbar
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getElementToMakeWritable
isDumbAware
protected CodeInsightActionHandler getHandler()
getHandler
in class CodeInsightAction
protected boolean isValidForLookup()
isValidForLookup
in class BaseCodeInsightAction
public void update(AnActionEvent event)
AnAction
AnAction.actionPerformed(AnActionEvent)
method and notify
the user that action cannot be executed if it's the case.
If the action is added to a toolbar, its "update" can be called twice a second, but only if there was
any user activity or a focus transfer. If your action's availability is changed
in absence of any of these events, please call ActivityTracker.getInstance().inc()
to notify
action subsystem to update all toolbar actions when your subsystem's determines that its actions' visibility might be affected.update
in class BaseCodeInsightAction
event
- Carries information on the invocation place and data availablepublic void invoke(Project project, Editor editor, PsiFile file)
invoke
in interface CodeInsightActionHandler
public boolean startInWriteAction()
WriteActionAware
false
if e.g. modal dialog is shown inside the action.
If false
is returned the action itself is responsible for starting write action
when needed, by calling Application.runWriteAction(Runnable)
.startInWriteAction
in interface WriteActionAware
true
if the action requires a write action (default), false
otherwise.public static PsiElement findSymbolType(Editor editor, int offset)
public static PsiElement [] findSymbolTypes(Editor editor, int offset)