Class JavaLinkGenerator
java.lang.Object
org.fife.rsta.ac.java.JavaLinkGenerator
- All Implemented Interfaces:
org.fife.ui.rsyntaxtextarea.LinkGenerator
Checks for hyperlink-able tokens under the mouse position when Ctrl is
pressed (Cmd on OS X). Currently this class only checks for accessible
members in the current file only (e.g. no members in super classes, no other
classes on the classpath, etc.). So naturally, there is a lot of room for
improvement. IDE-style applications, for example, would want to check
for members in super-classes, and open their source on click events.
- Version:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classThe result of checking whether a region of code under the mouse is possibly link-able. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckForLinkableToken(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea, int offs) Checks if the token at the specified offset is possibly a "click-able" region.org.fife.ui.rsyntaxtextarea.LinkGeneratorResultisLinkAtOffset(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea, int offs)
-
Field Details
-
jls
-
-
Constructor Details
-
JavaLinkGenerator
JavaLinkGenerator(JavaLanguageSupport jls)
-
-
Method Details
-
checkForLinkableToken
private JavaLinkGenerator.IsLinkableCheckResult checkForLinkableToken(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea, int offs) Checks if the token at the specified offset is possibly a "click-able" region.- Parameters:
textArea- The text area.offs- The offset, presumably at the mouse position.- Returns:
- A result object.
-
isLinkAtOffset
public org.fife.ui.rsyntaxtextarea.LinkGeneratorResult isLinkAtOffset(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea, int offs) - Specified by:
isLinkAtOffsetin interfaceorg.fife.ui.rsyntaxtextarea.LinkGenerator
-