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"?

2 comments
Comment actions Permalink

Hi Willis,

It's not possible to do at the moment.

I'd suggest you to configure and use corresponding live templatehttp://www.jetbrains.com/idea/webhelp/live-templates.html for quick '@SuppressWarnings("unused")' generation then.

Denis

0
Comment actions Permalink

Thanks, Denis. That's a reasonable workaround.

- Will

0

Please sign in to leave a comment.