Tabnine Logo
NullAnnotationsCleanUp
Code IndexAdd Tabnine to your IDE (free)

How to use
NullAnnotationsCleanUp
in
org.eclipse.jdt.internal.ui.fix

Best Java code snippets using org.eclipse.jdt.internal.ui.fix.NullAnnotationsCleanUp (Showing top 10 results out of 315)

origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
protected ICleanUpFix createFix(CompilationUnit compilationUnit) throws CoreException {
  return this.createFix(compilationUnit, null);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public CleanUpRequirements getRequirements() {
  Map<String, String> requiredOptions= getRequiredOptions();
  return new CleanUpRequirements(true, false, false, requiredOptions);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public static void addMoveTypeAnnotationToTypeProposal(IInvocationContext context, IProblemLocation problem, Collection<ICommandAccess> proposals) {
  TypeAnnotationFix fix= TypeAnnotationFix.createMoveAnnotationsToTypeAnnotationsFix(context.getASTRoot(), problem);
  if (fix == null)
    return;

  Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
  Map<String, String> options= new Hashtable<>();
  FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new NullAnnotationsCleanUp(options, problem.getProblemId()), IProposalRelevance.REMOVE_REDUNDANT_NULLNESS_ANNOTATION, image, context);
  proposals.add(proposal);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public static void addRemoveRedundantAnnotationProposal(IInvocationContext context, IProblemLocation problem, Collection<ICommandAccess> proposals) {
  NullAnnotationsFix fix= NullAnnotationsFix.createRemoveRedundantNullAnnotationsFix(context.getASTRoot(), problem);
  if (fix == null)
    return;
  Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
  Map<String, String> options= new Hashtable<>();
  FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new NullAnnotationsCleanUp(options, problem.getProblemId()), IProposalRelevance.REMOVE_REDUNDANT_NULLNESS_ANNOTATION, image, context);
  proposals.add(proposal);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public static void addRemoveRedundantAnnotationProposal(IInvocationContext context, IProblemLocation problem, Collection<ICommandAccess> proposals) {
  NullAnnotationsFix fix= NullAnnotationsFix.createRemoveRedundantNullAnnotationsFix(context.getASTRoot(), problem);
  if (fix == null)
    return;
  Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
  Map<String, String> options= new Hashtable<>();
  FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new NullAnnotationsCleanUp(options, problem.getProblemId()), IProposalRelevance.REMOVE_REDUNDANT_NULLNESS_ANNOTATION, image, context);
  proposals.add(proposal);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public CleanUpRequirements getRequirements() {
  Map<String, String> requiredOptions= getRequiredOptions();
  return new CleanUpRequirements(true, false, false, requiredOptions);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
protected ICleanUpFix createFix(CompilationUnit compilationUnit) throws CoreException {
  return this.createFix(compilationUnit, null);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public static void addAddMissingDefaultNullnessProposal(IInvocationContext context, IProblemLocation problem, Collection<ICommandAccess> proposals) throws CoreException {
  final CompilationUnit astRoot= context.getASTRoot();
  if (astRoot.getJavaElement().getElementName().equals(JavaModelUtil.PACKAGE_INFO_JAVA)) {
    NullAnnotationsFix fix= NullAnnotationsFix.createAddMissingDefaultNullnessAnnotationsFix(astRoot, problem);
    Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
    Map<String, String> options= new Hashtable<>();
    FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new NullAnnotationsCleanUp(options, problem.getProblemId()), IProposalRelevance.ADD_MISSING_NULLNESS_ANNOTATION, image,
        context);
    proposals.add(proposal);
  } else {
    final IPackageFragment pack= (IPackageFragment) astRoot.getJavaElement().getParent();
    String nonNullByDefaultAnnotationname= NullAnnotationsFix.getNonNullByDefaultAnnotationName(pack, true);
    String label= Messages.format(CorrectionMessages.NullAnnotationsCorrectionProcessor_create_packageInfo_with_defaultnullness, new String[] { nonNullByDefaultAnnotationname });
    proposals.add(CreatePackageInfoWithDefaultNullnessProposal.createFor(problem.getProblemId(), label, pack));
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new NullAnnotationsCleanUp(options, problem.getProblemId()), relevance, image, context);
proposals.add(proposal);
origin: org.eclipse.jdt/org.eclipse.jdt.ui

FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new NullAnnotationsCleanUp(options, problem.getProblemId()), relevance, image, context);
proposals.add(proposal);
org.eclipse.jdt.internal.ui.fixNullAnnotationsCleanUp

Javadoc

Cleanup for adding required null annotations. Crafted after the lead of Java50CleanUp

Most used methods

  • <init>
  • createFix
  • getRequiredOptions

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now