Open core-ai-bot opened 3 years ago
Comment by njx Monday Jun 17, 2013 at 23:00 GMT
Does this change improve JS Quick Edit as well (i.e., does it make it so it won't need to fall back on the old JSUtils code as it's doing now when it encounters this case)?
Comment by eztierney Tuesday Jun 18, 2013 at 01:06 GMT
@
njx The quick edit code is still using the JSUtils code, but I think we can switch it over to this code with a little bit of work. I think we still need the JSUtils code that finds the end offset of the function, but we should be able to get rid of the other text searching it does.
Comment by njx Tuesday Jun 18, 2013 at 01:07 GMT
Cool--would you mind filing a bug for that with the details of what needs to be done?
Issue by eztierney Monday Jun 17, 2013 at 19:22 GMT Originally opened as https://github.com/adobe/brackets/pull/4254
When the result of jump-to-def looks like: exports.foo = foo;
we now will try and jump-to-def on the rhs, as that's what the user most likely really wants. Jumping to the exports line is rarely useful.
When we get the response for a jump-to-def, if it looks like we're jumping to a member expression like the example above, then we will grab the RHS, and trigger another jump-to-def on that, which should take us to the correct place.
eztierney included the following code: https://github.com/adobe/brackets/pull/4254/commits