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 |
26 from types import StringType, UnicodeType, TupleType |
27 from types import StringType, UnicodeType, TupleType |
27 from lxml import etree |
28 from lxml import etree |
28 from copy import deepcopy |
29 from copy import deepcopy |
29 import os,sys,re |
30 import os,sys,re |
30 import datetime |
31 import datetime |
|
32 import util.paths as paths |
31 from time import localtime |
33 from time import localtime |
32 from collections import OrderedDict, namedtuple |
34 from collections import OrderedDict, namedtuple |
33 |
35 |
34 from plcopen import * |
36 from plcopen import * |
35 from graphics.GraphicCommons import * |
37 from graphics.GraphicCommons import * |
86 LOCATION_GROUP, |
88 LOCATION_GROUP, |
87 LOCATION_VAR_INPUT, |
89 LOCATION_VAR_INPUT, |
88 LOCATION_VAR_OUTPUT, |
90 LOCATION_VAR_OUTPUT, |
89 LOCATION_VAR_MEMORY] = range(6) |
91 LOCATION_VAR_MEMORY] = range(6) |
90 |
92 |
91 ScriptDirectory = os.path.split(os.path.realpath(__file__))[0] |
93 ScriptDirectory = paths.AbsDir(__file__) |
92 |
94 |
93 def GetUneditableNames(): |
95 def GetUneditableNames(): |
94 _ = lambda x:x |
96 _ = lambda x:x |
95 return [_("User-defined POUs"), _("Functions"), _("Function Blocks"), |
97 return [_("User-defined POUs"), _("Functions"), _("Function Blocks"), |
96 _("Programs"), _("Data Types"), _("Transitions"), _("Actions"), |
98 _("Programs"), _("Data Types"), _("Transitions"), _("Actions"), |