Community
Participate
Working Groups
Java Code Style Formatter inserts carriage return without newline character in XML files after commented out code. This happens only when I switch to UTF8 in General -> Workspace -> Text file encoding. After this happens Eclipse is confused and edits text on the line above I'm editing.
> Java Code Style Formatter inserts carriage return without newline character in > XML files The Java formatter does not format XML (files). Can you give exact steps that reproduce the problem?
Then this is maybe related to Android ADT plugin. Sorry and please close the report if that's the case. I forgot to mention that I use ADT plugin (22.2.1). Steps to reproduce: 1. Open any Layout XML files with commented out parts. 2. Press CTRL + SHIFT + F (Formatter) The error will arise at the last line of the commented out part.
(In reply to Zsolt Bertalan from comment #2) > Then this is maybe related to Android ADT plugin. Sorry and please close the > report if that's the case. I forgot to mention that I use ADT plugin > (22.2.1). > Steps to reproduce: > 1. Open any Layout XML files with commented out parts. > 2. Press CTRL + SHIFT + F (Formatter) > > The error will arise at the last line of the commented out part. If you format an XML file then it might be WTP that causes the bug.
I don't use WTP. I use Android ADT.
(In reply to Zsolt Bertalan from comment #4) > I don't use WTP. I use Android ADT. The question is, into which package you installed ADT. Take a look at the About dialog to check whether WTP is also installed.
I used the Standard Eclipse platform and installed ADT on top of it. JDT and CDT are installed. I don't know why I need CDT. Ah, probably for the Android NDK (which I don't use).
OK, since you don't have WTP installed the Format action comes from ADT. Please report the bug there.
ADT does make use of the XML features from WTP, but its layout editor definitely uses its own formatter by default.