public abstract class GotoTargetHandler extends java.lang.Object implements CodeInsightActionHandler
Modifier and Type | Class and Description |
---|---|
static interface |
GotoTargetHandler.AdditionalAction |
static class |
GotoTargetHandler.GotoData |
Constructor and Description |
---|
GotoTargetHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
chooseFromAmbiguousSources(Editor editor,
PsiFile file,
Consumer<? super GotoTargetHandler.GotoData> successCallback) |
protected java.util.Comparator<PsiElement> |
createComparator(GotoTargetHandler.GotoData gotoData) |
static PsiElementListCellRenderer |
createRenderer(GotoTargetHandler.GotoData gotoData,
PsiElement eachTarget) |
protected java.lang.String |
getAdText(PsiElement source,
int length) |
protected java.lang.String |
getChooserTitle(PsiElement sourceElement,
java.lang.String name,
int length)
Deprecated.
|
protected java.lang.String |
getChooserTitle(PsiElement sourceElement,
java.lang.String name,
int length,
boolean finished) |
protected abstract java.lang.String |
getFeatureUsedKey() |
protected java.lang.String |
getFindUsagesTitle(PsiElement sourceElement,
java.lang.String name,
int length) |
protected abstract java.lang.String |
getNotFoundMessage(Project project,
Editor editor,
PsiFile file) |
protected PsiElementListCellRenderer |
getRenderer(java.lang.Object value,
GotoTargetHandler.GotoData gotoData) |
protected abstract GotoTargetHandler.GotoData |
getSourceAndTargetElements(Editor editor,
PsiFile file) |
void |
invoke(Project project,
Editor editor,
PsiFile file) |
protected void |
navigateToElement(Navigatable descriptor) |
protected boolean |
navigateToElement(PsiElement target) |
protected boolean |
shouldSortTargets() |
boolean |
startInWriteAction()
Indicate whether this action should be invoked inside write action.
|
protected boolean |
useEditorFont() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementToMakeWritable
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 void invoke(Project project, Editor editor, PsiFile file)
invoke
in interface CodeInsightActionHandler
protected void chooseFromAmbiguousSources(Editor editor, PsiFile file, Consumer<? super GotoTargetHandler.GotoData> successCallback)
protected abstract java.lang.String getFeatureUsedKey()
protected boolean useEditorFont()
protected abstract GotoTargetHandler.GotoData getSourceAndTargetElements(Editor editor, PsiFile file)
protected PsiElementListCellRenderer getRenderer(java.lang.Object value, GotoTargetHandler.GotoData gotoData)
protected java.util.Comparator<PsiElement> createComparator(GotoTargetHandler.GotoData gotoData)
public static PsiElementListCellRenderer createRenderer(GotoTargetHandler.GotoData gotoData, PsiElement eachTarget)
protected boolean navigateToElement(PsiElement target)
protected void navigateToElement(Navigatable descriptor)
protected boolean shouldSortTargets()
@Deprecated protected java.lang.String getChooserTitle(PsiElement sourceElement, java.lang.String name, int length)
protected java.lang.String getChooserTitle(PsiElement sourceElement, java.lang.String name, int length, boolean finished)
protected java.lang.String getFindUsagesTitle(PsiElement sourceElement, java.lang.String name, int length)
protected abstract java.lang.String getNotFoundMessage(Project project, Editor editor, PsiFile file)
protected java.lang.String getAdText(PsiElement source, int length)