public class StructureViewElementWrapper<V extends PsiElement> extends java.lang.Object implements StructureViewTreeElement
EMPTY_ARRAY| 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).
|
StructureViewTreeElement [] |
getChildren()
Returns the list of children of the tree element.
|
ItemPresentation |
getPresentation()
Returns the presentation of the tree element.
|
V |
getValue()
Returns the data object (usually a PSI element) corresponding to the
structure view element.
|
StructureViewTreeElement |
getWrappedElement() |
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
public StructureViewTreeElement getWrappedElement()
public V getValue()
StructureViewTreeElementgetValue in interface StructureViewTreeElementpublic StructureViewTreeElement [] getChildren()
TreeElementgetChildren in interface TreeElementpublic ItemPresentation getPresentation()
TreeElementgetPresentation in interface TreeElementpublic 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.