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
75737f20
Commit
75737f20
authored
Mar 20, 2017
by
Maxime Perrotin
Browse files
Complete syntax and semantic checks of process types
parent
8778e665
Changes
3
Hide whitespace changes
Inline
Side-by-side
opengeode/Clipboard.py
View file @
75737f20
...
...
@@ -153,7 +153,7 @@ def paste_floating_objects(scene):
new_item
=
Renderer
.
render
(
each
,
scene
,
states
=
states
)
symbols
.
append
(
new_item
)
new_item
.
nested_scene
=
scene
.
create_subscene
(
type
(
new_item
).
__name__
.
lower
()
)
new_item
.
context_name
)
# Render recursively, creating any required scene
try
:
new_item
.
nested_scene
.
render_everything
(
each
.
content
)
...
...
opengeode/Pr.py
View file @
75737f20
...
...
@@ -95,6 +95,9 @@ def parse_scene(scene, full_model=False):
else
:
for
each
in
scene
.
processes
:
if
":"
in
unicode
(
each
):
# ignore instances of process type
continue
#pr_data.extend(generate(each))
# Only one process is supported - return now because
# the text areas must not be parsed - some may have been
...
...
opengeode/opengeode.py
View file @
75737f20
...
...
@@ -473,8 +473,9 @@ class SDL_Scene(QtGui.QGraphicsScene, object):
@
property
def
processes
(
self
):
''' Return visible processes components of the scene '''
return
(
it
for
it
in
self
.
visible_symb
if
isinstance
(
it
,
Process
)
and
not
isinstance
(
it
,
Procedure
))
return
(
it
for
it
in
self
.
visible_symb
if
(
isinstance
(
it
,
Process
)
and
not
isinstance
(
it
,
Procedure
))
or
isinstance
(
it
,
ProcessType
))
@
property
...
...
@@ -1962,7 +1963,10 @@ class SDL_View(QtGui.QGraphicsView, object):
process
.
processName
=
"Syntax_Error"
elif
len
(
ast
.
processes
)
==
1
:
process
,
=
ast
.
processes
self
.
filename
=
process
.
filename
if
not
process
.
instance_of_name
:
self
.
filename
=
process
.
filename
else
:
self
.
filename
=
process
.
instance_of_ref
.
filename
self
.
readonly_pr
=
ast
.
pr_files
-
{
self
.
filename
}
else
:
# More than one process
...
...
@@ -2054,6 +2058,7 @@ class SDL_View(QtGui.QGraphicsView, object):
if
not
scene
.
global_syntax_check
():
self
.
messages_window
.
addItem
(
"Aborted. Fix syntax errors first"
)
return
self
.
messages_window
.
addItem
(
"No syntax errors"
)
self
.
messages_window
.
addItem
(
"Checking semantics"
)
if
scene
.
context
not
in
(
'process'
,
'state'
,
'procedure'
,
'block'
):
...
...
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