[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: Jave 3.3 code formatter question

"Paul A. Rubin" <rubin@xxxxxxx> wrote in message 
news:f8rc6f$rcf$1@xxxxxxxxxxxxxxxxxxxx
> Is there a whitespace character other than space and tab that occupies 
> just one column and isn't visible in the display?  (Maybe Unicode.

Unfortunately even though Java programs are ostensibly written in Unicode, 
and Unicode does include some characters that could be used this way [1], 
such as Line Separator (LS = 0x2028), the Java Language Specification [2] 
defines the line terminators as just being CR and LF.  So I'm not sure 
whether existing Java compilers would properly interpret this.

[1] http://unicode.org/reports/tr13/tr13-9.html

[2] http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.4


> I'm not sure if it's related to another cosmic annoyance.  In the 
> Formatter -> Comments tab, I've unchecked everything.  I even exited and 
> did a -clean restart to make sure this was absorbed.  Nonetheless,
>
> double xyz;       // comment 1
> double abcdefg;   // comment 2
>
> turns into
>
> double xyz; // comment 1
> double abcdefg; // comment 2
>
> after a save.  I even tried turning off the option to clean up end-of-line 
> whitespace.  Didn't help.

Huh, that seems very peculiar that you would be getting formatting on save 
with your formatting options turned off.  That sure sounds like there's 
still something turned on.  Make sure you don't have some sort of workspace 
setting interfering, or some kind of autoformatting plug-in (possibly 
associated with your version control system?) present.