Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 158921 - Block comments are incorrectly indented
Block comments are incorrectly indented
Status: RESOLVED DUPLICATE of bug 162320
Product: php
Classification: Unclassified
Component: Editor
6.x
PC Windows Vista
: P3 (vote)
: 6.x
Assigned To: Tomasz Slota
issues@php
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-20 23:41 UTC by blakenzoe
Modified: 2009-06-30 17:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description blakenzoe 2009-02-20 23:41:25 UTC
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.
Comment 1 blakenzoe 2009-02-20 23:46:38 UTC
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.
Comment 2 Tomasz Slota 2009-04-10 14:28:26 UTC
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() {
    
    }
}
?>
Comment 3 Filip Zamboj 2009-06-30 12:49:02 UTC
@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 ***
Comment 4 Filip Zamboj 2009-06-30 12:53:24 UTC
sorry! I add wrong issue as duplicate
Comment 5 Filip Zamboj 2009-06-30 12:54:39 UTC

*** This issue has been marked as a duplicate of 162320 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo