Example #1
0
 def __init__(self, view, context, changes):
     self.view = view
     self.context = context
     self.changes = changes
     self.handler = TaskHandle(name='organizer_imports_handler')
     self.handler.add_observer(self.finish)
     threading.Thread.__init__(self)
Example #2
0
 def input_callback(self, input_str):
     with ropemate.context_for(self.view) as context:
         if input_str is None:
             return
         changes = self.get_changes(input_str)
         self.handle = TaskHandle(name="refactoring_handle")
         self.handle.add_observer(self.refactoring_done)
         context.project.do(changes, task_handle=self.handle)
Example #3
0
 def new_name_entered(self, new_name):
     with ropemate.ropecontext(self.view) as context:
         if new_name is None or new_name == self.rename.old_name:
             return
         changes = self.rename.get_changes(new_name, in_hierarchy=True)
         self.handle = TaskHandle(name="rename_handle")
         self.handle.add_observer(self.refactoring_done)
         context.project.do(changes, task_handle=self.handle)
Example #4
0
 def new_name_entered(self, new_name):
     with ropemate.ropecontext(self.view) as context:
         if new_name is None:
             return
         changes = self.extract.get_changes(new_name)
         print changes
         self.handle = TaskHandle(name="extract_handle")
         self.handle.add_observer(self.refactoring_done)
         context.project.do(changes, task_handle=self.handle)
Example #5
0
 def __init__(self, msg):
     """ Init progress handler. """
     self.handle = TaskHandle(name="refactoring_handle")
     self.handle.add_observer(self)
     self.message = msg
Example #6
0
 def __init__(self, msg):
     self.handle = TaskHandle(name="refactoring_handle")
     self.handle.add_observer(self)
     self.message = msg