Search in sources :

Example 1 with UnimplementedCodeFixCore

use of org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFixCore in project eclipse.jdt.ls by eclipse.

the class ModifierCorrectionSubProcessor method addMakeTypeAbstractProposal.

private static void addMakeTypeAbstractProposal(IInvocationContext context, TypeDeclaration parentTypeDecl, Collection<ChangeCorrectionProposal> proposals) {
    MakeTypeAbstractOperation operation = new UnimplementedCodeFixCore.MakeTypeAbstractOperation(parentTypeDecl);
    String label = Messages.format(CorrectionMessages.ModifierCorrectionSubProcessor_addabstract_description, BasicElementLabels.getJavaElementName(parentTypeDecl.getName().getIdentifier()));
    UnimplementedCodeFixCore fix = new UnimplementedCodeFixCore(label, context.getASTRoot(), new CompilationUnitRewriteOperation[] { operation });
    FixCorrectionProposal proposal = new FixCorrectionProposal(fix, null, IProposalRelevance.MAKE_TYPE_ABSTRACT_FIX, context);
    proposals.add(proposal);
}
Also used : FixCorrectionProposal(org.eclipse.jdt.ls.core.internal.corrections.proposals.FixCorrectionProposal) MakeTypeAbstractOperation(org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFixCore.MakeTypeAbstractOperation) UnimplementedCodeFixCore(org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFixCore)

Aggregations

UnimplementedCodeFixCore (org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFixCore)1 MakeTypeAbstractOperation (org.eclipse.jdt.internal.corext.fix.UnimplementedCodeFixCore.MakeTypeAbstractOperation)1 FixCorrectionProposal (org.eclipse.jdt.ls.core.internal.corrections.proposals.FixCorrectionProposal)1