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

Bug 149463

Summary: Add "Source / Correct Indentation" functionality
Product: z_Archived Reporter: Ulrich Petri <eclipse>
Component: PDTAssignee: Yaron Mazor <yaron.m>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P2 Keywords: plan
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ulrich Petri CLA 2006-07-03 10:37:25 EDT
In JDT (and Emacs ;)) there is a feature which indents the current line to the "correct" (i.e. in the current source context) level.

Please add this feature to the PHP IDE as it's really a timesaver.

Ulrich
Comment 1 Seva Lapsha CLA 2006-12-03 04:12:38 EST
Fixed previously.
Comment 2 Gadi Goldbarg CLA 2006-12-10 06:32:12 EST
closed
Comment 3 Ulrich Petri CLA 2006-12-11 07:32:41 EST
Sorry, but this feature is still missing.

Perhaps I was not clear enough in my explanation.
The feature i'm looking for indents the current line to the correct level on keypress. 
(You can try it out in a Java editor: type in some code and press "ctrl-i"; The current line will be indented to the correct level)

Comment 4 Yaron Mazor CLA 2006-12-28 15:39:11 EST
fixed.
Overrided the CTRL+I to perform format to active elements
Comment 5 Gadi Goldbarg CLA 2006-12-31 03:26:23 EST
seems closed to me - Please check that we understood correctly. - 
eclipse@upcd.de to send us feedback
Comment 6 Ulrich Petri CLA 2007-01-03 08:54:01 EST
Hi,

thank you for implementing this!
It seems to work pretty good in RC 1.

There are two small "inconveniences" left:
1) type:
function test() {
|$a = 123;
}
Place your cursor where the "|" is and press ctrl-i, it will indent the line correctly but also select the newly inserted space.

2)
Type:
function test() {
    $a = 1;
|
}
Again place the cursor on the "|" (and remove it of course) and press ctrl-i, you will notice that the line is not indented. This only works if there is any text in the line.

Ulrich