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.
Summary: | wrong formatting of comments | ||
---|---|---|---|
Product: | php | Reporter: | Filip Zamboj <fzamboj> |
Component: | Formatting & Indentation | Assignee: | Tomasz Slota <tslota> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | blaha, pjiricka, tmysik |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Filip Zamboj
2009-04-09 15:41:04 UTC
included into unit tests php.editor/test/unit/data/testfiles/formatting/real_life/comments_in_statements.php confirmed, a minimal test case: <?php if (1) { //comment echo 1; } ?> one more example: function encounterPageName() { // comment <- this one is correct behaviour after pressing ctrl+// calSomeDummyFunction } result after pressing alt+shift+f to format source function encounterPageName() { // comment <- INCORRECT calSomeDummyFunction } expected result: function encounterPageName() { // comment <- CORRECT calSomeDummyFunction } *** Issue 166399 has been marked as a duplicate of this issue. *** keep it p2 - this issue is here too long and nothing is going on. it's not going to disappear between other formatting issues, at least. Another example: (the first line in the method - comment - is not indented) ----- %< ----- class Jobeet { static public function slugify($text) { // replace all non letters or digits by - $text = preg_replace('/\W+/', '-', $text); // trim and lowercase $text = strtolower(trim($text, '-')); return $text; } } ----- %< ----- one more. After I used hint to implement all abstract methods I realized indentation is wrong so i used formatting and comment was incorrectly formatted. initial state: class PageLogin extends Page { //put your code here public function setPageTitle() { } public function setPageVariables() { } public function setPageContentDescription() { } public function getPageContentVars() { } } after format: class PageLogin extends Page { //put your code here <-- wrong public function setPageKeywords() { } public function setPageTitle() { } public function setPageVariables() { } public function setPageContentDescription() { } public function getPageContentVars() { } } *** Issue 158921 has been marked as a duplicate of this issue. *** Will you be able to fix&verify the issue till Fr 3-July when is cut-off-day for Patch1. thanks petr No. The fix will depend on other post-67 changes, so it is not a good candidate for a patch http://hg.netbeans.org/web-main/rev/cfd834b95566 - partial fix *** Issue 167907 has been marked as a duplicate of this issue. *** The remaining part of problems described in this report is covered by issue 162586. I am closing this issue and upgrading 162586 to P2 for more clarity Integrated into 'main-golden', will be available in build *200908101401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/cfd834b95566 User: Tomasz Slota <tslota@netbeans.org> Log: #162320: wrong formatting of comments (part 1) *** Issue 171254 has been marked as a duplicate of this issue. *** *** Issue 172123 has been marked as a duplicate of this issue. *** *** Issue 172116 has been marked as a duplicate of this issue. *** *** Issue 173333 has been marked as a duplicate of this issue. *** unit test added Integrated into 'main-golden', will be available in build *200910091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/5108cdf6c4d7 User: Filip Zamboj <fzamboj@netbeans.org> Log: unit tests for #160996 and #162320 fixed |