Registering an Action that is invoked on CMD+click
Answered
Hi all
I am trying to create a plugin that adds CMD+click (go to declaration/implementation/show usage, etc) action handler in XML documents that are having a certain root tag, when one CMD+clicks the value of a tag.
Is there a predefined action already that i can override or do I have to take a different path?
Cheers
Yanick
Please sign in to leave a comment.
Hi Yanick,
'Go To declaration' works with PsiReferences, it searches for the references in the element under caret, calls 'resolve' method and navigates to the returned PsiElement. So you need to provide a PsiReference implementation for xml tags in your plugin, look at FxmlReferencesContributor for example.