Package org.fife.rsta.ac.java
Class JavaLinkGenerator
- java.lang.Object
-
- org.fife.rsta.ac.java.JavaLinkGenerator
-
- All Implemented Interfaces:
org.fife.ui.rsyntaxtextarea.LinkGenerator
class JavaLinkGenerator extends java.lang.Object implements org.fife.ui.rsyntaxtextarea.LinkGeneratorChecks 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 Classes Modifier and Type Class Description private static classJavaLinkGenerator.IsLinkableCheckResultThe result of checking whether a region of code under the mouse is possibly link-able.
-
Field Summary
Fields Modifier and Type Field Description private JavaLanguageSupportjls
-
Constructor Summary
Constructors Constructor Description JavaLinkGenerator(JavaLanguageSupport jls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private JavaLinkGenerator.IsLinkableCheckResultcheckForLinkableToken(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 Detail
-
jls
private JavaLanguageSupport jls
-
-
Constructor Detail
-
JavaLinkGenerator
JavaLinkGenerator(JavaLanguageSupport jls)
-
-
Method Detail
-
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
-
-