You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by David Blevins <da...@visi.com> on 2006/07/16 03:40:02 UTC

Regex's for cleaning JAXB2 generated classes

Posting these here so I don't loose them.  These regex's yank out  
boiler-plate javadoc that is pretty much meaningless.  It should  
leave good javadoc behind.

F: */\*\*.*\n.*(Gets|Sets) the.*\n.*\n.*@(return|param).*\n.* 
(possible|allowed).*\n.*link.*\n.*\n.*\*/.*\n
R:

F: */\*\*\n(^ +\*.*\n){5}(^.*inside the JAXB.*\n)(^ +\*.*\n){8}^ +\*/\n
R:

F:^//.*\n^//.*\n^//.*\n^//.*\n^//.*\n^//.*\n
R:/**\n  *\n  * Copyright 2006 The Apache Software Foundation or its  
licensors, as applicable.\n  *\n  *  Licensed under the Apache  
License, Version 2.0 (the "License");\n  *  you may not use this file  
except in compliance with the License.\n  *  You may obtain a copy of  
the License at\n  *\n  *     http://www.apache.org/licenses/ 
LICENSE-2.0\n  *\n  *  Unless required by applicable law or agreed to  
in writing, software\n  *  distributed under the License is  
distributed on an "AS IS" BASIS,\n  *  WITHOUT WARRANTIES OR  
CONDITIONS OF ANY KIND, either express or implied.\n  *  See the  
License for the specific language governing permissions and\n  *   
limitations under the License.\n  */

F:.*&lt;.*\n| *\* *</?pre> *\n|.*Java class for.*\n|.*The following  
schema.*\n
R:

F:^ *\* *\n^ *\* *\n
R:

F: */\*\*\n(^ +\*.*\n){5}(^.*inside the JAXB.*\n)(^ +\*.*\n){8}^ +\*/\n
R:



Re: Regex's for cleaning JAXB2 generated classes

Posted by Dain Sundstrom <da...@iq80.com>.
Correction.... should be

F: */\*\*.*\n.*(Gets|Sets) the.*\n.*\n[^@]*\n.*link.*\n.*\n.*\n.*\*/.*\n
R:

-dain
On Sep 14, 2007, at 3:57 PM, Dain Sundstrom wrote:

> One more replacement for some new comments in JaxB
>
> F: */\*\*.*\n.*(Gets|Sets) the.*\n.*\n[^@]*\n.*link.*\n.*\*/.*\n
> R:
>
> Also note that the text starts with the first character after the  
> ':'.  In this case the first character is ' '.
>
> -dain
>
> On Jul 15, 2006, at 6:40 PM, David Blevins wrote:
>
>> Posting these here so I don't loose them.  These regex's yank out  
>> boiler-plate javadoc that is pretty much meaningless.  It should  
>> leave good javadoc behind.
>>
>> F: */\*\*.*\n.*(Gets|Sets) the.*\n.*\n.*@(return|param).*\n.* 
>> (possible|allowed).*\n.*link.*\n.*\n.*\*/.*\n
>> R:
>>
>> F: */\*\*\n(^ +\*.*\n){5}(^.*inside the JAXB.*\n)(^ +\*.*\n){8}^ + 
>> \*/\n
>> R:
>>
>> F:^//.*\n^//.*\n^//.*\n^//.*\n^//.*\n^//.*\n
>> R:/**\n  *\n  * Copyright 2006 The Apache Software Foundation or  
>> its licensors, as applicable.\n  *\n  *  Licensed under the Apache  
>> License, Version 2.0 (the "License");\n  *  you may not use this  
>> file except in compliance with the License.\n  *  You may obtain a  
>> copy of the License at\n  *\n  *     http://www.apache.org/ 
>> licenses/LICENSE-2.0\n  *\n  *  Unless required by applicable law  
>> or agreed to in writing, software\n  *  distributed under the  
>> License is distributed on an "AS IS" BASIS,\n  *  WITHOUT  
>> WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
>> \n  *  See the License for the specific language governing  
>> permissions and\n  *  limitations under the License.\n  */
>>
>> F:.*&lt;.*\n| *\* *</?pre> *\n|.*Java class for.*\n|.*The  
>> following schema.*\n
>> R:
>>
>> F:^ *\* *\n^ *\* *\n
>> R:
>>
>> F: */\*\*\n(^ +\*.*\n){5}(^.*inside the JAXB.*\n)(^ +\*.*\n){8}^ + 
>> \*/\n
>> R:
>>
>>
>


Re: Regex's for cleaning JAXB2 generated classes

Posted by Dain Sundstrom <da...@iq80.com>.
One more replacement for some new comments in JaxB

F: */\*\*.*\n.*(Gets|Sets) the.*\n.*\n[^@]*\n.*link.*\n.*\*/.*\n
R:

Also note that the text starts with the first character after the  
':'.  In this case the first character is ' '.

-dain

On Jul 15, 2006, at 6:40 PM, David Blevins wrote:

> Posting these here so I don't loose them.  These regex's yank out  
> boiler-plate javadoc that is pretty much meaningless.  It should  
> leave good javadoc behind.
>
> F: */\*\*.*\n.*(Gets|Sets) the.*\n.*\n.*@(return|param).*\n.* 
> (possible|allowed).*\n.*link.*\n.*\n.*\*/.*\n
> R:
>
> F: */\*\*\n(^ +\*.*\n){5}(^.*inside the JAXB.*\n)(^ +\*.*\n){8}^ + 
> \*/\n
> R:
>
> F:^//.*\n^//.*\n^//.*\n^//.*\n^//.*\n^//.*\n
> R:/**\n  *\n  * Copyright 2006 The Apache Software Foundation or  
> its licensors, as applicable.\n  *\n  *  Licensed under the Apache  
> License, Version 2.0 (the "License");\n  *  you may not use this  
> file except in compliance with the License.\n  *  You may obtain a  
> copy of the License at\n  *\n  *     http://www.apache.org/licenses/ 
> LICENSE-2.0\n  *\n  *  Unless required by applicable law or agreed  
> to in writing, software\n  *  distributed under the License is  
> distributed on an "AS IS" BASIS,\n  *  WITHOUT WARRANTIES OR  
> CONDITIONS OF ANY KIND, either express or implied.\n  *  See the  
> License for the specific language governing permissions and\n  *   
> limitations under the License.\n  */
>
> F:.*&lt;.*\n| *\* *</?pre> *\n|.*Java class for.*\n|.*The following  
> schema.*\n
> R:
>
> F:^ *\* *\n^ *\* *\n
> R:
>
> F: */\*\*\n(^ +\*.*\n){5}(^.*inside the JAXB.*\n)(^ +\*.*\n){8}^ + 
> \*/\n
> R:
>
>


Re: Regex's for cleaning JAXB2 generated classes

Posted by David Blevins <da...@visi.com>.
On Jul 22, 2006, at 4:09 AM, Jacek Laskowski wrote:

> On 7/20/06, David Blevins <da...@visi.com> wrote:
>>
>> On Jul 16, 2006, at 5:22 AM, Jacek Laskowski wrote:
>>
>> > On 7/16/06, David Blevins <da...@visi.com> wrote:
>> >> Posting these here so I don't loose them.  These regex's yank out
>> >> boiler-plate javadoc that is pretty much meaningless.  It should
>> >> leave good javadoc behind.
>> >
>> > Well, but you didn't write how one could use it and you might
>> > eventually forget it, too ;-) What are these F:'s and R:'s?
>>
>> Find and Replace.
>
> And the last but not least, how could one use it? =P

I just used find and replace in intellij.

-David

> Jacek
>
> -- 
> Jacek Laskowski
> http://www.laskowski.net.pl
>


Re: Regex's for cleaning JAXB2 generated classes

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 7/20/06, David Blevins <da...@visi.com> wrote:
>
> On Jul 16, 2006, at 5:22 AM, Jacek Laskowski wrote:
>
> > On 7/16/06, David Blevins <da...@visi.com> wrote:
> >> Posting these here so I don't loose them.  These regex's yank out
> >> boiler-plate javadoc that is pretty much meaningless.  It should
> >> leave good javadoc behind.
> >
> > Well, but you didn't write how one could use it and you might
> > eventually forget it, too ;-) What are these F:'s and R:'s?
>
> Find and Replace.

And the last but not least, how could one use it? =P

Jacek

-- 
Jacek Laskowski
http://www.laskowski.net.pl

Re: Regex's for cleaning JAXB2 generated classes

Posted by David Blevins <da...@visi.com>.
On Jul 16, 2006, at 5:22 AM, Jacek Laskowski wrote:

> On 7/16/06, David Blevins <da...@visi.com> wrote:
>> Posting these here so I don't loose them.  These regex's yank out
>> boiler-plate javadoc that is pretty much meaningless.  It should
>> leave good javadoc behind.
>
> Well, but you didn't write how one could use it and you might
> eventually forget it, too ;-) What are these F:'s and R:'s?

Find and Replace.

-David


Re: Regex's for cleaning JAXB2 generated classes

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 7/16/06, David Blevins <da...@visi.com> wrote:
> Posting these here so I don't loose them.  These regex's yank out
> boiler-plate javadoc that is pretty much meaningless.  It should
> leave good javadoc behind.

Well, but you didn't write how one could use it and you might
eventually forget it, too ;-) What are these F:'s and R:'s?

Jacek

-- 
Jacek Laskowski
http://www.laskowski.net.pl