equal
deleted
inserted
replaced
3 |
3 |
4 # This file is part of Beremiz, a Integrated Development Environment for |
4 # This file is part of Beremiz, a Integrated Development Environment for |
5 # programming IEC 61131-3 automates supporting plcopen standard and CanFestival. |
5 # programming IEC 61131-3 automates supporting plcopen standard and CanFestival. |
6 # |
6 # |
7 # Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD |
7 # Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD |
|
8 # Copyright (C) 2017: Andrey Skvortsov |
8 # |
9 # |
9 # See COPYING file for copyrights details. |
10 # See COPYING file for copyrights details. |
10 # |
11 # |
11 # This program is free software; you can redistribute it and/or |
12 # This program is free software; you can redistribute it and/or |
12 # modify it under the terms of the GNU General Public License |
13 # modify it under the terms of the GNU General Public License |
39 from weakref import WeakKeyDictionary |
40 from weakref import WeakKeyDictionary |
40 from itertools import izip |
41 from itertools import izip |
41 |
42 |
42 import targets |
43 import targets |
43 import connectors |
44 import connectors |
|
45 import util.paths as paths |
44 from util.misc import CheckPathPerm, GetClassImporter |
46 from util.misc import CheckPathPerm, GetClassImporter |
45 from util.MiniTextControler import MiniTextControler |
47 from util.MiniTextControler import MiniTextControler |
46 from util.ProcessLogger import ProcessLogger |
48 from util.ProcessLogger import ProcessLogger |
47 from util.BitmapLibrary import GetBitmap |
49 from util.BitmapLibrary import GetBitmap |
48 from editors.FileManagementPanel import FileManagementPanel |
50 from editors.FileManagementPanel import FileManagementPanel |
54 from plcopen.structures import IEC_KEYWORDS |
56 from plcopen.structures import IEC_KEYWORDS |
55 from targets.typemapping import DebugTypesSize, LogLevelsCount, LogLevels |
57 from targets.typemapping import DebugTypesSize, LogLevelsCount, LogLevels |
56 from targets.typemapping import UnpackDebugBuffer |
58 from targets.typemapping import UnpackDebugBuffer |
57 from ConfigTreeNode import ConfigTreeNode, XSDSchemaErrorMessage |
59 from ConfigTreeNode import ConfigTreeNode, XSDSchemaErrorMessage |
58 |
60 |
59 base_folder = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0] |
61 base_folder = paths.AbsParentDir(__file__) |
60 |
62 |
61 MATIEC_ERROR_MODEL = re.compile(".*\.st:(\d+)-(\d+)\.\.(\d+)-(\d+): (?:error)|(?:warning) : (.*)$") |
63 MATIEC_ERROR_MODEL = re.compile(".*\.st:(\d+)-(\d+)\.\.(\d+)-(\d+): (?:error)|(?:warning) : (.*)$") |
62 |
64 |
63 ITEM_CONFNODE = 25 |
65 ITEM_CONFNODE = 25 |
64 |
66 |
565 for child in self.IECSortedChildren(): |
567 for child in self.IECSortedChildren(): |
566 children.append(child.GetVariableLocationTree()) |
568 children.append(child.GetVariableLocationTree()) |
567 return children |
569 return children |
568 |
570 |
569 def ConfNodePath(self): |
571 def ConfNodePath(self): |
570 return os.path.split(__file__)[0] |
572 return paths.AbsDir(__file__) |
571 |
573 |
572 def CTNPath(self, CTNName=None): |
574 def CTNPath(self, CTNName=None): |
573 return self.ProjectPath |
575 return self.ProjectPath |
574 |
576 |
575 def ConfNodeXmlFilePath(self, CTNName=None): |
577 def ConfNodeXmlFilePath(self, CTNName=None): |