Community
Participate
Working Groups
A new option is needed for bug 372012 to alert a user when no default annotation has been specified on a package/type, so that he can add those deaults manually. This is necessitated by the fix for bug 366063.
This is in lieu of the current [x] Use non-null as the workspace wide default and [x] Use non-null as the project wide default, which we are finding is impossible to support in a compatible manner. See Markus' comment https://bugs.eclipse.org/bugs/show_bug.cgi?id=366063#c11 passage beginning with "Maybe we should just remove the default setting from the project or turn it into a warning"
Proposed checkbox label: [ ] Missing NonNullByDefault annotation
(In reply to comment #2) > Proposed checkbox label: > [ ] Missing NonNullByDefault annotation Shouldn't this be a bit more verbose ? As in : [ ] Warn if NonNullByDefault annotation is missing at package level (for named packages) and at top level types (for default package)
(In reply to comment #2) > Proposed checkbox label: > [ ] Missing NonNullByDefault annotation Instead of checkbox we should just make it an error/warning/ignore preference, no? Maybe the verbosity proposed by Srikanth won't be needed then.
The complete description is good for the help page, but the option label shouldn't be too long. Otherwise, you'd have to read yourself to death. We can expand it to "Missing NonNullByDefault annotation on package", but the default package is really a corner case that belongs to the manual. > Instead of checkbox we should just make it an error/warning/ignore preference Yes.
To align with other existing options, the formatting should be: Missing '@NonNullByDefault' annotation on package: Error/Warning/Ignore
Created attachment 211960 [details] proposed fix
I released the patch, as it looks reasonable and it also fixes the compile errors in o.e.jdt.ui caused by fix for bug 372012. http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=a4197b7003e6d51f86fb5968a0bc300c863830ca
Thanks Deepak.