[Checkers] Spaces in commented JSR 308 annotations

Mahmood Ali mahmood at MIT.EDU
Mon Jun 9 18:43:51 EDT 2008


Hi Sung,

Thanks for your input.

I have just made a new release of the JSR308 compiler and the checkers.

The new compiler accepts an argument -Xspacesincomments that causes  
the compiler to recognize annotation comments when they contain  
spaces.  You may need to be careful with block comments (not javadocs)  
that start with @, though.

- Mahmood

On Jun 7, 2008, at 8:42 AM, Michael Ernst wrote:

> Sung-
>
> Thanks for trying our pluggable type-checkers.  I'm sorry you had  
> trouble,
> and we want to figure out how to solve your problem.  (Do let us  
> know if
> you have any other problems that hinder your use of the tools.)
>
> As I understand it, you had a problem regarding spaces in annotation
> comments.
>
> Eclipse's built-in indentation command (invoked via "Source > Correct
> Indentation") inserts space in comments, including those that  
> represent JSR
> 308 annotations; for instance, it converts
>  List</*@NonNull*/ String> myStrings;
> to
>  List</* @NonNull */ String> myStrings;
>
> Then, the JSR 308 compiler doesn't recognize the annotation comment  
> any
> more, because by default the compiler only recognizes annotation  
> comments
> with no spaces.
>
> 1. Is the above description correct?
>
> 2. Is there a way to configure the "Correct Indentation" action so  
> that it
> does not insert the extra spaces?  (I'm interested in this even if  
> you are
> not willing to customize your Eclipse in that manner.)
>
> 3. You would like an option to the JSR 308 compiler that will cause  
> it to
> recognize annotation comments even when they contain spaces.  Do you  
> have
> other requests regarding the compiler?
>
>                     Thanks,
>
>                    -Mike
>
> _______________________________________________
> checkers mailing list
> checkers at lists.csail.mit.edu
> https://lists.csail.mit.edu/mailman/listinfo/checkers




More information about the checkers mailing list