| Summary: | [Occurrences] Selecting a computed property does not mark occurrences | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public |
| Version: | 7.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=212277cb4fe7e226e5c3800639d69befbb8d0840 Fixed in master with tests The identifier's parent is a member expression, so we assume we have an object property selected. Fixed by checking if the parent is marked as computed. |
Consider the following snippet var f = { one: function(a) { var c = arr[a]; } } select 'a' in the arr[a] expression. No occurrences are marked. If you select 'a' anywhere else occurrences are marked as expected. Probably just not handling a computed property properly. Computed properties take the form: "init": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arr" }, "property": { "type": "Identifier", "name": "a" } }