Bug 380247 - Indentation is not appropriate after an update
Summary: Indentation is not appropriate after an update
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-22 07:34 EDT by John Smith CLA
Modified: 2020-05-14 10:15 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Smith CLA 2012-05-22 07:34:03 EDT
Build Identifier: Version: Helios Service Release 2 Build id: 20110301-1815

Hello!
Recently I've made an update to Eclipse.
Now the web formatter puts every child HTML element further away to the right.
There was no such feature in the older version I was using.
This is great, but the formatter does not respect php blocks and formats the whole file as one. But php blocks can contain functions which output html (by ending php block and starting a new one, not by echo). And these blocks do not always appear in file in the order they appear in HTML output. So indentation is completely random.
My suggestion is: restart indentation depth on every ?php tag. So it will not start inside the function at some random position from the left. Or remove this depth incrementing totally by an option.

Reproducible: Always

Steps to Reproduce:
1. Create some document like this:
<?php
function foo()
{
?>
<div>Starting something...
<?php
}
?>
<html>
<head>
<title></title>
<?php
function foo2()
{
?>
<div>Starting something 2...
<?php
}
?>
</head>
<body>
</body>
</html>

2. Observe how <html> tag gets indented for no particular reason