Bug 445818 - [assist] Provide content assist for regex patterns
Summary: [assist] Provide content assist for regex patterns
Status: REOPENED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: JS Tools (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 512463
  Show dependency tree
 
Reported: 2014-10-02 15:32 EDT by Michael Rennie CLA
Modified: 2018-05-15 15:16 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2014-10-02 15:32:39 EDT
We should add support for completions / templates for regex literals / strings. I can't count the number of times I have been crafting a regex and have to go look up what all of the available pattern parts are.

I would expect some form of assist for the following cases:

1. regex literals -> /<pattern>/
2. RegExp constructor -> new RegExp('<pattern>')
3. expanded inferencing if a var is assigned a literal that is used in new RegExp
  -> var pattern = '<pattern>'
     new RegExp(pattern)

We could start with proposals including the pattern parts mentioned in MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions

It also might be nice if we expanded the JS hover to provide a way to run the regex in place to see the result rather than having to debug it.
Comment 1 Simon Kaegi CLA 2014-10-03 13:53:16 EDT
Agree - this sure would be nice...
Comment 2 Michael Rennie CLA 2017-01-10 15:41:33 EST
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg04002.html
Comment 3 Carolyn MacLeod CLA 2017-02-20 16:35:21 EST
Reopening.
See also (related, but not the same): Bug 512463.