public class PsiElementUsageGroupBase<T extends PsiElement & NavigationItem> extends java.lang.Object implements UsageGroup, NamedPresentably
| Constructor and Description |
|---|
PsiElementUsageGroupBase(T element) |
PsiElementUsageGroupBase(T element,
javax.swing.Icon icon) |
| Modifier and Type | Method and Description |
|---|---|
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).
|
int |
compareTo(UsageGroup o) |
boolean |
equals(java.lang.Object obj) |
T |
getElement() |
FileStatus |
getFileStatus() |
javax.swing.Icon |
getIcon(boolean isOpen) |
java.lang.String |
getPresentableName() |
java.lang.String |
getText(UsageView view) |
int |
hashCode() |
boolean |
isValid() |
void |
navigate(boolean focus)
Open editor and select/navigate to the object there if possible.
|
void |
update() |
public PsiElementUsageGroupBase(T element, javax.swing.Icon icon)
public PsiElementUsageGroupBase(T element)
public javax.swing.Icon getIcon(boolean isOpen)
getIcon in interface UsageGrouppublic T getElement()
public java.lang.String getText(UsageView view)
getText in interface UsageGrouppublic FileStatus getFileStatus()
getFileStatus in interface UsageGrouppublic boolean isValid()
isValid in interface UsageGrouppublic void navigate(boolean focus)
throws java.lang.UnsupportedOperationException
Navigatablenavigate in interface Navigatablefocus - true if focus requesting is necessaryjava.lang.UnsupportedOperationExceptionpublic 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 update()
update in interface UsageGrouppublic int compareTo(UsageGroup o)
compareTo in interface java.lang.Comparable<UsageGroup>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getPresentableName()
getPresentableName in interface NamedPresentably