Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 423081

Summary: [outliner] Improve naming and ranges for CallExpressions
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: curtis.windatt.public
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Bug Depends on:    
Bug Blocks: 418949    

Description Michael Rennie CLA 2013-12-03 13:24:06 EST
Consider the following common Orion pattern:

Objects.mixin(MyObject.prototype, {
   one: 'one',

   init: function(one) {
   }
});

In the current state of the outliner this shows up as 'closure {...}' with the range of the entire object expression (not useful), which is the general fallback when we fail to name an object/function. 

In this case though we can look ahead from the CallExpression and perhaps name it more appropriately.

Example names could be:

1. Objects.mixin(arg, {...}) and range set to 'Objects.mixin'
2. Objects.mixin({...}) and range set to 'Objects.mixin'
Comment 1 Michael Rennie CLA 2013-12-17 01:10:46 EST
Another messed up call expression snippet:

function f3(o1, o2, o3) {
	return;
};

f3({one:null}, {two:null}, {three:null});

you see an outline like:

f3(o1, o2, o3)
closure {...}
  one
closure {...}
  two
closure {...}
  three

following from comment #0, the outlined text would be:

f3({...}, {...}, {...})

which does not make sense,since none of the object expressions appear as children of the call expression in the outline.
Comment 2 John Arthorne CLA 2015-05-05 14:39:45 EDT
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/msg03444.html