Commit 4c2051fc authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Autocompletion of OUTPUT calls

parent 366cec81
......@@ -252,8 +252,15 @@ class Output(VerticalSymbol):
def completion_list(self):
''' Set auto-completion list '''
return chain(variables_autocompletion(self),
(sig['name'] for sig in CONTEXT.output_signals))
if '(' in unicode(self):
# Output parameter: return the list of variables of this type
output_name = unicode(self).split('(')[0].strip().lower()
asn1_filter = [sig['type'] for sig in CONTEXT.output_signals if
sig['name'] == output_name]
return variables_autocompletion(self, asn1_filter)
# Return the list of output signals
return (set(sig['name'] for sig in CONTEXT.output_signals))
# pylint: disable=R0904
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment