#188 closed Bugs (None)
BUG by formating the "print <<<label" directive
| Reported by: | nobody | Owned by: | nobody |
|---|---|---|---|
| Priority: | 5 | Milestone: | |
| Component: | PHP Editor | Version: | None |
| Keywords: | Cc: |
Description
English Version:
Hello. I thing I have found a bug in PHPEclipse
concerning the Code Formatter. All is working prety
well, but there is one nasty thing:
If you use the following code within a PHP document:
print <<<EOT
<html>
<body>
This is a Text...
</body>
</html>
EOT;
You may get in troubles. The PHP Parser does not allow
Whitespaces before or after the last line "EOT;". So
this label should be left alone and may not be moved!
But if this Code stands between any IF clauses or any
other blocks (DO WHILE.. etc.), the Code Formater
places in this segment, though!
The compiler does not allow whitespaces before and not
behind this label!
Furthermore, my oroginal HTML Code is placed in. That
is not my goal. I don't want to see my target HTML code
in the source file moved to the right.
=> BUG
So I think its a bug and should be fixed as follows:
The
print <<<{LABEL}
{LABEL};
segments may not be touched by the Code Formatter!
Thats all I think? :)
Tanks for the great work anyway!
Cheerz,
Lars
--------------------------------------------------------
Deutsche Version:
Der Code Formatter ist wunderbar.
Allerdings hat er ein grosses Problem, sofern man
mitten im PHP Dokument mit
print <<<EOT
<html>
<body>
Text
</body>
</html>
EOT;
einen Text ausgibt.
Der PHP Parser fordert, dass die Zeile "EOT;" ohne
Leerzeichen am Ende oder am Anfang ist!
Befindet sich die obige Anweisung in einem
verschachtelten if, dann rückt der Code-Formatter? die
HTML Zeilen ein. Das darf aber hier nicht sein, da der
Compiler sonst einen Fehler meldet.
Aussedem ist es nicht gewünscht, dass der HTML Code
innerhalb dieses Bereichs eingerückt wird, da dies im
Ausgabefile ebenfalls der Fall wäre!!
=> BUG (sehr störend)!
Ich hoffe das wird schnellstmöglich bereinigt.
Change History (2)
comment:1 Changed 9 years ago by axelcl
comment:2 Changed 9 years ago by axelcl
- Status changed from assigned to closed
Logged In: YES user_id=1143825 Fixed in 1.1.2.
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/eclipsebutton_med.png)