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

Bug 424755

Summary: Improve 'this' content assist
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2013-12-30 14:13:04 EST
Consider the following snippet:

var object = {
	one: function() {
		
	},
	two: function() {
		
	},
	three: "three";
	four: function() {
		this.    //content assist here
	}
}

Activate assist at the '.' at the comment and notice you get a nice random smattering of proposals from Object et. al. as well as one for 'this', which if chosen will complete to 'this.this' which is bogus.

I would expect the list of proposals to be pretty short in this case (at least the ones shown first). Like:

one()
four
three()
two()
Comment 1 Michael Rennie CLA 2014-01-10 12:16:02 EST
(In reply to Michael Rennie from comment #0)

> I would expect the list of proposals to be pretty short in this case (at
> least the ones shown first). Like:
> 
> one()
> four
> three()
> two()

Now that we have decided to not show the non-inferred proposals by default it looks a lot better - we do get most of the 'this' proposals but there are still some rough spots.

Consider the following snippet:

var baz = {
	one: 1,
	two: function() {
		this.	//CA here
	},
	three: 3
}

You get the proposals for 'one' and 'three', but not 'two'
Comment 2 John Arthorne CLA 2015-05-05 14:42:28 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