This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258600 - [ECMA6] Support generators
Summary: [ECMA6] Support generators
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 255076 (view as bug list)
Depends on:
Blocks: 242387
  Show dependency tree
 
Reported: 2016-03-31 09:08 UTC by Petr Pisl
Modified: 2016-04-21 11:05 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Generators in navigator (52.41 KB, image/png)
2016-03-31 09:12 UTC, Petr Pisl
Details
Generator as a property of an object literal (54.94 KB, image/png)
2016-03-31 09:13 UTC, Petr Pisl
Details
Generators as private and privileged methods (70.65 KB, image/png)
2016-03-31 09:14 UTC, Petr Pisl
Details
Generator as a class method (59.32 KB, image/png)
2016-03-31 09:15 UTC, Petr Pisl
Details
Generator code completion (121.62 KB, image/png)
2016-03-31 09:17 UTC, Petr Pisl
Details
Generator code completion (123.17 KB, image/png)
2016-03-31 09:18 UTC, Petr Pisl
Details
Generator code completion (123.96 KB, image/png)
2016-03-31 09:18 UTC, Petr Pisl
Details
Generator code completion - done (80.04 KB, image/png)
2016-03-31 09:28 UTC, Petr Pisl
Details
Generator code completion - value (78.18 KB, image/png)
2016-03-31 09:29 UTC, Petr Pisl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2016-03-31 09:08:42 UTC
Create support of generators.
See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator
Comment 1 Petr Pisl 2016-03-31 09:12:23 UTC
Created attachment 159058 [details]
Generators in navigator

The generators are recognized as a special functions, which have '*' as a badge of the icons in navigator and code completions items. The navigator functions return Generator object from runtime.
Comment 2 Petr Pisl 2016-03-31 09:13:56 UTC
Created attachment 159059 [details]
Generator as a property of an object literal

Generator can be also methods of an object literal
Comment 3 Petr Pisl 2016-03-31 09:14:54 UTC
Created attachment 159060 [details]
Generators as private and privileged methods
Comment 4 Petr Pisl 2016-03-31 09:15:22 UTC
Created attachment 159061 [details]
Generator as a class method
Comment 5 Petr Pisl 2016-03-31 09:17:35 UTC
Created attachment 159063 [details]
Generator code completion

The code completion offers next(), return() and throw() methods with documentation for a generator.
Comment 6 Petr Pisl 2016-03-31 09:18:00 UTC
Created attachment 159064 [details]
Generator code completion

The code completion offers next(), return() and throw() methods with documentation for a generator.
Comment 7 Petr Pisl 2016-03-31 09:18:21 UTC
Created attachment 159065 [details]
Generator code completion

The code completion offers next(), return() and throw() methods with documentation for a generator.
Comment 8 Petr Pisl 2016-03-31 09:28:22 UTC
Created attachment 159066 [details]
Generator code completion - done

Generator returns from next() methods object literals that has two properties: done and value. NB are able to offer code completion with documentation for them.
Comment 9 Petr Pisl 2016-03-31 09:29:00 UTC
Created attachment 159067 [details]
Generator code completion - value

Generator returns from next() methods object literals that has two properties: done and value. NB are able to offer code completion with documentation for them.
Comment 10 Petr Pisl 2016-03-31 09:30:06 UTC
The support is implemented currently on ecma6-truffle branch.
Comment 11 Petr Pisl 2016-04-21 11:05:29 UTC
*** Bug 255076 has been marked as a duplicate of this bug. ***