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

Bug 315943

Summary: Formatting [Ctrl-Shift-F] PHP code removes all indention
Product: z_Archived Reporter: egli
Component: PDTAssignee: PHP Core <php.core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P2 CC: egli, gadi, ganoro, zhaozhongwei
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Demo Screenshot
none
Installed Versions of PDT
none
Example php files before and after formatting none

Description egli CLA 2010-06-07 05:20:31 EDT
Build Identifier: 20100218-1602

Formatting [Ctrl-Shift-F] PHP code removes all indention. And formatting code with no indention does not add any.

Reproducible: Always

Steps to Reproduce:
1. Load formatted code
2. Trying to format it (Ctrl-Shift-F)
Comment 1 egli CLA 2010-06-07 05:29:16 EDT
Created attachment 171240 [details]
Demo Screenshot
Comment 2 Zhongwei Zhao CLA 2010-06-07 05:41:12 EDT
Hi

Can you try the latest pdt version,the Ctrl-Shift-F works for me:)
Comment 3 egli CLA 2010-06-07 05:49:14 EDT
(In reply to comment #2)
> Hi
> 
> Can you try the latest pdt version,the Ctrl-Shift-F works for me:)

It is a new installation on a new notebook with the latest version. I downloaded the 'Tools for PHP developers' package today (2010-06-07).
Comment 4 egli CLA 2010-06-07 06:08:48 EDT
Created attachment 171245 [details]
Installed Versions of PDT
Comment 5 Zhongwei Zhao CLA 2010-06-07 06:21:27 EDT
Hi,

Can you try the one at the following page
http://build.eclipse.org/technology/epp/epp_build/36/download/20100605-1255/

The one you downloaded is the last release:)
Comment 6 egli CLA 2010-06-07 07:45:58 EDT
(In reply to comment #5)
> Hi,
> 
> Can you try the one at the following page
> http://build.eclipse.org/technology/epp/epp_build/36/download/20100605-1255/
> 
> The one you downloaded is the last release:)

I have the same problem with that version. I've seen now, that not every indention ist removed. in comment blocks it add one space before the *.
Comment 7 Roy Ganor CLA 2010-06-09 09:45:28 EDT
can you provide a sample file that you experience this behavior with?

thanks!
Comment 8 egli CLA 2010-06-14 01:33:33 EDT
I have this behavior with every php file
Comment 9 Zhongwei Zhao CLA 2010-06-14 01:46:51 EDT
Hi

Can you describe it as the actual result and the expected result?

For example:
have a file with the following content:
...
after format,the result is:
...
Expected result is:
...


Thanks!
Comment 10 egli CLA 2010-06-14 01:48:53 EDT
Created attachment 171813 [details]
Example php files before and after formatting
Comment 11 Zhongwei Zhao CLA 2010-06-14 03:25:46 EDT
I am not sure if it is a bug.I think we add the space before the * Intentionally:)
Comment 12 Zhongwei Zhao CLA 2010-07-12 03:38:59 EDT
works for me
Comment 13 Gadi Goldbarg CLA 2010-08-19 08:50:20 EDT
No longer reproducible. Closing...
Kalin Yanev
kalin.a@zend.com
Comment 14 Gadi Goldbarg CLA 2010-08-19 08:50:33 EDT
No longer reproducible. Closing...
Kalin Yanev
kalin.a@zend.com