use of org.eclipse.jdt.internal.ui.fix.UnimplementedCodeCleanUp in project che by eclipse.
the class LocalCorrectionsSubProcessor method addUnimplementedMethodsProposals.
public static void addUnimplementedMethodsProposals(IInvocationContext context, IProblemLocation problem, Collection<ICommandAccess> proposals) {
IProposableFix addMethodFix = UnimplementedCodeFix.createAddUnimplementedMethodsFix(context.getASTRoot(), problem);
if (addMethodFix != null) {
Image image = JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
Map<String, String> settings = new Hashtable<String, String>();
settings.put(CleanUpConstants.ADD_MISSING_METHODES, CleanUpOptions.TRUE);
ICleanUp cleanUp = new UnimplementedCodeCleanUp(settings);
proposals.add(new FixCorrectionProposal(addMethodFix, cleanUp, IProposalRelevance.ADD_UNIMPLEMENTED_METHODS, image, context));
}
IProposableFix makeAbstractFix = UnimplementedCodeFix.createMakeTypeAbstractFix(context.getASTRoot(), problem);
if (makeAbstractFix != null) {
Image image = JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
Map<String, String> settings = new Hashtable<String, String>();
settings.put(UnimplementedCodeCleanUp.MAKE_TYPE_ABSTRACT, CleanUpOptions.TRUE);
ICleanUp cleanUp = new UnimplementedCodeCleanUp(settings);
proposals.add(new FixCorrectionProposal(makeAbstractFix, cleanUp, IProposalRelevance.MAKE_TYPE_ABSTRACT, image, context));
}
}
Aggregations