This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Incorrect variable origin in code completion | ||
---|---|---|---|
Product: | php | Reporter: | Vladimir Riha <vriha> |
Component: | Editor | Assignee: | Ondrej Brejla <obrejla> |
Status: | NEW --- | ||
Severity: | normal | CC: | vriha |
Priority: | P4 | ||
Version: | 7.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | sample project |
I see right origin everywhere in index.php. But there is a problem, because you have it declared in newEmptyPHP1 too (and in index and in newEmptyPHP too). In every file there is some $fooBar assignment in a global context. Netbeans really don't know what will be the first declaration in runtime, so it takes some occurence during file scanning and handles it as "declaration". I will leave it as P4 as a reminder, but it's a common won't fix. OK, thanks |
Created attachment 120282 [details] sample project When I declare some variable in fileA and include this file in 2 other files: fileB and fileC then code completion for the variable in fileB shows that the variable is declared in fileC Check the sample project, - open file "index.php" - type "$" and invoke cc - type "f" => cc list is reduced to 1 item but it shows that fooBar is declared in "newEmptyPHP1.php" which is wrong Notice the line with "$fooBar=1;" where cc for the variable shows correct origin. Product Version: NetBeans IDE Dev (Build 201206040001) Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)