public static class FindInProjectUtil.StringUsageTarget extends java.lang.Object implements ConfigurableUsageTarget, ItemPresentation, TypeSafeDataProvider
| Modifier and Type | Field and Description |
|---|---|
protected FindModel |
myFindModel |
protected Project |
myProject |
EMPTY_ARRAYEMPTY_NAVIGATION_ITEM_ARRAY| Constructor and Description |
|---|
StringUsageTarget(Project project,
FindModel findModel) |
| Modifier and Type | Method and Description |
|---|---|
void |
calcData(DataKey key,
DataSink sink) |
boolean |
canNavigate()
Indicates whether this instance supports navigation of any kind.
|
boolean |
canNavigateToSource()
Indicates whether this instance supports navigation to source (that means some kind of editor).
|
void |
findUsages()
Should open usage view and look for usages
|
javax.swing.Icon |
getIcon(boolean open)
Returns the icon representing the object.
|
java.lang.String |
getLocationString()
Returns the location of the object (for example, the package of a class).
|
java.lang.String |
getLongDescriptiveName() |
java.lang.String |
getName() |
java.lang.String |
getPresentableText()
Returns the name of the object to be presented in most renderers across the program.
|
ItemPresentation |
getPresentation() |
KeyboardShortcut |
getShortcut() |
boolean |
isValid() |
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
void |
showSettings() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindUsagesInEditor, getFiles, highlightUsages, isReadOnly, updateprotected final Project myProject
protected final FindModel myFindModel
public java.lang.String getPresentableText()
ItemPresentationgetPresentableText in interface ItemPresentationpublic java.lang.String getLongDescriptiveName()
getLongDescriptiveName in interface ConfigurableUsageTargetpublic java.lang.String getLocationString()
ItemPresentationgetLocationString in interface ItemPresentationpublic javax.swing.Icon getIcon(boolean open)
ItemPresentationgetIcon in interface ItemPresentationopen - Used to mean if open/close icons for tree renderer. No longer in use. The parameter is only there for API compatibility reason.public void findUsages()
UsageTargetfindUsages in interface UsageTargetpublic boolean isValid()
isValid in interface UsageTargetpublic java.lang.String getName()
getName in interface NavigationItempublic ItemPresentation getPresentation()
getPresentation in interface NavigationItempublic void navigate(boolean requestFocus)
Navigatablenavigate in interface NavigatablerequestFocus - true if focus requesting is necessarypublic boolean canNavigate()
NavigatableNavigatable.canNavigateToSource() returns true.
We assume that this method should return true in such case,
so implement this method respectively.canNavigate in interface Navigatablefalse if navigation is not possible for any reason.public boolean canNavigateToSource()
Navigatablefalse.
In such cases it is not recommended to do batch navigation for all navigatables
available via CommonDataKeys.NAVIGATABLE_ARRAY,
because it may lead to opening several modal dialogs.
Use OpenSourceUtil.navigate(com.intellij.pom.Navigatable...) to process such arrays correctly.canNavigateToSource in interface Navigatablefalse if navigation to source is not possible for any reason.public void showSettings()
showSettings in interface ConfigurableUsageTargetpublic KeyboardShortcut getShortcut()
getShortcut in interface ConfigurableUsageTargetpublic void calcData(DataKey key, DataSink sink)
calcData in interface TypeSafeDataProvider