ProjectController.py
changeset 1775 b45f2768fab1
parent 1768 691083b5682a
child 1776 81aa8aaccdd4
equal deleted inserted replaced
1774:ac0fe8aabb5e 1775:b45f2768fab1
  1259 
  1259 
  1260             return self._ProjectFilesView
  1260             return self._ProjectFilesView
  1261 
  1261 
  1262         elif name is not None and name.find("::") != -1:
  1262         elif name is not None and name.find("::") != -1:
  1263             filepath, editor_name = name.split("::")
  1263             filepath, editor_name = name.split("::")
  1264             if not filepath in self._FileEditors:
  1264             if filepath not in self._FileEditors:
  1265                 if os.path.isfile(filepath):
  1265                 if os.path.isfile(filepath):
  1266                     file_extension = os.path.splitext(filepath)[1]
  1266                     file_extension = os.path.splitext(filepath)[1]
  1267 
  1267 
  1268                     editors = dict([(edit_name, edit_class)
  1268                     editors = dict([(edit_name, edit_class)
  1269                                     for extension, edit_name, edit_class in features.file_editors
  1269                                     for extension, edit_name, edit_class in features.file_editors
  1473         """
  1473         """
  1474         Dispatching use a dictionnary linking IEC variable paths
  1474         Dispatching use a dictionnary linking IEC variable paths
  1475         to a WeakKeyDictionary linking
  1475         to a WeakKeyDictionary linking
  1476         weakly referenced callables
  1476         weakly referenced callables
  1477         """
  1477         """
  1478         if IECPath != "__tick__" and not IECPath in self._IECPathToIdx:
  1478         if IECPath != "__tick__" and IECPath not in self._IECPathToIdx:
  1479             return None
  1479             return None
  1480 
  1480 
  1481         self.IECdebug_lock.acquire()
  1481         self.IECdebug_lock.acquire()
  1482         # If no entry exist, create a new one with a fresh WeakKeyDictionary
  1482         # If no entry exist, create a new one with a fresh WeakKeyDictionary
  1483         IECdebug_data = self.IECdebug_datas.get(IECPath, None)
  1483         IECdebug_data = self.IECdebug_datas.get(IECPath, None)
  1522         self.IECdebug_lock.release()
  1522         self.IECdebug_lock.release()
  1523 
  1523 
  1524         self.ReArmDebugRegisterTimer()
  1524         self.ReArmDebugRegisterTimer()
  1525 
  1525 
  1526     def ForceDebugIECVariable(self, IECPath, fvalue):
  1526     def ForceDebugIECVariable(self, IECPath, fvalue):
  1527         if not IECPath in self.IECdebug_datas:
  1527         if IECPath not in self.IECdebug_datas:
  1528             return
  1528             return
  1529 
  1529 
  1530         self.IECdebug_lock.acquire()
  1530         self.IECdebug_lock.acquire()
  1531 
  1531 
  1532         # If no entry exist, create a new one with a fresh WeakKeyDictionary
  1532         # If no entry exist, create a new one with a fresh WeakKeyDictionary
  1537         self.IECdebug_lock.release()
  1537         self.IECdebug_lock.release()
  1538 
  1538 
  1539         self.ReArmDebugRegisterTimer()
  1539         self.ReArmDebugRegisterTimer()
  1540 
  1540 
  1541     def ReleaseDebugIECVariable(self, IECPath):
  1541     def ReleaseDebugIECVariable(self, IECPath):
  1542         if not IECPath in self.IECdebug_datas:
  1542         if IECPath not in self.IECdebug_datas:
  1543             return
  1543             return
  1544 
  1544 
  1545         self.IECdebug_lock.acquire()
  1545         self.IECdebug_lock.acquire()
  1546 
  1546 
  1547         # If no entry exist, create a new one with a fresh WeakKeyDictionary
  1547         # If no entry exist, create a new one with a fresh WeakKeyDictionary