API problems issued by Api-Tools can currently only be suppressed by using the .api_filters file:
This can be cumbersome, especially for projects like SWT where multiple fragments projects for different CPU architectures share the codebase for that OS and generally using a separate file is also some overhead.
Similar to the java.lang.SuppressWarnings annotation, used to suppress Java compiler warnings, Api-Tools should instead/also provide an annotation based way to manage ignoring API problems.
Analogous the annotation could be named @SuppressAPIProblems.
It would be applied to affected classes or class elements and should accept corresponding parameters to specify the kind of suppressed problem as required (and similar to the values one can pass to @SuppressWarnings).
The RetentionPolicy can probably also be SOURCE if it's not necessary to read them for baseline artifacts.
API problems issued by Api-Tools can currently only be suppressed by using the
.api_filtersfile:This can be cumbersome, especially for projects like SWT where multiple fragments projects for different CPU architectures share the codebase for that OS and generally using a separate file is also some overhead.
Similar to the
java.lang.SuppressWarningsannotation, used to suppress Java compiler warnings, Api-Tools should instead/also provide an annotation based way to manage ignoring API problems.Analogous the annotation could be named
@SuppressAPIProblems.It would be applied to affected classes or class elements and should accept corresponding parameters to specify the kind of suppressed problem as required (and similar to the values one can pass to
@SuppressWarnings).The
RetentionPolicycan probably also beSOURCEif it's not necessary to read them for baseline artifacts.