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.
Please try following in JS file: angular.module("tripPlanner.tripDay") .controller("tp.tripDay.TripDayFormCtrl", ["$scope", "tp.trip.TripModel", function TripDayFormCtrl($scope, TripModel, TripHandler) { // lineA $scope.trip = trip ? trip : new TripModel("km"); // line B }]) if you: - click on "TripModel" on lineA => entire "new TripModel("km")" will be marked as occurrence and if you press Ctrl+R, the "new" will be refactored renamed but to some weird name, e.g. if I rename it to "tamto", the line would look like $scope.trip = trip ? trip : tamtotamto("km"); - if you click on TripModel on lineB => it again highlights the "new" but if you press Ctrl+R, it works fine this time. Thank you Product Version: NetBeans IDE Dev (Build web-main-1936-on-20150215) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Linux version 3.13.0-43-generic running on amd64; UTF-8; en_US (nb)
To reproduce this issue is important that the assignment has to be done for parameter like this: function TripDayFormCtrl($scope, TripModel, TripHandler) { TripHandler.trip =trip ? trip : new TripModel("km"); }
Fixed in web-main.
Integrated into 'main-silver', will be available in build *201504201004* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/008e6e3a0eb6 User: Petr Pisl <ppisl@netbeans.org> Log: #250434 - Keyword new refactored together with function name
Verified, thank you Product Version: NetBeans IDE Dev (Build 201504240001) Java: 1.8.0_40; Java HotSpot(TM) Client VM 25.40-b25 Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b25 System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)