I'm writing a PMD plug-in for Eclipse which lets users suppress PMD warnings by adding annotations like @SuppressWarnings("PMD.ReturnEmptyArrayRatherThanNull")
. Since Eclipse doesn't know that PMD.ReturnEmptyArrayRatherThanNull
is a valid token, it warns the token is unsupported and offers a quick fix to remove it.
How can it let Eclipse know that this is in fact a supported SuppressWarnings token and that it should not mark it with a warning?
I'm not looking for a way the user can suppress the warning. I know about the "Ignore unhandled token in SuppressWarnings" preference in Eclipse. This is a workaround and has the disadvantage that Eclipse does not report any unsupported token at all making it rather difficult to e.g. find a typo in a SuppressWarnings token.
What I'm looking for is a way I as a plug-in developer can extend Eclipse so it recognizes the PMD token as supported SuppressWarnings token.
So far I have only found that the token supported by Eclipse are hard coded into the Eclipse Java compiler but have not found an extension point or something else that lets me add the PMD token to the list of supported SuppressWarnings token.
org.jboss.tools.common.validation.warnings
. But I don't get it yet how this is implemented. Maybe it would be interesting for you as well. If you find out anything, would you please let me know? – Terminate