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.
Created attachment 148625 [details] Screen shot of code completion for "name" in AngularJS HTML file. This bug relates to the Synergy test "Code completion in expressions" for AngularJS here: http://services.netbeans.org/synergy/client/app/#/assignment/1091/v/1 The expected result for this test is as follows: "Properties like lastName, name or help are offered because they are used in source". All of that is true, but in the case of "name" it happens to be defined globally as part of the JS Platform in addition to being defined locally as a property of $scope within File.js. However, when code completion is done on "name" only the global definition of "name" is offered. See the attached screen shot. In this situation shouldn't NetBeans offer code completion for both the local and global instances, or alternatively, indicate that name exists in multiple scopes? I realize that doesn't matter for the purpose of code completion, but it is still misleading for NetBeans to be reporting that "name" only exists as a global. Product Version: NetBeans IDE Dev (Build 201408100001) Java: 1.8.0_20-ea; Java HotSpot(TM) 64-Bit Server VM 25.20-b22 Runtime: Java(TM) SE Runtime Environment 1.8.0_20-ea-b23 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) User directory: C:\Users\JohnDoe\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\JohnDoe\AppData\Local\NetBeans\Cache\dev
I guess you mean the suite "Completion without controllers" [1], right? I can reproduce it there If controllers are properly defined, it works for me (both "name" are offered). As written in the suite, without knowing relation between HTML and Controllers, features are limited but I guess IDE could offer name and shows that it comes from the HTML file [1] http://services.netbeans.org/synergy/client/app/#/suite/1386/v/1
(In reply to Vladimir Riha from comment #1) > I guess you mean the suite "Completion without controllers" [1], right? I > can reproduce it there > > If controllers are properly defined, it works for me (both "name" are > offered). As written in the suite, without knowing relation between HTML and > Controllers, features are limited but I guess IDE could offer name and shows > that it comes from the HTML file > > > [1] http://services.netbeans.org/synergy/client/app/#/suite/1386/v/1 Correct. I am referring to the test "Code completion in expressions" within test suite "Completion without controllers". I did notice somewhere during the testing (I can't recall where) that code completion had identified multiple sources for the same name, so it seemed odd that code completion could not locate the local instance of "name" for this test. But no big deal, since the text that gets written by code completion is obviously going to be the same regardless of the context in which a name is found.
Yes, it works if IDE is capable of identifying controller for given partial. But in this case, there is no relation between controller function and partial file (no routing, no ng-controller element...)