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.

Bug 121990 - Formatter: Opening php tag should be always at the beginning of line
Summary: Formatter: Opening php tag should be always at the beginning of line
Status: RESOLVED WONTFIX
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-15 12:57 UTC by kozlov
Modified: 2008-04-15 12:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kozlov 2007-11-15 12:57:52 UTC
Reproduced in build 071115.

Copy following code to php file and invoke 'Format'.

<body>
<?php
    
?>
</body>
Comment 1 Tomasz Slota 2007-11-15 13:46:43 UTC
Are you guys sure? In JSP we always format scriptlet blocks according to the HTML indent level, so does Ruby...
Comment 2 Andrew Korostelev 2007-11-29 10:28:43 UTC
after 6.0
Comment 3 Tomasz Slota 2008-04-09 09:24:54 UTC
Vito please evaluate if this issue is still valid in the current implementation
Comment 4 Vitezslav Stejskal 2008-04-15 12:43:40 UTC
PHP does the same as JSP and Ruby. PHP scriplets are positioned according to the HTML indentation. I'm not sure if
that's right thing to do for PHP, but it looks reasonable. I saw in other PHP editors that they never try to re-position
an opening PHP tag and format the rest of the scriplet according to the opening tag's position. Eg. the closing tab is
at the same column as the opening tag. I'm not sure what conventions we should follow and perhaps we should make this
configurable with other formatting options. See issue #132871 about code styles.