@@ -169,7 +169,7 @@ private IfStatement findStart(IfStatement item) {
169169 }
170170 }
171171
172- private static final class AddBlockOperation extends CompilationUnitRewriteOperation {
172+ private static final class AddBlockOperation extends CompilationUnitRewriteOperationWithSourceRange {
173173
174174 private final ChildPropertyDescriptor fBodyProperty ;
175175 private final Statement fBody ;
@@ -266,7 +266,7 @@ public void rewriteASTInternal(CompilationUnitRewrite cuRewrite, LinkedProposalM
266266
267267 }
268268
269- static class RemoveBlockOperation extends CompilationUnitRewriteOperation {
269+ static class RemoveBlockOperation extends CompilationUnitRewriteOperationWithSourceRange {
270270
271271 private final Statement fStatement ;
272272 private final ChildPropertyDescriptor fChild ;
@@ -437,42 +437,42 @@ public static ControlStatementsFix[] createRemoveBlockFix(CompilationUnit compil
437437 RemoveBlockOperation op = new RemoveBlockOperation (item , IfStatement .THEN_STATEMENT_PROPERTY );
438438 removeAllList .add (op );
439439 if (item == statement )
440- result .add (new ControlStatementsFix (FixMessages .ControlStatementsFix_removeIfBlock_proposalDescription , compilationUnit , new CompilationUnitRewriteOperation [] {op }));
440+ result .add (new ControlStatementsFix (FixMessages .ControlStatementsFix_removeIfBlock_proposalDescription , compilationUnit , new CompilationUnitRewriteOperationWithSourceRange [] {op }));
441441 }
442442 }
443443
444444 if (RemoveBlockOperation .satisfiesQuickAssistPrecondition (item , IfStatement .ELSE_STATEMENT_PROPERTY )) {
445445 RemoveBlockOperation op = new RemoveBlockOperation (item , IfStatement .ELSE_STATEMENT_PROPERTY );
446446 removeAllList .add (op );
447447 if (item == statement )
448- result .add (new ControlStatementsFix (FixMessages .ControlStatementsFix_removeElseBlock_proposalDescription , compilationUnit , new CompilationUnitRewriteOperation [] {op }));
448+ result .add (new ControlStatementsFix (FixMessages .ControlStatementsFix_removeElseBlock_proposalDescription , compilationUnit , new CompilationUnitRewriteOperationWithSourceRange [] {op }));
449449 }
450450
451451 if (removeAllList .size () > 1 ) {
452- CompilationUnitRewriteOperation [] allConvert = removeAllList .toArray (new CompilationUnitRewriteOperation [removeAllList .size ()]);
452+ CompilationUnitRewriteOperationWithSourceRange [] allConvert = removeAllList .toArray (new CompilationUnitRewriteOperationWithSourceRange [removeAllList .size ()]);
453453 result .add (new ControlStatementsFix (FixMessages .ControlStatementsFix_removeIfElseBlock_proposalDescription , compilationUnit , allConvert ));
454454 }
455455
456456 return result .toArray (new ControlStatementsFix [result .size ()]);
457457 } else if (statement instanceof WhileStatement ) {
458458 if (RemoveBlockOperation .satisfiesQuickAssistPrecondition (statement , WhileStatement .BODY_PROPERTY )) {
459459 RemoveBlockOperation op = new RemoveBlockOperation (statement , WhileStatement .BODY_PROPERTY );
460- return new ControlStatementsFix [] {new ControlStatementsFix (FixMessages .ControlStatementsFix_removeBrackets_proposalDescription , compilationUnit , new CompilationUnitRewriteOperation [] {op })};
460+ return new ControlStatementsFix [] {new ControlStatementsFix (FixMessages .ControlStatementsFix_removeBrackets_proposalDescription , compilationUnit , new CompilationUnitRewriteOperationWithSourceRange [] {op })};
461461 }
462462 } else if (statement instanceof ForStatement ) {
463463 if (RemoveBlockOperation .satisfiesQuickAssistPrecondition (statement , ForStatement .BODY_PROPERTY )) {
464464 RemoveBlockOperation op = new RemoveBlockOperation (statement , ForStatement .BODY_PROPERTY );
465- return new ControlStatementsFix [] {new ControlStatementsFix (FixMessages .ControlStatementsFix_removeBrackets_proposalDescription , compilationUnit , new CompilationUnitRewriteOperation [] {op })};
465+ return new ControlStatementsFix [] {new ControlStatementsFix (FixMessages .ControlStatementsFix_removeBrackets_proposalDescription , compilationUnit , new CompilationUnitRewriteOperationWithSourceRange [] {op })};
466466 }
467467 } else if (statement instanceof EnhancedForStatement ) {
468468 if (RemoveBlockOperation .satisfiesQuickAssistPrecondition (statement , EnhancedForStatement .BODY_PROPERTY )) {
469469 RemoveBlockOperation op = new RemoveBlockOperation (statement , EnhancedForStatement .BODY_PROPERTY );
470- return new ControlStatementsFix [] {new ControlStatementsFix (FixMessages .ControlStatementsFix_removeBrackets_proposalDescription , compilationUnit , new CompilationUnitRewriteOperation [] {op })};
470+ return new ControlStatementsFix [] {new ControlStatementsFix (FixMessages .ControlStatementsFix_removeBrackets_proposalDescription , compilationUnit , new CompilationUnitRewriteOperationWithSourceRange [] {op })};
471471 }
472472 } else if (statement instanceof DoStatement ) {
473473 if (RemoveBlockOperation .satisfiesQuickAssistPrecondition (statement , DoStatement .BODY_PROPERTY )) {
474474 RemoveBlockOperation op = new RemoveBlockOperation (statement , DoStatement .BODY_PROPERTY );
475- return new ControlStatementsFix [] {new ControlStatementsFix (FixMessages .ControlStatementsFix_removeBrackets_proposalDescription , compilationUnit , new CompilationUnitRewriteOperation [] {op })};
475+ return new ControlStatementsFix [] {new ControlStatementsFix (FixMessages .ControlStatementsFix_removeBrackets_proposalDescription , compilationUnit , new CompilationUnitRewriteOperationWithSourceRange [] {op })};
476476 }
477477 }
478478
0 commit comments