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.
STR: 1) Open a PHP project and create a new PHP file. 2) Under Tools | Options | Editor | Code Templates, click the "fnc" template and edit it to look like the following: /** * ${cursor} */ public function ${function_name}() { } 3) Click OK, then close the Options window. 4) Add a new class "foo" to the PHP file. 5) In the class body, indent four spaces, type fnc and press the TAB key to expand the fnc template. It should look like the following: /** * */ public function function_name () { } Notice the incorrectly-indented block comment. If I replace the block comment with line comments in the "fnc" definition, the code expansion is correctly indented.
Clarification: I had my editor set to place the opening brace on the same line as the declaration, which is why the braces also appear incorrectly formatted. The brace formatting is by design and should be ignored; the issue is with block comments only.
confirmed, this problem does not only relate to code templates, applying formatting on generated code also does now work example code: <?php class class_name { function __construct() { ; } /** * */ public function function_name() { } } ?>
@tslota: please, delete duplicate reference if you think it's not a duplicate of 162320 *** This issue has been marked as a duplicate of 162230 ***
sorry! I add wrong issue as duplicate
*** This issue has been marked as a duplicate of 162320 ***