1 19 20 package org.netbeans.modules.java.editor.hyperlink; 21 22 import javax.swing.text.Document ; 23 import org.netbeans.lib.editor.hyperlink.spi.HyperlinkProvider; 24 import org.netbeans.modules.editor.java.GoToSupport; 25 26 35 public final class JavaHyperlinkProvider implements HyperlinkProvider { 36 37 38 public JavaHyperlinkProvider() { 39 } 40 41 public void performClickAction(Document doc, final int offset) { 42 GoToSupport.goTo(doc, offset, false); 43 } 44 45 public boolean isHyperlinkPoint(Document doc, int offset) { 46 return getHyperlinkSpan(doc, offset) != null; 47 } 48 49 public int[] getHyperlinkSpan(Document doc, int offset) { 50 return GoToSupport.getIdentifierSpan(doc, offset, null); 51 } 52 53 } 54 | Popular Tags |