public class JavaFindUsagesProvider extends java.lang.Object implements FindUsagesProvider
Constructor and Description |
---|
JavaFindUsagesProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
canFindUsagesFor(PsiElement element)
Checks if it makes sense to search for usages of the specified element.
|
static java.lang.String |
getDefaultPackageName() |
java.lang.String |
getDescriptiveName(PsiElement element)
Returns an expanded user-visible name of the specified element, shown in the "Find Usages"
dialog.
|
java.lang.String |
getHelpId(PsiElement element)
Returns the ID of the help topic which is shown when the specified element is selected
in the "Find Usages" dialog.
|
java.lang.String |
getNodeText(PsiElement element,
boolean useFullName)
Returns the text representing the specified PSI element in the Find Usages tree.
|
static java.lang.String |
getPackageName(PsiDirectory directory,
boolean includeRootDir) |
static java.lang.String |
getPackageName(PsiPackage psiPackage) |
static java.lang.String |
getRootDirectoryForPackage(PsiDirectory directory) |
java.lang.String |
getType(PsiElement element)
Returns the user-visible type of the specified element, shown in the "Find Usages"
dialog (for example, "class" or "variable").
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWordsScanner
public boolean canFindUsagesFor(PsiElement element)
FindUsagesProvider
canFindUsagesFor
in interface FindUsagesProvider
element
- the element for which usages are searched.FindManager.canFindUsages(PsiElement)
public java.lang.String getHelpId(PsiElement element)
FindUsagesProvider
getHelpId
in interface FindUsagesProvider
element
- the element for which the help topic is requested.public java.lang.String getType(PsiElement element)
FindUsagesProvider
getType
in interface FindUsagesProvider
element
- the element for which the type is requested.public java.lang.String getDescriptiveName(PsiElement element)
FindUsagesProvider
getDescriptiveName
in interface FindUsagesProvider
element
- the element for which the name is requested.public java.lang.String getNodeText(PsiElement element, boolean useFullName)
FindUsagesProvider
getNodeText
in interface FindUsagesProvider
element
- the element for which the node text is requested.useFullName
- if true, the returned text should use fully qualified namespublic static java.lang.String getPackageName(PsiDirectory directory, boolean includeRootDir)
public static java.lang.String getRootDirectoryForPackage(PsiDirectory directory)
public static java.lang.String getPackageName(PsiPackage psiPackage)
public static java.lang.String getDefaultPackageName()