Esempio n. 1
0
 def enable_item(self):
     dependencies = self._are_dependencies_fulfilled()
     enabled = len(dependencies) == 0
     self._set_state(enabled)
     if not enabled:
         from ATE.spyder.widgets.actions_on.utils.ItemTrace import ItemTrace
         ItemTrace(
             dependencies, self.text(),
             'item depends on the elemnt(s) \nabove which is(are) disabled'
         ).exec_()
Esempio n. 2
0
    def delete_item(self):
        from ATE.spyder.widgets.actions_on.utils.ItemTrace import ItemTrace
        if not ItemTrace(self.dependency_list, self.text(), self.project_info.parent, message="Are you sure you want to delete ?").exec_():
            return

        # emit event to update tab view
        self.model().delete_file.emit(self.path)

        import shutil
        shutil.rmtree(os.path.dirname(self.path))
        self.project_info.remove_test(self.text())
Esempio n. 3
0
    def delete_program(self, emit_event=True):
        from ATE.spyder.widgets.actions_on.utils.ItemTrace import ItemTrace

        targets = self.project_info.get_depandant_test_target_for_program(
            self.text())
        if not ItemTrace(
                targets,
                self.text(),
                self.project_info.parent,
                message="the above target(s) are going to be\ndeleted !"
        ).exec_():
            return

        self.project_info.delete_program(self.text(), self.owner, self.order,
                                         emit_event)
Esempio n. 4
0
 def trace_item(self):
     from ATE.spyder.widgets.actions_on.utils.ItemTrace import ItemTrace
     ItemTrace(self.dependency_list, self.text()).exec_()