summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2012-06-21 12:42:35 (EDT)
committer Markus Keller2012-06-21 12:42:35 (EDT)
commit3288d85e7f4f1b65d75ac4a5cbab9095933862b4 (patch)
tree1ba99c33f19df3d80076bb42a1990377862072a9
parent8cd12906e44758cb73ff76b6b70f3eca52f691d3 (diff)
downloadeclipse.jdt.ui-3288d85e7f4f1b65d75ac4a5cbab9095933862b4.zip
eclipse.jdt.ui-3288d85e7f4f1b65d75ac4a5cbab9095933862b4.tar.gz
eclipse.jdt.ui-3288d85e7f4f1b65d75ac4a5cbab9095933862b4.tar.bz2
Bug 337977: [quick fix] Add quick fixes for null annotations
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullAnnotationsCleanUp.java1
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullRewriteOperations.java1
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java2
3 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullAnnotationsCleanUp.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullAnnotationsCleanUp.java
index 056b0bc..3386606 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullAnnotationsCleanUp.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullAnnotationsCleanUp.java
@@ -100,6 +100,7 @@ public class NullAnnotationsCleanUp extends AbstractMultiFix {
case IProblem.RedundantNullCheckOnNonNullLocalVariable:
case IProblem.RequiredNonNullButProvidedNull:
case IProblem.RequiredNonNullButProvidedPotentialNull:
+ case IProblem.RequiredNonNullButProvidedSpecdNullable:
case IProblem.RequiredNonNullButProvidedUnknown:
case IProblem.ParameterLackingNullableAnnotation:
result.add(NullFixMessages.NullAnnotationsCleanUp_add_nullable_annotation);
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullRewriteOperations.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullRewriteOperations.java
index 99ac1d0..be1c540 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullRewriteOperations.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/NullRewriteOperations.java
@@ -264,6 +264,7 @@ public class NullRewriteOperations {
break;
case IProblem.RequiredNonNullButProvidedNull:
case IProblem.RequiredNonNullButProvidedPotentialNull:
+ case IProblem.RequiredNonNullButProvidedSpecdNullable:
case IProblem.RequiredNonNullButProvidedUnknown:
if (NullQuickFixes.isComplainingAboutArgument(selectedNode)) {
//TODO: duplication
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java
index 635ea8f..da473a4 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java
@@ -238,6 +238,7 @@ public class QuickFixProcessor implements IQuickFixProcessor {
case IProblem.SafeVarargsOnNonFinalInstanceMethod:
case IProblem.RequiredNonNullButProvidedNull:
case IProblem.RequiredNonNullButProvidedPotentialNull:
+ case IProblem.RequiredNonNullButProvidedSpecdNullable:
case IProblem.RequiredNonNullButProvidedUnknown:
case IProblem.IllegalReturnNullityRedefinition:
case IProblem.IllegalRedefinitionToNonNullParameter:
@@ -687,6 +688,7 @@ public class QuickFixProcessor implements IQuickFixProcessor {
case IProblem.ParameterLackingNullableAnnotation:
case IProblem.NonNullLocalVariableComparisonYieldsFalse:
case IProblem.RedundantNullCheckOnNonNullLocalVariable:
+ case IProblem.RequiredNonNullButProvidedSpecdNullable:
NullQuickFixes.addReturnAndArgumentTypeProposal(context, problem, proposals);
break;
default: