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 187264 - Formatter moves bracket inside the comment.
Summary: Formatter moves bracket inside the comment.
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-07 12:15 UTC by raulv
Modified: 2010-07-08 14:14 UTC (History)
2 users (show)

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 raulv 2010-06-07 12:15:43 UTC
I have the formatter configured to put the starting bracket on the same line after an 'if' statement.

Given the code:
if ($test = true) // comment
{
  echo 'foo';
}

the formatter produces:
if ($test = true) // comment {
  echo 'foo';
}

resulting in a syntax error.
Comment 1 Filip Zamboj 2010-06-07 12:20:59 UTC
reproducible 
Product Version: NetBeans IDE Dev (Build 100607-272cdc06fedb)
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01
Comment 2 Filip Zamboj 2010-06-07 12:27:23 UTC
confirmed in FCS as well => 69_HR_FIX_CANDIDATE
Comment 3 Petr Pisl 2010-06-08 14:56:24 UTC
Fixed in the web-main
Comment 4 Petr Pisl 2010-06-08 15:05:29 UTC
Filipe, could you test it?
Comment 5 Filip Zamboj 2010-06-08 15:18:55 UTC
(In reply to comment #4)
> Filipe, could you test it?

sure, already updating build. will be done in a while.
Comment 6 Filip Zamboj 2010-06-08 15:48:15 UTC
Product Version: NetBeans IDE Dev (Build 100608-9161b6a57229)
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01

verified in trunk. can be ported to 69
Comment 7 Jan Lahoda 2010-06-08 16:15:26 UTC
Transplanted to release69 branch:
http://hg.netbeans.org/release69/rev/3432e9f10c31
Comment 8 Quality Engineering 2010-06-09 06:54:27 UTC
Integrated into 'main-golden', will be available in build *201006090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/33196f945b79
User: Petr Pisl <ppisl@netbeans.org>
Log: #187264 -  Formatter moves bracket inside the comment.
Comment 9 Filip Zamboj 2010-06-09 20:10:41 UTC
Product Version: NetBeans IDE 6.9 (Build 100609-a94d6a4a87fe)
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01

verified in release69 clone.
Comment 10 rbalada 2010-06-14 08:38:56 UTC
Added keyword 6.9.1_CANDIDATE to bugfixes, which were integrated in release69 repository *after* the release691 clone has been created.
Comment 11 rbalada 2010-06-16 10:05:09 UTC
Transplanted to release691 as ddc8c08c82b7
Comment 12 Jaromir Uhrik 2010-07-08 14:14:56 UTC
Works fine in the following 6.9.1 build:
Product Version: NetBeans IDE 6.9.1 Dev (Build 201007062301)
Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01-279
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)