public static class PositionManagerImpl.ClsSourcePosition extends SourcePosition
Constructor and Description |
---|
ClsSourcePosition(SourcePosition delegate,
int originalLine) |
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).
|
boolean |
equals(java.lang.Object o) |
PsiElement |
getElementAt() |
PsiFile |
getFile() |
int |
getLine() |
int |
getOffset() |
SourcePosition |
mapDelegate(SourcePosition original) |
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
Editor |
openEditor(boolean requestFocus) |
createFromElement, createFromLine, createFromLineComputable, createFromOffset
public ClsSourcePosition(SourcePosition delegate, int originalLine)
public SourcePosition mapDelegate(SourcePosition original)
public PsiFile getFile()
getFile
in class SourcePosition
public PsiElement getElementAt()
getElementAt
in class SourcePosition
public int getLine()
getLine
in class SourcePosition
public int getOffset()
getOffset
in class SourcePosition
public Editor openEditor(boolean requestFocus)
openEditor
in class SourcePosition
public boolean equals(java.lang.Object o)
equals
in class SourcePosition
public void navigate(boolean requestFocus)
Navigatable
requestFocus
- true
if focus requesting is necessarypublic boolean canNavigate()
Navigatable
Navigatable.canNavigateToSource()
returns true
.
We assume that this method should return true
in such case,
so implement this method respectively.false
if navigation is not possible for any reason.public boolean canNavigateToSource()
Navigatable
false
.
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.false
if navigation to source is not possible for any reason.