Community
Participate
Working Groups
Some of our files have an "incomplete last line", which causes problems for certain scripts. For people using Emacs, we have "Options->Editing->Newline at End of File" turned on. Using Jalopy or JUnit to format, this is preserved. For people using Eclipse, the Code Formatter always removes the last newline. I tried increasing the "Preserve blank lines", but that did not fix it. You can replicate this using the default settings. Create a new class. There should be a blank line after the ending }. Right click, choose Format. The blank line disappears. If you then view the file with a tool such as "vi", it will report "Incomplete last line". If you hit return twice at the end of the file, Eclipse leaves them alone. If you put 3 or more, it removes everything except the last 2. I could request that everyone leave 2 blank lines at the end of the file, but I think Eclipse should leave a single one alone.
which build id?
It's been happening as long as I've used Eclipse. I briefly used 2.1.2, but I've primarly been on 3.0, since sometime before the first RC. I'm afraid I don't know the exact number. But it's been present in all the 3.0 RC builds, the 3.0 release and the 3.01 milestone build M20040811.
*** This bug has been marked as a duplicate of 68506 ***