History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-8283
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Maxim Mossienko
Reporter: Vladislav Kaznacheev
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Code completion in Bindows: recognize private members

Created: 11 Aug 06 17:22   Updated: 01 Feb 07 17:37
Component/s: JavaScript
Fix Version/s: Selena 6700

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Duplicate
This issue duplicates:
IDEADEV-8282 Detect Bindows-specific idiom Normal Resolved
 

Fixed in build: 6,682


 Description  « Hide
Problem with code completion in Bindows. In Bindows we use this construct: _p._myVariable = 1; _p._myFunction = function() {} The extra _ in the beginning of a variable name denotes a private class member. When invoking code completion in some other class, like so: this. every property and function in all of Bindows with _p is listed. properties of completely alien classes are listed... Is there anyway you can do something about this?

 All   Comments   Work Log   Change History      Sort Order:
Johan Lund - 06 Nov 06 11:45
Since fix 8282 (haven't tested that one yet), Intellij is more and more starting to look like the best option for Bindows developers. So let's take this a little bit further.

This issue (8283) has been marked as a duplicate of (8282), and that is partly correct. I don't know if Maxim fixed the private member part of it but here comes a clarification anyway:

In JavaScript there is no such thing as a private member but in Bindows there is. It is a convention that we enforce throughout the whole of bindows and it looks like this:

_p._myPrivateVariable;
_p._myPrivateFunction = function() {};

_p.myPublicVariable;
_p._myPublicFunction = function() {};

Private members of a superclass should not be listed in code completion.
(It would be nice however to turn this feature on/off)


Johan Lund - 06 Nov 06 11:48
Oops typo. (In the most important place ofcourse.)
It should be:

_p._myPrivateVariable;
_p._myPrivateFunction = function() {};

_p.myPublicVariable;
_p.myPublicFunction = function() {};

Begins with underscore means private...