brackets-archive / bracketsIssues

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

[CLOSED] [JS code hints] Jump to Definition on module name should go to module's definition, not require() call #3381

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by peterflynn Wednesday Apr 24, 2013 at 23:22 GMT Originally opened as https://github.com/adobe/brackets/issues/3604


  1. Open a file in the Brackets source tree
  2. Place cursor on a reference to some other module (e.g. "FileUtils" in a FileUtils.readAsText() call)
  3. Jump to Definition

Result: cursor jumps to the line FileUtils = require("file/FileUtils") in the current file

Expected: FileUtils.js is opened. (If we don't explicitly set the cursor pos, it will go to wherever the cursor was last time the file was opened, which might be nice... or we could explicitly put the cursor on the define() call).

If you invoke Jump to Definition on the "readAsText" part of the code, it does properly open FileUtils.js.

core-ai-bot commented 3 years ago

Comment by peterflynn Wednesday Apr 24, 2013 at 23:23 GMT


If this is tricky then feel free to tag MTB. Otherwise it'd be nice to get this into Sprint 25 perhaps...

core-ai-bot commented 3 years ago

Comment by dangoor Thursday Apr 25, 2013 at 19:01 GMT


Reviewing the code hinting issues. I agree with you that this would be nice to have. There might be some rare instances where someone actually wants to change the require() call itself, but I don't think that would be the common case.

core-ai-bot commented 3 years ago

Comment by pthiess Thursday May 02, 2013 at 20:39 GMT


@pfarland - seems like this should go in your backlog, please verify.

core-ai-bot commented 3 years ago

Comment by pfarland Friday May 03, 2013 at 20:32 GMT


Added to the Brackets Research backlog https://trello.com/c/7naqHp1f