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.
When "const" and "function" keywords are added using CC, formatting is incorrect. Reproducible code: 1. ---------------------------------- use A\{ MyClass,cons^ // CC here }; expected: use A\{ MyClass,const or MyClass, const }; actual: use A\{ MyClass, const // 2 spaces }; 2. ---------------------------------- use A\{ MyClass, cons^ // CC here }; expected: use A\{ MyClass, const }; actual: use A\{ MyClass, const }; 3. ---------------------------------- use A\{ MyClass,funct^ // CC here }; expected: use A\{ MyClass,function or MyClass, function }; actual: use A\{ MyClass, function }; Thanks.
I'm not sure whether I can fix this. But I'll try to fix it. Thanks.
Thanks a lot, Junichi!
Created attachment 161776 [details] proposal patch It's hard to fix because there is a syntax error. But I have just one idea: 1. Allow an empty group use (CUP) 2. Sanitizing (GSFPHPParser) 3. Add an UnhandledErrorRule for the empty group use 4. Fix the FormatVisitor and TokenFormatter Tomas, What do you think? If OK, I'll add tests. Then, I'll push them on next Wednesday(8/31). Thanks.
Sounds good to me, feel free to do it. But please ensure that no tests are broken, we are a few days before code freeze :) Thanks! (In reply to junichi11 from comment #3) > If OK, I'll add tests. Then, I'll push them on next Wednesday(8/31). If you can add tests today (in 8 hours or so), feel free to push it today. If not, please wait till Wednesday (and verify that the file licenses are OK). Thanks a lot!
(In reply to Tomas Mysik from comment #4) > Sounds good to me, feel free to do it. Thanks! > But please ensure that no tests are > broken, we are a few days before code freeze :) > If you can add tests today (in 8 hours or so), feel free to push it today. > If not, please wait till Wednesday (and verify that the file licenses are > OK). I'll try adding them now. I'll push after all editor's tests are passed in my local environment. Thanks!
Perfect, thank you!
Fixed. http://hg.netbeans.org/web-main/rev/b8f8f5943cc2 Thanks.
Integrated into 'main-silver', will be available in build *201608270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b8f8f5943cc2 User: Junichi Yamamoto <junichi11@netbeans.org> Log: #262205 - [PHP7] Incorrect formatting for CC in mixed group use