Selectively writing to an external annotation file

I share a codebase with another Eclipse developer. I'm running into some discrepancies with warning suppression between the two IDEs.

I have several classes that are used only at runtime through reflection. Idea complains that the classes are unused and offers to suppress the warning using "UnusedDeclaration". I then have to manually replace "UnusedDeclaration" with "unused" because Eclipse doesn't know about "UnusedDeclaration". However, even after I change them to "unused", Eclipse will still complain because it doesn't understand marking a class as unused; apparently it only knows about marking variables, methods and fields as unused. As a workaround in Idea, I tried putting the "UnusedDeclaration" for the class into an external annotation file; this has the desired effect of keeping Eclipse from freaking. But it seems that once you turn on external annotations in Idea, ALL of the these inspection annotations will be put into the external annotation file. What I want to happen is for Idea to only put SOME inspection annotations that I choose (the ones that Eclipse doesn't understand) into the external annotations file and leave the rest in source code.

Is there any way to individually control where inspection annotations are placed?


<wrong comment>

Message was edited by: Denis Zhdanov


Another option is to manually add these classes as entry points. This works when I manually add them as entry points in the inspection results panel after manually running the inspection. But the next time I run the inspection I have to add them again. Is there any way to ad them permanently?


Please sign in to leave a comment.