brackets-archive / bracketsIssues

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

[CLOSED] Abstract JSUtils logic for use by third-party extensions #4618

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by ProLoser Sunday Sep 01, 2013 at 10:01 GMT Originally opened as https://github.com/adobe/brackets/issues/5013


So I'm developing an AngularJS extension, and pretty much copy-pasting most of the logic from JavascriptQuickEdit.js and JSUtils.js. The only real modification I'm making to the latter is modifying the regex so that it looks for the specific types of function calls I need.

At this time, it's ridiculously annoying to simply code to your standards the ability to search through all files for declarations of an asset I want to support quickedit for. And from what I've been able to tell, I don't think anyone has developed a third-party quick-edit extension.

Would it be worthwhile to allow people to pass a regexp to a (new?) JSUtils method for locating whatever block of code they need? Or is this file iteration already bundled into DocumentManager and ChangedDocumentTracker as much as is possible?

core-ai-bot commented 3 years ago

Comment by njx Wednesday Sep 04, 2013 at 21:09 GMT


Makes sense to me. I wonder if there's a small refactoring we could do to create a generic file scanner that could be used for various sorts of quick-and-dirty code intelligence (quick open, quick edit, etc.)

core-ai-bot commented 3 years ago

Comment by njx Monday Sep 09, 2013 at 18:24 GMT


Marking move to backlog. There are two things we might want to consider here: (1) is there a high bang-for-the-buk way that we could support adding language/framework extensibility to help developers for extensions like this Angular one (e.g. a more generic way to cache arbitrary information for files, a lifecycle for reparsing files whose info has gone style, etc.), and (2) adding better parsing for specific languages (e.g. HTML/CSS/JS) than just regexps.

core-ai-bot commented 3 years ago

Comment by njx Thursday Sep 12, 2013 at 16:32 GMT


Added to the backlog: https://trello.com/c/WRdYizc7. Thanks for the suggestion! Closing.