- changed version to 2.0
Lightning Components: <ctrl+click> navigate to controller from markup file
When editing a Lightning Component's markup file (.cmp), would be nice to have feature where I could <ctrl/cmd>+click a function reference specified by {!c.methodName}
For example, in below snippet, <ctrl/cmd>+click on "handleSaveButtonClick" of {!c.handleSaveButtonClick} would open/navigate me to the controller js file of that same component bundle where that function name is defined:
<lightning:button
label="Save"
title="Save"
variant="brand"
onclick="{!c.handleSaveButtonClick}"/>
By extension, if in the js controller and click on methods of the helper argument, that would be great if the click navigation opened the helper js file too ^_^
Thanks
Comments (10)
-
repo owner -
repo owner Oh, and just to clarify what the little birdie told me, for navigation across JavaScript references in controllers, renderers, and helpers, you would need IntelliJ IDEA UE or WebStorm. That won't be available in IntelliJ IDEA CE, though navigation across references to server-side Apex controllers will work in CE (and UE/WS).
-
reporter Thanks Scott!
-
repo owner - changed status to resolved
I believe this should work in IC2, but if you find instances that don't, please just reopen and list them here.
-
Hey @RoseSilverSoftware, I'm using IC2 (2.0.1.5) with WebStorm 2018.1 and this feature isn't working for me.
-
repo owner Hey, Brad. I'll take a look. There are currently some missing references and code completions in Lightning, in particular from markup to JavaScript. You may be hitting one of those. Now that I have method extraction refactoring out (and once I add occurrences support), I plan to finish out the Lightning completion/references so that any place those should work, they do.
-
Thanks Scott!
-
Hi @RoseSilverSoftware I'm using IC2 (2.0.3.9) and this isn't working. Although being that I'm using Pycharm, that may be the problem, as per issue: #1138
I just tried this with Webstorm and I'm still having the same issue. Do you have an update on your previous comment, regarding missing references and code completions?
-
repo owner - changed component to Lightning (Aura)
-
repo owner - changed component to Aura
- Log in to comment
A little birdie told me that you might just have this in the next week or so along with a boatload of other stuff...