(PopupMenuEvent e)
| 261 | menu.addPopupMenuListener(new PopupMenuListener() { |
| 262 | |
| 263 | @Override |
| 264 | public void popupMenuWillBecomeVisible(PopupMenuEvent e) { |
| 265 | String referenceFile = editor.base.getPdeKeywords().getReference(getCurrentKeyword()); |
| 266 | referenceItem.setEnabled(referenceFile != null); |
| 267 | |
| 268 | int offset = textarea.getCaretPosition(); |
| 269 | org.fife.ui.rsyntaxtextarea.Token token = RSyntaxUtilities.getTokenAtOffset(textarea, offset); |
| 270 | if (token != null && token.isHyperlink()) { |
| 271 | openURLItem.setEnabled(true); |
| 272 | openURLItem.setActionCommand(token.getLexeme()); |
| 273 | } else { |
| 274 | openURLItem.setEnabled(false); |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | @Override |
| 279 | public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { |
nothing calls this directly
no test coverage detected