public final class Bookmark extends java.lang.Object implements Navigatable, java.lang.Comparable<Bookmark>
Constructor and Description |
---|
Bookmark(java.lang.String url,
int line,
java.lang.String description) |
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(Bookmark o) |
RangeHighlighter |
createHighlighter(MarkupModelEx markup) |
static java.awt.Font |
getBookmarkFont() |
java.lang.String |
getDescription() |
Document |
getDocument()
Deprecated.
|
VirtualFile |
getFile() |
javax.swing.Icon |
getIcon() |
int |
getLine() |
char |
getMnemonic() |
java.lang.String |
getQualifiedName() |
boolean |
isValid() |
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
void |
release() |
void |
setDescription(java.lang.String description) |
void |
setMnemonic(char mnemonic) |
java.lang.String |
toString() |
public Bookmark(java.lang.String url, int line, java.lang.String description)
public static java.awt.Font getBookmarkFont()
public int compareTo(Bookmark o)
compareTo
in interface java.lang.Comparable<Bookmark>
public RangeHighlighter createHighlighter(MarkupModelEx markup)
@Deprecated public Document getDocument()
public void release()
public javax.swing.Icon getIcon()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public char getMnemonic()
public void setMnemonic(char mnemonic)
public VirtualFile getFile()
public boolean isValid()
public boolean canNavigate()
Navigatable
Navigatable.canNavigateToSource()
returns true
.
We assume that this method should return true
in such case,
so implement this method respectively.canNavigate
in interface Navigatable
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.canNavigateToSource
in interface Navigatable
false
if navigation to source is not possible for any reason.public void navigate(boolean requestFocus)
Navigatable
navigate
in interface Navigatable
requestFocus
- true
if focus requesting is necessarypublic int getLine()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getQualifiedName()