| Summary: | Improve outlining of object and function assignments | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | ||
| Version: | 5.0 | ||
| Target Milestone: | 5.0 M1 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 422080 | ||
The same goes for function assignments:
var Foo;
Foo.baz = function(a, b, c) {
};
should be outlined as:
Foo.baz(a, b, c) with a selection range of 'Foo.baz'.
Pushed to Gerrit: https://git.eclipse.org/r/18843 (In reply to Michael Rennie from comment #2) > Pushed to Gerrit: https://git.eclipse.org/r/18843 I had to redo the gerrit change because the other one was completely un-mergable: https://git.eclipse.org/r/18986 (In reply to Michael Rennie from comment #3) > (In reply to Michael Rennie from comment #2) > > Pushed to Gerrit: https://git.eclipse.org/r/18843 > > I had to redo the gerrit change because the other one was completely > un-mergable: > > https://git.eclipse.org/r/18986 The change has been merged: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=03a03dff7c3bd4dfbe4aa51bb0938fe7459bc88c |
Consider the following snippet: var Foo; Foo.bar = { one: function(param) { }, two: {} }; In its current state that will get outlined as: closure {...} one(param) two {...} and the selection range for the 'closure' entry is the entire object (no useful). We should properly handle the assignment expression and parse out the name for the object assignment. In this case I would expect the outline to be: Foo.bar {...} one(param) two {...} and the selection range to be the string 'Foo.bar'.