Search in sources :

Example 1 with UnimplementedCodeFix

use of org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFix in project che by eclipse.

the class ModifierCorrectionSubProcessor method addMakeTypeAbstractProposal.

private static void addMakeTypeAbstractProposal(IInvocationContext context, TypeDeclaration parentTypeDecl, Collection<ICommandAccess> proposals) {
    MakeTypeAbstractOperation operation = new UnimplementedCodeFix.MakeTypeAbstractOperation(parentTypeDecl);
    String label = Messages.format(CorrectionMessages.ModifierCorrectionSubProcessor_addabstract_description, BasicElementLabels.getJavaElementName(parentTypeDecl.getName().getIdentifier()));
    UnimplementedCodeFix fix = new UnimplementedCodeFix(label, context.getASTRoot(), new CompilationUnitRewriteOperation[] { operation });
    Image image = JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
    FixCorrectionProposal proposal = new FixCorrectionProposal(fix, null, IProposalRelevance.MAKE_TYPE_ABSTRACT_FIX, image, context);
    proposals.add(proposal);
}
Also used : FixCorrectionProposal(org.eclipse.jdt.internal.ui.text.correction.proposals.FixCorrectionProposal) UnimplementedCodeFix(org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFix) MakeTypeAbstractOperation(org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFix.MakeTypeAbstractOperation) Image(org.eclipse.swt.graphics.Image)

Aggregations

UnimplementedCodeFix (org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFix)1 MakeTypeAbstractOperation (org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFix.MakeTypeAbstractOperation)1 FixCorrectionProposal (org.eclipse.jdt.internal.ui.text.correction.proposals.FixCorrectionProposal)1 Image (org.eclipse.swt.graphics.Image)1