brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Fix Issue #3863 - jump-to-def goes to exports line. #3937

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

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

core-ai-bot commented 3 years ago

Comment by eztierney Monday Jun 17, 2013 at 19:22 GMT


@dloverin can you take a look?

core-ai-bot commented 3 years ago

Comment by dloverin Monday Jun 17, 2013 at 20:26 GMT


merged.

core-ai-bot commented 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)?

core-ai-bot commented 3 years ago

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.

core-ai-bot commented 3 years ago

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?

core-ai-bot commented 3 years ago

Comment by eztierney Tuesday Jun 18, 2013 at 01:17 GMT


issue #4259