def __init__(self, vocabularyController, symbols):
     # create logger with the given configuration
     self.log = logging.getLogger(__name__)
     self.vocabularyController = vocabularyController
     self._view = EnvironmentDependenciesSearcherView(self)
     self.symbols = symbols
     self.flagStop = False
     self.searchTasks = None
 def __init__(self, vocabularyController, symbols):
     # create logger with the given configuration
     self.log = logging.getLogger(__name__)
     self.vocabularyController = vocabularyController
     self._view = EnvironmentDependenciesSearcherView(self)
     self.symbols = symbols
     self.flagStop = False
     self.searchTasks = None
class EnvironmentDependenciesSearcherController(object):
    def __init__(self, vocabularyController, symbols):
        # create logger with the given configuration
        self.log = logging.getLogger(__name__)
        self.vocabularyController = vocabularyController
        self._view = EnvironmentDependenciesSearcherView(self)
        self.symbols = symbols
        self.flagStop = False
        self.searchTasks = None

    def run(self):
        self.log.debug("Start the Environment Dependencies Searcher")
        self._view.run()

    def cancelButton_clicked_cb(self, event):
        """Callback executed when the users cancel the execution
        of the environment deps searcher"""
        self.flagStop = True
        self._view.destroy()

    def executeButton_clicked_cb(self, event):
        """Callback executed when the user requests to start the execution"""
        self._view.cancelButton.set_sensitive(True)

        self.flagStop = False

        # create a job to execute the partitioning
        Job(self.startEnvDepsSearch())

    def startEnvDepsSearch(self):
        if len(self.symbols) > 0:
            try:
                (yield ThreadedTask(self.envDepsSearch))
            except TaskError, e:
                self.log.error(
                    "Error while proceeding to the environmental search dependencies on symbols: {0}"
                    .format(str(e)))
        else:
class EnvironmentDependenciesSearcherController(object):

    def __init__(self, vocabularyController, symbols):
        # create logger with the given configuration
        self.log = logging.getLogger(__name__)
        self.vocabularyController = vocabularyController
        self._view = EnvironmentDependenciesSearcherView(self)
        self.symbols = symbols
        self.flagStop = False
        self.searchTasks = None

    def run(self):
        self.log.debug("Start the Environment Dependencies Searcher")
        self._view.run()

    def cancelButton_clicked_cb(self, event):
        """Callback executed when the users cancel the execution
        of the environment deps searcher"""
        self.flagStop = True
        self._view.destroy()

    def executeButton_clicked_cb(self, event):
        """Callback executed when the user requests to start the execution"""
        self._view.cancelButton.set_sensitive(True)

        self.flagStop = False

        # create a job to execute the partitioning
        Job(self.startEnvDepsSearch())

    def startEnvDepsSearch(self):
        if len(self.symbols) > 0:
            try:
                (yield ThreadedTask(self.envDepsSearch))
            except TaskError, e:
                self.log.error("Error while proceeding to the environmental search dependencies on symbols: {0}".format(str(e)))
        else: