1 11 package org.eclipse.ui.internal.editors.text; 12 13 import org.eclipse.jface.text.IRegion; 14 import org.eclipse.jface.text.ITextViewer; 15 import org.eclipse.jface.text.hyperlink.IHyperlink; 16 17 18 23 public class URLHyperlinkDetector extends org.eclipse.jface.text.hyperlink.URLHyperlinkDetector { 24 25 28 public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) { 29 IHyperlink[] result= super.detectHyperlinks(textViewer, region, canShowMultipleHyperlinks); 30 if (result == null) 31 return null; 32 33 for (int i= 0; i < result.length; i++) { 34 org.eclipse.jface.text.hyperlink.URLHyperlink hyperlink= (org.eclipse.jface.text.hyperlink.URLHyperlink)result[i]; 35 result[i]= new URLHyperlink(hyperlink.getHyperlinkRegion(), hyperlink.getURLString()); 36 } 37 38 return result; 39 } 40 } 41 | Popular Tags |