Class JavaLinkGenerator

java.lang.Object
org.fife.rsta.ac.java.JavaLinkGenerator
All Implemented Interfaces:
org.fife.ui.rsyntaxtextarea.LinkGenerator

class JavaLinkGenerator extends Object implements 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
  • Field Details

  • Constructor Details

  • 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:
      isLinkAtOffset in interface org.fife.ui.rsyntaxtextarea.LinkGenerator