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.
Steps to reproduce: 1. Create empty class, extending abstract class with abstract method 2. An empty class is created. Make sure it looks like the following: class ClassName extends AbstractClassName { // Not even one blank line between { and } } 3. Click on the lightbulb with error marker on the left, click "Implement All Abstract Methods" Actual result: Implemented method code appears BEFORE class opening bracket: class ClassName extends AbstractClassName protected function implementedAbstractMethod() { } { // Not even one blank line between { and } } Expected result: Method implementation placed between class' { and } Product Version = NetBeans IDE 8.0.2 (Build 201411102027) Operating System = Linux version 4.1.3-1-ARCH running on amd64 Java; VM; Vendor = 1.8.0_51 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.51-b03
Created attachment 157062 [details] patch
I've created a patch. Could you please review it? Thanks!
*** Bug 256038 has been marked as a duplicate of this bug. ***
@junichi11: Not sure if a unit test could be added as well - could you please look at it? Thanks.
(In reply to Tomas Mysik from comment #4) > @junichi11: Not sure if a unit test could be added as well - could you > please look at it? Thanks. Probably, there are no tests for the HintFix in existing tests. But I'll try checking it. Thanks.
We can add tests for the HintFix. So I'll add them(this time, only for this Hint) later. Thanks.
Created attachment 157147 [details] patch for unit tests I've added tests. Thanks.
Patch applied, thanks a lot! http://hg.netbeans.org/web-main/rev/adeda44ee993
Integrated into 'main-silver', will be available in build *201511060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/adeda44ee993 User: Tomas Mysik <tmysik@netbeans.org> Log: #254173 - PHP implement all abstract methods breaks code for empty class Patch contributed by junichi11@netbeans.org.