| Summary: | [language support] Variable is not recognized as a "same one" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Eugene Ostroukhov <eostroukhov> | ||||
| Component: | General | Assignee: | Project Inbox <jsdt.javascript-inbox> | ||||
| Status: | NEW --- | QA Contact: | Chris Jaun <cmjaun> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cmjaun | ||||
| Version: | 3.2 | ||||||
| Target Milestone: | Future | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | needinfo | ||||||
| Attachments: |
|
||||||
Can you explain why you think it should work that way? Our general strategy has been to show both. Is that the behavior you see? Created attachment 166761 [details]
Example when those vars are one.
I attached a sample page & two JS files. You can see that the variable is only one.
I acknowledge that these variables _may_ be different in some cases. But I do think that it would be better if JSDT shows proposals for all properties - currently there is no way to see properties of the "local" variable.
I think we need just a little more info--is the problem that "c" isn't shown in the Outline for the file declaring b? Maybe we need a screenshot to explain it properly? 1. In one script file you have:
var a = {};
a.prop1 = 2;
2. In the second script file:
function init()
{
a.prop2 = "anyval";
var div = document.getElementById("display");
div.innerHTML = JSON.stringify(a);
}
If you put cursor after "a.prop2 = "anyval";" and try to code-complete after "a." you will not see prop2 property - only the prop1.
JSONed object still shows this property:
{"prop1":2,"prop2":"anyval"}
|
(3.2, CVS version) 1. Create a new empty JS file with following contents: var avar = {}; avar.c = 3; 2. Create another JS file. Verify that avar is visible in this new file. 3. In a new JS file add following line: avar.b = 3; Verify that JSDT sees only the "c" property (i.e. the one created in the same file where original class was declared)