Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 250718

Summary: Code formatter's wrong behaviour on IF statement with single statement.
Product: z_Archived Reporter: demnar7845 <suyandi>
Component: PDTAssignee: Roy Ganor <ganoro>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: gadi
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description demnar7845 CLA 2008-10-14 02:50:20 EDT
I'm using PDT 1.0.3.
In editor (on php source code), when I run "Source -> Format", the statement under IF statement (not enclosed with curly bracketes "{" & "}") would get indented to left, this is wrong behaviour, it shouldn't be indented.

For example:

if (x)
    echo "hello";

After run "format", it would change to:

if (x)
echo "hello";

But if using curly brackets like this:

if (x)
{
    echo "hello";
}

No change happened after run "format".

Keep up the good work.
Comment 1 Roy Ganor CLA 2008-10-16 12:24:42 EDT
thanks, duplicate of #219234.






*** This bug has been marked as a duplicate of bug 219234 ***
Comment 2 Gadi Goldbarg CLA 2008-10-22 09:56:30 EDT
Closing