mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
completions: Add completions for response IDs
This commit is contained in:
parent
866092ccf7
commit
b26433d865
16 changed files with 123 additions and 42 deletions
|
@ -140,7 +140,7 @@ class ExtAdwResponseDialog(AstNode):
|
|||
|
||||
@completer(
|
||||
applies_in=[ObjectContent],
|
||||
applies_in_subclass=("Adw", "MessageDialog"),
|
||||
applies_in_subclass=[("Adw", "AlertDialog"), ("Adw", "MessageDialog")],
|
||||
matches=new_statement_patterns,
|
||||
)
|
||||
def complete_adw_message_dialog(_ctx: CompletionContext):
|
||||
|
@ -149,20 +149,6 @@ def complete_adw_message_dialog(_ctx: CompletionContext):
|
|||
)
|
||||
|
||||
|
||||
@completer(
|
||||
applies_in=[ObjectContent],
|
||||
applies_in_subclass=("Adw", "AlertDialog"),
|
||||
matches=new_statement_patterns,
|
||||
)
|
||||
def complete_adw_alert_dialog(_ctx: CompletionContext):
|
||||
yield Completion(
|
||||
"responses",
|
||||
CompletionItemKind.Keyword,
|
||||
snippet="responses [\n\t$0\n]",
|
||||
sort_text=get_sort_key(CompletionPriority.OBJECT_MEMBER, "responses"),
|
||||
)
|
||||
|
||||
|
||||
@decompiler("responses")
|
||||
def decompile_responses(ctx, gir):
|
||||
ctx.print(f"responses [")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue