Package org.eclipse.jface.text.hyperlink
Class MultipleHyperlinkPresenter
java.lang.Object
org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter
org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter
- All Implemented Interfaces:
EventListener
,IHyperlinkPresenter
,IHyperlinkPresenterExtension
,IHyperlinkPresenterExtension2
,IDocumentListener
,ITextInputListener
,ITextPresentationListener
,ITextViewerLifecycle
,IPropertyChangeListener
public class MultipleHyperlinkPresenter
extends DefaultHyperlinkPresenter
implements IHyperlinkPresenterExtension2
A hyperlink presenter capable of showing multiple hyperlinks in a hover.
- Since:
- 3.4
-
Field Summary
Fields inherited from class org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter
HYPERLINK_COLOR, HYPERLINK_COLOR_SYSTEM_DEFAULT
-
Constructor Summary
ConstructorDescriptionCreates a new multiple hyperlink presenter which usesDefaultHyperlinkPresenter.HYPERLINK_COLOR
to read the color from the given preference store.MultipleHyperlinkPresenter
(RGB color) Creates a new multiple hyperlink presenter. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tells whether the currently shown hyperlinks can be hidden.boolean
Tells whether this presenter is able to handle more than one hyperlink.void
Tells this hyperlink presenter to hide the hyperlinks requested to be shown byIHyperlinkPresenter.showHyperlinks(IHyperlink[])
.void
install
(ITextViewer viewer) Installs this hyperlink presenter on the given text viewer.void
showHyperlinks
(IHyperlink[] hyperlinks) Tells this hyperlink presenter to show the given hyperlinks on the installed text viewer.void
showHyperlinks
(IHyperlink[] activeHyperlinks, boolean takesFocusWhenVisible) Tells this hyperlink presenter to show the given hyperlinks on the installed text viewer and specifies whether or not the control takes focus when visible.void
Uninstalls this hyperlink presenter.Methods inherited from class org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter
applyTextPresentation, documentAboutToBeChanged, documentChanged, inputDocumentAboutToBeChanged, inputDocumentChanged, propertyChange, setColor
-
Constructor Details
-
MultipleHyperlinkPresenter
Creates a new multiple hyperlink presenter which usesDefaultHyperlinkPresenter.HYPERLINK_COLOR
to read the color from the given preference store.- Parameters:
store
- the preference store
-
MultipleHyperlinkPresenter
Creates a new multiple hyperlink presenter.- Parameters:
color
- the hyperlink color, to be disposed by the caller
-
-
Method Details
-
install
Description copied from interface:IHyperlinkPresenter
Installs this hyperlink presenter on the given text viewer.- Specified by:
install
in interfaceIHyperlinkPresenter
- Specified by:
install
in interfaceITextViewerLifecycle
- Overrides:
install
in classDefaultHyperlinkPresenter
- Parameters:
viewer
- the text viewer
-
uninstall
public void uninstall()Description copied from interface:IHyperlinkPresenter
Uninstalls this hyperlink presenter.- Specified by:
uninstall
in interfaceIHyperlinkPresenter
- Specified by:
uninstall
in interfaceITextViewerLifecycle
- Overrides:
uninstall
in classDefaultHyperlinkPresenter
-
canShowMultipleHyperlinks
public boolean canShowMultipleHyperlinks()Description copied from interface:IHyperlinkPresenter
Tells whether this presenter is able to handle more than one hyperlink.- Specified by:
canShowMultipleHyperlinks
in interfaceIHyperlinkPresenter
- Overrides:
canShowMultipleHyperlinks
in classDefaultHyperlinkPresenter
- Returns:
true
if this presenter can handle more than one hyperlink
-
canHideHyperlinks
public boolean canHideHyperlinks()Description copied from class:DefaultHyperlinkPresenter
Tells whether the currently shown hyperlinks can be hidden.- Specified by:
canHideHyperlinks
in interfaceIHyperlinkPresenterExtension
- Overrides:
canHideHyperlinks
in classDefaultHyperlinkPresenter
- Returns:
true
if the hyperlink manager can hide the current hyperlinks
-
hideHyperlinks
public void hideHyperlinks()Description copied from interface:IHyperlinkPresenter
Tells this hyperlink presenter to hide the hyperlinks requested to be shown byIHyperlinkPresenter.showHyperlinks(IHyperlink[])
.- Specified by:
hideHyperlinks
in interfaceIHyperlinkPresenter
- Overrides:
hideHyperlinks
in classDefaultHyperlinkPresenter
-
showHyperlinks
Description copied from interface:IHyperlinkPresenter
Tells this hyperlink presenter to show the given hyperlinks on the installed text viewer.- Specified by:
showHyperlinks
in interfaceIHyperlinkPresenter
- Overrides:
showHyperlinks
in classDefaultHyperlinkPresenter
- Parameters:
hyperlinks
- the hyperlinks to show
-
showHyperlinks
Tells this hyperlink presenter to show the given hyperlinks on the installed text viewer and specifies whether or not the control takes focus when visible.- Specified by:
showHyperlinks
in interfaceIHyperlinkPresenterExtension2
- Parameters:
activeHyperlinks
- the hyperlinks to showtakesFocusWhenVisible
-true
if the control takes the focus when visible,false
otherwise. Will be ignored if there is only one hyperlink to show.- Since:
- 3.7
-