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

Bug 344935

Summary: [outline][content assist] JSDT ignores static and prototype methods with the same name
Product: [WebTools] JSDT Reporter: Sergey <serge.che>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: NEW --- QA Contact: Chris Jaun <cmjaun>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Sergey CLA 2011-05-06 05:18:00 EDT
In the following code:

/** @constructor */
function Obj() {};
Obj.method = function() {};
Obj.prototype.method = function() {};

...class Obj contains static and prototype "method".

While this is a perfectly valid code and used in some popular JS libraries (ex. jQuery.get() does AJAX request and jQuery.prototype.get() returns element from current node set), JSDT ignores one of the method definition (in this case, the prototype one) and gives this warning in strict validation:

"The static function method() from the type Obj should be accessed in a static  way"