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 var TripCtrl = { get: function (id) { return new Promise(function (resolve, reject) { if (id === null || typeof id === "undefined") { reject(new TPError(TPError.BadRequest, "Invalid trip ID")); } else { dbProvider.get(id) .then(); } }); } }; it is already formatted, but notice the indentation of ".then()", it should be 2 spaces to the right: var TripCtrl = { get: function (id) { return new Promise(function (resolve, reject) { if (id === null || typeof id === "undefined") { reject(new TPError(TPError.BadRequest, "Invalid trip ID")); } else { dbProvider.get(id) .then(); } }); } }; Thank you Product Version: NetBeans IDE Dev (Build 201412270001) 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)
I'm afraid I don't really understand? Why it should be 2 spaces right? It is continuation, so it has indentation of 8 spaces.
My point (maybe a wish then :) was that the ".then()" would be aligned with the end of "dbProvider." so that you would have the same indentation as the ".get()" on line above The resulting formatting would be dbProvider.get(id) .then(); which is (personally) better looking than dbProvider.get(id) .then();
* than dbProvider.get(id) .then();
I guess it is a duplicate of issue 251662. *** This bug has been marked as a duplicate of bug 251662 ***