@@ -502,14 +502,7 @@ def get_input_str(refactor, ctx):
502
502
503
503
@staticmethod
504
504
def get_changes (refactor , input_str , in_hierarchy = False ):
505
- """ Get changes.
506
-
507
- :return Changes:
508
-
509
- """
510
- progress = ProgressHandler ('Calculate changes ...' )
511
- return refactor .get_changes (
512
- input_str , task_handle = progress .handle , in_hierarchy = in_hierarchy )
505
+ return refactor .get_changes (input_str )
513
506
514
507
515
508
class RenameRefactoring (Refactoring ):
@@ -547,6 +540,15 @@ def get_input_str(self, refactor, ctx):
547
540
548
541
return newname
549
542
543
+ @staticmethod
544
+ def get_changes (refactor , input_str , in_hierarchy = False ):
545
+ """ Get changes.
546
+
547
+ :return Changes:
548
+
549
+ """
550
+ return refactor .get_changes (input_str , in_hierarchy = in_hierarchy )
551
+
550
552
551
553
class ExtractMethodRefactoring (Refactoring ):
552
554
@@ -571,16 +573,6 @@ def get_refactor(ctx):
571
573
return extract .ExtractMethod (
572
574
ctx .project , ctx .resource , offset1 , offset2 )
573
575
574
- @staticmethod
575
- def get_changes (refactor , input_str ):
576
- """ Get changes.
577
-
578
- :return Changes:
579
-
580
- """
581
-
582
- return refactor .get_changes (input_str )
583
-
584
576
585
577
class ExtractVariableRefactoring (Refactoring ):
586
578
@@ -605,16 +597,6 @@ def get_refactor(ctx):
605
597
return extract .ExtractVariable (
606
598
ctx .project , ctx .resource , offset1 , offset2 )
607
599
608
- @staticmethod
609
- def get_changes (refactor , input_str ):
610
- """ Get changes.
611
-
612
- :return Changes:
613
-
614
- """
615
-
616
- return refactor .get_changes (input_str )
617
-
618
600
619
601
class InlineRefactoring (Refactoring ):
620
602
@@ -631,14 +613,13 @@ def get_refactor(ctx):
631
613
return inline .create_inline (ctx .project , ctx .resource , offset )
632
614
633
615
@staticmethod
634
- def get_changes (refactor , input_str ):
616
+ def get_changes (refactor , input_str , in_hierarchy = False ):
635
617
""" Get changes.
636
618
637
619
:return Changes:
638
620
639
621
"""
640
- progress = ProgressHandler ('Calculate changes ...' )
641
- return refactor .get_changes (task_handle = progress .handle )
622
+ return refactor .get_changes ()
642
623
643
624
644
625
class UseFunctionRefactoring (Refactoring ):
@@ -656,15 +637,13 @@ def get_refactor(ctx):
656
637
return usefunction .UseFunction (ctx .project , ctx .resource , offset )
657
638
658
639
@staticmethod
659
- def get_changes (refactor , input_str ):
640
+ def get_changes (refactor , input_str , in_hierarchy = False ):
660
641
""" Get changes.
661
642
662
643
:return Changes:
663
644
664
645
"""
665
- progress = ProgressHandler ('Calculate changes ...' )
666
- return refactor .get_changes (
667
- resources = [refactor .resource ], task_handle = progress .handle )
646
+ return refactor .get_changes ()
668
647
669
648
670
649
class ModuleToPackageRefactoring (Refactoring ):
@@ -681,7 +660,7 @@ def get_refactor(ctx):
681
660
return ModuleToPackage (ctx .project , ctx .resource )
682
661
683
662
@staticmethod
684
- def get_changes (refactor , input_str ):
663
+ def get_changes (refactor , input_str , in_hierarchy = False ):
685
664
""" Get changes.
686
665
687
666
:return Changes:
@@ -767,7 +746,7 @@ def get_changes(self, refactor, input_string, in_hierarchy=False):
767
746
changers .append (change_signature .ArgumentReorderer (
768
747
order , autodef = 'None' ))
769
748
770
- return refactor .get_changes (changers )
749
+ return refactor .get_changes (changers , in_hierarchy = in_hierarchy )
771
750
772
751
773
752
class GenerateElementRefactoring (Refactoring ):
0 commit comments