Package org.eclipse.jface.text.hyperlink
Class URLHyperlink
- java.lang.Object
-
- org.eclipse.jface.text.hyperlink.URLHyperlink
-
- All Implemented Interfaces:
IHyperlink
public class URLHyperlink extends java.lang.Object implements IHyperlink
URL hyperlink.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description URLHyperlink(IRegion region, java.lang.String urlString)Creates a new URL hyperlink.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IRegiongetHyperlinkRegion()The region covered by this type of hyperlink.java.lang.StringgetHyperlinkText()Optional text for this hyperlink.java.lang.StringgetTypeLabel()Optional label for this type of hyperlink.java.lang.StringgetURLString()Returns the URL string of this hyperlink.voidopen()Opens the given hyperlink.
-
-
-
Constructor Detail
-
URLHyperlink
public URLHyperlink(IRegion region, java.lang.String urlString)
Creates a new URL hyperlink.- Parameters:
region- the regionurlString- the URL string
-
-
Method Detail
-
getHyperlinkRegion
public IRegion getHyperlinkRegion()
Description copied from interface:IHyperlinkThe region covered by this type of hyperlink.- Specified by:
getHyperlinkRegionin interfaceIHyperlink- Returns:
- the hyperlink region
-
open
public void open()
Description copied from interface:IHyperlinkOpens the given hyperlink.- Specified by:
openin interfaceIHyperlink
-
getTypeLabel
public java.lang.String getTypeLabel()
Description copied from interface:IHyperlinkOptional label for this type of hyperlink.This type label can be used by
IHyperlinkPresenters which show several hyperlinks at once.- Specified by:
getTypeLabelin interfaceIHyperlink- Returns:
- the type label or
nullif none
-
getHyperlinkText
public java.lang.String getHyperlinkText()
Description copied from interface:IHyperlinkOptional text for this hyperlink.This can be used in situations where there are several targets for the same hyperlink location.
- Specified by:
getHyperlinkTextin interfaceIHyperlink- Returns:
- the text or
nullif none
-
getURLString
public java.lang.String getURLString()
Returns the URL string of this hyperlink.- Returns:
- the URL string
- Since:
- 3.2
-
-