Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
e761b97c
Commit
e761b97c
authored
Oct 24, 2014
by
Maxime Perrotin
Browse files
Report undeclared signals in the GUI
parent
dbc24a85
Changes
2
Hide whitespace changes
Inline
Side-by-side
ogParser.py
View file @
e761b97c
...
...
@@ -346,6 +346,7 @@ def get_interfaces(ast, process_name):
raise
TypeError
(
'Process '
+
process_name
+
' is defined but not declared in a system'
)
# Find in and out signals names using the signalroutes
undeclared_signals
=
[]
for
each
in
process_parent
.
signalroutes
:
for
route
in
each
[
'routes'
]:
if
route
[
'source'
]
==
process_name
:
...
...
@@ -362,7 +363,10 @@ def get_interfaces(ast, process_name):
found
[
'direction'
]
=
direction
async_signals
.
append
(
found
)
except
ValueError
:
LOG
.
error
(
'Signal {} is not declared'
.
format
(
sig_id
))
undeclared_signals
.
append
(
sig_id
)
if
undeclared_signals
:
raise
TypeError
(
'Missing declaration for signal(s) {}'
.
format
(
', '
.
join
(
undeclared_signals
)))
return
async_signals
,
system
.
procedures
...
...
opengeode.py
View file @
e761b97c
...
...
@@ -1312,8 +1312,8 @@ class SDL_View(QtGui.QGraphicsView, object):
else
:
# Otherwise, double-click edits the item text
item
.
edit_text
(
self
.
mapToScene
(
evt
.
pos
()))
except
AttributeError
:
LOG
.
debug
(
'Ignoring double click
'
)
except
AttributeError
as
err
:
LOG
.
debug
(
'Ignoring double click
:'
+
str
(
err
)
)
# pylint: disable=C0103
def
mouseMoveEvent
(
self
,
evt
):
...
...
@@ -1423,6 +1423,7 @@ class SDL_View(QtGui.QGraphicsView, object):
ast
,
warnings
,
errors
=
ogParser
.
parse_pr
(
files
=
files
)
except
IOError
:
LOG
.
error
(
'Aborting: could not open or parse input file'
)
sdlSymbols
.
CONTEXT
=
ogAST
.
Block
()
return
try
:
process
,
=
ast
.
processes
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment