@@ -97,11 +97,13 @@ export class JavaFormatterSettingsEditorProvider implements vscode.CustomTextEdi
9797 }
9898 break ;
9999 case "onWillChangeExampleKind" :
100+ sendInfo ( "" , { formatterExample : e . exampleKind } ) ;
100101 this . exampleKind = e . exampleKind ;
101102 this . format ( ) ;
102103 break ;
103104 case "onWillChangeSetting" :
104105 const settingValue : string | undefined = FormatterConverter . webView2ProfileConvert ( e . id , e . value . toString ( ) ) ;
106+ sendInfo ( "" , { formatterSetting : e . id } ) ;
105107 // "" represents an empty inputbox, we regard it as a valid value.
106108 if ( settingValue === undefined ) {
107109 return ;
@@ -225,15 +227,15 @@ export class JavaFormatterSettingsEditorProvider implements vscode.CustomTextEdi
225227 for ( const setting of supportedVSCodeSettings . values ( ) ) {
226228 switch ( setting . id ) {
227229 case SupportedSettings . TABULATION_CHAR :
228- setting . value = ( await getVSCodeSetting ( VSCodeSettings . INSERT_SPACES , true ) === false ) ? "tab" : "space" ;
230+ setting . value = ( getVSCodeSetting ( VSCodeSettings . INSERT_SPACES , true ) === false ) ? "tab" : "space" ;
229231 this . profileSettings . set ( setting . id , setting . value ) ;
230232 break ;
231233 case SupportedSettings . TABULATION_SIZE :
232- setting . value = String ( await getVSCodeSetting ( VSCodeSettings . TAB_SIZE , 4 ) ) ;
234+ setting . value = String ( getVSCodeSetting ( VSCodeSettings . TAB_SIZE , 4 ) ) ;
233235 this . profileSettings . set ( setting . id , setting . value ) ;
234236 break ;
235237 case VSCodeSettings . DETECT_INDENTATION :
236- setting . value = String ( await getVSCodeSetting ( VSCodeSettings . DETECT_INDENTATION , true ) ) ;
238+ setting . value = String ( getVSCodeSetting ( VSCodeSettings . DETECT_INDENTATION , true ) ) ;
237239 break ;
238240 default :
239241 return ;
@@ -292,21 +294,21 @@ export class JavaFormatterSettingsEditorProvider implements vscode.CustomTextEdi
292294 return true ;
293295 }
294296
295- private checkProfileSettings = instrumentOperation ( "formatter.checkProfileSetting" , async ( operationId : string ) => {
297+ private checkProfileSettings = instrumentOperation ( "java. formatter.checkProfileSetting" , async ( operationId : string ) => {
296298 if ( this . checkedProfileSettings ) {
297299 return true ;
298300 }
299301 this . readOnly = false ;
300302 if ( ! this . settingsUrl ) {
301- sendInfo ( operationId , { formatterProfile : "undefined" } ) ;
303+ sendInfo ( operationId , { formatterProfileKind : "undefined" } ) ;
302304 await vscode . window . showInformationMessage ( "No active Formatter Profile found, do you want to create a default one?" ,
303305 "Yes" , "No" ) . then ( ( result ) => {
304306 if ( result === "Yes" ) {
305307 addDefaultProfile ( this . context ) ;
306308 }
307309 } ) ;
308310 } else if ( isRemote ( this . settingsUrl ) ) {
309- sendInfo ( operationId , { formatterProfile : "remote" } ) ;
311+ sendInfo ( operationId , { formatterProfileKind : "remote" } ) ;
310312 this . checkedProfileSettings = await vscode . window . showInformationMessage ( "The active formatter profile is remote, do you want to open it in read-only mode or download and use it locally?" ,
311313 "Open in read-only mode" , "Download and use it locally" ) . then ( async ( result ) => {
312314 if ( result === "Open in read-only mode" ) {
@@ -329,7 +331,7 @@ export class JavaFormatterSettingsEditorProvider implements vscode.CustomTextEdi
329331 this . profilePath = await getProfilePath ( this . settingsUrl ) ;
330332 }
331333 if ( ! ( await fse . pathExists ( this . profilePath ) ) ) {
332- sendInfo ( operationId , { formatterProfile : "notExist" } ) ;
334+ sendInfo ( operationId , { formatterProfileKind : "notExist" } ) ;
333335 await vscode . window . showInformationMessage ( "The active formatter profile does not exist, please check it in the Settings and try again." ,
334336 "Open Settings" , "Generate a default profile" ) . then ( ( result ) => {
335337 if ( result === "Open Settings" ) {
@@ -340,7 +342,7 @@ export class JavaFormatterSettingsEditorProvider implements vscode.CustomTextEdi
340342 } ) ;
341343 return false ;
342344 }
343- sendInfo ( operationId , { formatterProfile : "valid" } ) ;
345+ sendInfo ( operationId , { formatterProfileKind : "valid" } ) ;
344346 this . checkedProfileSettings = true ;
345347 }
346348 return this . checkedProfileSettings ;
0 commit comments