Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
55b8b5dd
Commit
55b8b5dd
authored
Oct 15, 2014
by
Maxime Perrotin
Browse files
Autocompletion state entrypoint / via clause
parent
e6c965b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
sdlSymbols.py
View file @
55b8b5dd
...
...
@@ -892,7 +892,15 @@ class State(VerticalSymbol):
@
property
def
completion_list
(
self
):
''' Set auto-completion list '''
return
set
(
state
for
state
in
CONTEXT
.
mapping
if
state
!=
'START'
)
elems
=
unicode
(
self
).
lower
().
strip
().
split
()
if
len
(
elems
)
==
2
and
elems
[
1
]
==
'via'
:
# Get list of entry point of the nested state
statename
=
elems
[
0
]
for
each
in
CONTEXT
.
composite_states
:
if
each
.
statename
==
statename
:
return
each
.
state_entrypoints
else
:
return
set
(
state
for
state
in
CONTEXT
.
mapping
if
state
!=
'START'
)
def
set_shape
(
self
,
width
,
height
):
''' Compute the polygon to fit in width, height '''
...
...
@@ -1106,3 +1114,8 @@ class StateStart(Start):
def
__unicode__
(
self
):
''' Return the state entry point '''
return
unicode
(
self
.
text
)
def
update_completion_list
(
self
,
pr_text
):
''' Update nested state entry points '''
CONTEXT
.
state_entrypoints
=
set
(
CONTEXT
.
state_entrypoints
+
[
unicode
(
self
)])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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