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

Bug 336926

Summary: [content assist] Private methods aren't marked as being private, or hidden from external classes
Product: [WebTools] JSDT Reporter: Dominic Chambers <dominic.chambers>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: NEW --- QA Contact: Chris Jaun <cmjaun>
Severity: enhancement    
Priority: P3 CC: mario.ploner
Version: unspecified   
Target Milestone: Future   
Hardware: PC   
OS: Windows XP   
Whiteboard: @private tag

Description Dominic Chambers CLA 2011-02-11 07:22:23 EST
Build Identifier: 

The content assist within the editor doesn't attempt to either hide private methods or mark them as being private. Static methods and constructor methods are clearly indicated however, both within content assist and when you drill down into a class in the project explorer.

IMO, private methods should be marked as being private when viewed from the project explorer, but should be hidden within content assist (unless they are being used locally in which case they should be marked as being private again).


Reproducible: Always
Comment 1 Nitin Dahyabhai CLA 2011-04-25 10:36:36 EDT
JavaScript doesn't have a built-in notion of 'private', nor do we currently have a way to emulate that.
Comment 2 Mario Ploner CLA 2013-02-14 17:41:39 EST
What about the JSDoc tag @private? Couldn't that be used to mark private members?
Comment 3 Nitin Dahyabhai CLA 2013-02-20 23:45:25 EST
It's a design limitation at the moment.  The modifiers are currently stored on the AST object, which limits the ability to represent a JS object with two properties pointing to the same function expression but with different modifiers.