@Override public void run(ITextSelection selection) { if (!checkEnabled(selection)) return; IRegion region= new Region(selection.getOffset(), selection.getLength()); PropertyKeyHyperlinkDetector detector= new PropertyKeyHyperlinkDetector(); detector.setContext(fEditor); IHyperlink[]hyperlinks= detector.detectHyperlinks(fEditor.internalGetSourceViewer(), region, false); if (hyperlinks != null && hyperlinks.length == 1) hyperlinks[0].open(); } }
public void run(ITextSelection selection) { if (!checkEnabled(selection)) return; IRegion region= new Region(selection.getOffset(), selection.getLength()); PropertyKeyHyperlinkDetector detector= new PropertyKeyHyperlinkDetector(); detector.setContext(fEditor); IHyperlink[]hyperlinks= detector.detectHyperlinks(fEditor.internalGetSourceViewer(), region, false); if (hyperlinks != null && hyperlinks.length == 1) hyperlinks[0].open(); } }
@Override public void run(ITextSelection selection) { if (!checkEnabled(selection)) return; IRegion region= new Region(selection.getOffset(), selection.getLength()); PropertyKeyHyperlinkDetector detector= new PropertyKeyHyperlinkDetector(); detector.setContext(fEditor); IHyperlink[]hyperlinks= detector.detectHyperlinks(fEditor.internalGetSourceViewer(), region, false); if (hyperlinks != null && hyperlinks.length == 1) hyperlinks[0].open(); } }
FindReplaceDocumentAdapter finder= new FindReplaceDocumentAdapter(document); PropertyKeyHyperlinkDetector detector= new PropertyKeyHyperlinkDetector(); detector.setContext(editor); String key= PropertyFileDocumentModel.unwindEscapeChars(fKeyName); int offset= document.getLength() - 1;
FindReplaceDocumentAdapter finder= new FindReplaceDocumentAdapter(document); PropertyKeyHyperlinkDetector detector= new PropertyKeyHyperlinkDetector(); detector.setContext(editor); String key= PropertyFileDocumentModel.escape(keyName, false); int offset= document.getLength() - 1;
FindReplaceDocumentAdapter finder= new FindReplaceDocumentAdapter(document); PropertyKeyHyperlinkDetector detector= new PropertyKeyHyperlinkDetector(); detector.setContext(editor); String key= PropertyFileDocumentModel.escape(keyName, false); int offset= document.getLength() - 1;