You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Erik Wramner <er...@wramner.name> on 2015/09/29 07:17:07 UTC

[Q] ActiveMQ coding style?

Hello,

I wonder if there is a coding style template for ActiveMQ somewhere? I 
found a discussion for ActiveMQ Artemis where one seems to have been 
developed, but not for core ActiveMQ. Is there one?

The code is nicely formatted as far as I'm concerned, but I have a hard 
time coding without pressing Ctrl-Shift-F (auto format) in Eclipse. It 
is hardwired into me by now. If we don't have a template perhaps I can 
put one together based on the Artemis version and see if it matches the 
existing code reasonably well?

-Erik

Re: [Q] ActiveMQ coding style?

Posted by Erik Wramner <er...@wramner.name>.
Hello again,

I have created a new Eclipse format based on Sun's (well, Oracle's now) 
template, which forms the basis for CXF. I don't use their mixed tab 
policy, but spaces only with indentation size 4. I have increased the 
maximum line length to 120 for code and comments alike.

Applying it to various source files I think it is reasonably stable. 
There are small changes (in particular for comments, we could disable 
line wrapping for them), but most of the code remains unchanged.

Please give it a try. If you like it and have commit rights, perhaps you 
could add it to git or somewhere on the site?

-Erik

On 2015-09-29 14:42, Rob Davies wrote:
> I seem to remember we used to use the CXF coding style at one point?
>> On 29 Sep 2015, at 13:16, Christopher Shannon 
>> <ch...@gmail.com> wrote:
>> 
>> I don't believe there is one, but if you want to put one together I 
>> would
>> also use this as a reference:
>> https://google.github.io/styleguide/javaguide.html and see how well it
>> matches up.
>> 
>> On Tue, Sep 29, 2015 at 1:17 AM, Erik Wramner <er...@wramner.name> 
>> wrote:
>> 
>>> Hello,
>>> 
>>> I wonder if there is a coding style template for ActiveMQ somewhere? 
>>> I
>>> found a discussion for ActiveMQ Artemis where one seems to have been
>>> developed, but not for core ActiveMQ. Is there one?
>>> 
>>> The code is nicely formatted as far as I'm concerned, but I have a 
>>> hard
>>> time coding without pressing Ctrl-Shift-F (auto format) in Eclipse. 
>>> It is
>>> hardwired into me by now. If we don't have a template perhaps I can 
>>> put one
>>> together based on the Artemis version and see if it matches the 
>>> existing
>>> code reasonably well?
>>> 
>>> -Erik
>>> 

Re: [Q] ActiveMQ coding style?

Posted by Rob Davies <ra...@gmail.com>.
I seem to remember we used to use the CXF coding style at one point?
> On 29 Sep 2015, at 13:16, Christopher Shannon <ch...@gmail.com> wrote:
> 
> I don't believe there is one, but if you want to put one together I would
> also use this as a reference:
> https://google.github.io/styleguide/javaguide.html and see how well it
> matches up.
> 
> On Tue, Sep 29, 2015 at 1:17 AM, Erik Wramner <er...@wramner.name> wrote:
> 
>> Hello,
>> 
>> I wonder if there is a coding style template for ActiveMQ somewhere? I
>> found a discussion for ActiveMQ Artemis where one seems to have been
>> developed, but not for core ActiveMQ. Is there one?
>> 
>> The code is nicely formatted as far as I'm concerned, but I have a hard
>> time coding without pressing Ctrl-Shift-F (auto format) in Eclipse. It is
>> hardwired into me by now. If we don't have a template perhaps I can put one
>> together based on the Artemis version and see if it matches the existing
>> code reasonably well?
>> 
>> -Erik
>> 


Re: [Q] ActiveMQ coding style?

Posted by Christopher Shannon <ch...@gmail.com>.
I don't believe there is one, but if you want to put one together I would
also use this as a reference:
https://google.github.io/styleguide/javaguide.html and see how well it
matches up.

On Tue, Sep 29, 2015 at 1:17 AM, Erik Wramner <er...@wramner.name> wrote:

> Hello,
>
> I wonder if there is a coding style template for ActiveMQ somewhere? I
> found a discussion for ActiveMQ Artemis where one seems to have been
> developed, but not for core ActiveMQ. Is there one?
>
> The code is nicely formatted as far as I'm concerned, but I have a hard
> time coding without pressing Ctrl-Shift-F (auto format) in Eclipse. It is
> hardwired into me by now. If we don't have a template perhaps I can put one
> together based on the Artemis version and see if it matches the existing
> code reasonably well?
>
> -Erik
>