dev@grizzly.java.net

Re: SSLConfig / code formatting

From: Bruno Harbulot <Bruno.Harbulot_at_manchester.ac.uk>
Date: Mon, 06 Apr 2009 21:13:40 +0100

Justin Lee wrote:
> The glassfish format, fwiw, is something akin to this:
> http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

Thanks. It seems that Grizzly follows the same convention. I guess I got
it wrong with Eclipse since it was configured by default to mix tabs and
spaces. I'll force it to use only spaces.
"Four spaces should be used as the unit of indentation. The exact
construction of the indentation (spaces vs. tabs) is unspecified. Tabs
must be set exactly every 8 spaces (not 4)." [*]
Eclipse also reformats the comments, which I'm not sure Netbeans does.

Best wishes,

Bruno.

[*] <http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#262>

> Bruno Harbulot wrote:
>> Hello,
>>
>> Oleksiy Stashok wrote:
>>> Hi Bruno,
>>>
>>>>> If you don't mind trying to have default values closer to those of
>>>>> the JSSE Ref. Guide, I'll try to come up with a patch over the next
>>>>> few days.
>>>>> Not only that I don't mind, I certainly would like to see it
>>>>> working better.
>>>>> I haven't follow Ref Guide, I didn't even know that it existed.
>>>>
>>>> I've just sent a patch to issue #494. Please let me know what you
>>>> think. (I wasn't sure about the Grizzly formatting conventions, so
>>>> I've used "Java conventions" in Eclipse.)
>>> Thank you very much for patch!
>>> +1 for it.
>>>
>>> Hubert, can you pls. check it will fine for default GWS security
>>> scenario?
>>
>> (The following is a bit off-topic, not necessarily specific to Grizzly
>> in fact.)
>>
>> As Hubert commented on issue #494, I did get the code formatting
>> wrong, sorry. I realise this is a big problem, perhaps not too big for
>> a single patch like this, but in general for open-source projects.
>> Since I use mainly Eclipse, I tend to use the Eclipse default
>> settings, which seem to differ from the Netbeans default settings (and
>> I prefer tabs). I had used the "Java conventions" settings for this
>> particular patch, but I hadn't noticed it was mixing spaces and tabs
>> apparently.
>>
>> I'm not planning to start an IDE war or a tab-vs-space war, but I'd
>> like to know if there is a way to convert the settings from one IDE to
>> the other. I don't really mind whether it's using spaces or tabs, as
>> long as pressing Ctrl/Command+Shift+F does the formatting.
>>
>> Some projects (for example Restlet) mandate a specific style to make
>> sure every contributor uses the same. It's an Eclipse code-formatting
>> style file
>> <http://restlet.tigris.org/source/browse/*checkout*/restlet/trunk/build/tmpl/eclipse/codeFormatter.xml?revision=2384&content-type=text%2Fplain>.
>>
>>
>> Does anyone know if there is something similar in Netbeans or if there
>> is such an Eclipse style file that matches the Netbeans default?
>>
>> Best wishes,
>>
>> Bruno.