From ff09e799ca70914f8f8f763a15759766c29bb580 Mon Sep 17 00:00:00 2001 From: Shi Chen Date: Tue, 14 Jun 2022 13:05:38 +0800 Subject: [PATCH] auto select field when generating constructors Signed-off-by: Shi Chen --- src/protocol.ts | 1 + src/sourceAction.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/protocol.ts b/src/protocol.ts index ed7fc092c..66b3890a5 100644 --- a/src/protocol.ts +++ b/src/protocol.ts @@ -187,6 +187,7 @@ export interface VariableBinding { name: string; type: string; isField: boolean; + isSelected?: boolean; } export interface CheckHashCodeEqualsResponse { diff --git a/src/sourceAction.ts b/src/sourceAction.ts index 2d6558b1b..054315f9e 100644 --- a/src/sourceAction.ts +++ b/src/sourceAction.ts @@ -298,6 +298,7 @@ function registerGenerateConstructorsCommand(languageClient: LanguageClient, con return { label: `${field.name}: ${field.type}`, originalField: field, + picked: field.isSelected }; }); const selectedFieldItems = await window.showQuickPick(fieldItems, {