Idea vs Eclipse with @SuppressWarnings annotations

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

If I have an unused method or field and let Idea suppress the warning, Idea inserts @SuppressWarnings({"UnusedDeclaration"})

In the same case, Eclipse inserts @SuppressWarnings("unused")

Idea will respect "unused" but Eclipse will complain about "UnusedDeclaration". Is there any way to get Idea to emit "unused" instead of "UnusedDeclaration"?

Comment actions Permalink

Hi Willis,

It's not possible to do at the moment.

I'd suggest you to configure and use corresponding live template for quick '@SuppressWarnings("unused")' generation then.


Comment actions Permalink

Thanks, Denis. That's a reasonable workaround.

- Will


Please sign in to leave a comment.