@@ -120,7 +120,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
120
120
return true ;
121
121
} ;
122
122
123
- private listProjects = instrumentOperation ( "classpath.listProjects" , async ( operationId : string ) => {
123
+ private listProjects = instrumentOperation ( "projectSettings. classpath.listProjects" , async ( operationId : string ) => {
124
124
// listProjects() will be called when the component is mounted,
125
125
// we first check the requirement here in case user triggers 'reload webview'
126
126
if ( ! ( await this . checkRequirement ( ) ) ) {
@@ -149,7 +149,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
149
149
} ) ;
150
150
} ) ;
151
151
152
- private listVmInstalls = instrumentOperation ( "classpath.listVmInstalls" , async ( operationId : string ) => {
152
+ private listVmInstalls = instrumentOperation ( "projectSettings. classpath.listVmInstalls" , async ( operationId : string ) => {
153
153
let vmInstalls : VmInstall [ ] = await this . getVmInstallsFromLS ( ) ;
154
154
vmInstalls = vmInstalls . sort ( ( vmA : VmInstall , vmB : VmInstall ) => {
155
155
return vmA . name . localeCompare ( vmB . name ) ;
@@ -169,7 +169,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
169
169
170
170
private debounceListVmInstalls = _ . debounce ( this . listVmInstalls , 3000 /*ms*/ ) ;
171
171
172
- private loadProjectClasspath = instrumentOperation ( "classpath.loadClasspath" , async ( operationId : string , currentProjectRoot : vscode . Uri ) => {
172
+ private loadProjectClasspath = instrumentOperation ( "projectSettings. classpath.loadClasspath" , async ( operationId : string , currentProjectRoot : vscode . Uri ) => {
173
173
const classpath = await this . getProjectClasspathFromLS ( currentProjectRoot ) ;
174
174
if ( classpath ) {
175
175
this . webview . postMessage ( {
@@ -215,7 +215,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
215
215
return undefined ;
216
216
}
217
217
218
- private addSourcePathForUnmanagedFolder = instrumentOperation ( "classpath.addSourcePathForUnmanagedFolder" , async ( _operationId : string , currentProjectRoot : vscode . Uri ) => {
218
+ private addSourcePathForUnmanagedFolder = instrumentOperation ( "projectSettings. classpath.addSourcePathForUnmanagedFolder" , async ( _operationId : string , currentProjectRoot : vscode . Uri ) => {
219
219
const relativePath : string | undefined = await this . selectSourceFolderPath ( currentProjectRoot ) ;
220
220
if ( ! relativePath ) {
221
221
return ;
@@ -232,15 +232,15 @@ export class ClasspathRequestHandler implements vscode.Disposable {
232
232
} ) ;
233
233
} ) ;
234
234
235
- private updateSourcePathsForUnmanagedFolder = instrumentOperation ( "classpath.updateSourcePathsForUnmanagedFolder" , async ( _operationId : string , currentProjectRoot : vscode . Uri , sourcePaths : string [ ] ) => {
235
+ private updateSourcePathsForUnmanagedFolder = instrumentOperation ( "projectSettings. classpath.updateSourcePathsForUnmanagedFolder" , async ( _operationId : string , currentProjectRoot : vscode . Uri , sourcePaths : string [ ] ) => {
236
236
vscode . workspace . getConfiguration ( "java" , currentProjectRoot ) . update (
237
237
"project.sourcePaths" ,
238
238
sourcePaths ,
239
239
vscode . ConfigurationTarget . Workspace ,
240
240
) ;
241
241
} ) ;
242
242
243
- private selectFolder = instrumentOperation ( "classpath.selectFolder" , async ( _operationId : string , currentProjectRoot : vscode . Uri , type : string ) => {
243
+ private selectFolder = instrumentOperation ( "projectSettings. classpath.selectFolder" , async ( _operationId : string , currentProjectRoot : vscode . Uri , type : string ) => {
244
244
const relativePath : string | undefined = await this . selectSourceFolderPath ( currentProjectRoot ) ;
245
245
if ( ! relativePath ) {
246
246
return ;
@@ -252,7 +252,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
252
252
} ) ;
253
253
} ) ;
254
254
255
- private updateClassPaths = instrumentOperation ( "classpath.updateClassPaths" , async ( _operationId : string , rootPath : string , projectType : ProjectType , sourcePaths : ClasspathEntry [ ] , defaultOutputPath : string , vmInstallPath : string , libraries : ClasspathEntry [ ] ) => {
255
+ private updateClassPaths = instrumentOperation ( "projectSettings. classpath.updateClassPaths" , async ( _operationId : string , rootPath : string , projectType : ProjectType , sourcePaths : ClasspathEntry [ ] , defaultOutputPath : string , vmInstallPath : string , libraries : ClasspathEntry [ ] ) => {
256
256
this . webview . postMessage ( {
257
257
command : "classpath.onDidChangeLoadingState" ,
258
258
loading : true ,
@@ -301,7 +301,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
301
301
} ) ;
302
302
} ) ;
303
303
304
- private selectOutputPath = instrumentOperation ( "classpath.selectOutputPath" , async ( _operationId : string , currentProjectRoot : vscode . Uri ) => {
304
+ private selectOutputPath = instrumentOperation ( "projectSettings. classpath.selectOutputPath" , async ( _operationId : string , currentProjectRoot : vscode . Uri ) => {
305
305
const outputFolder : vscode . Uri [ ] | undefined = await vscode . window . showOpenDialog ( {
306
306
defaultUri : vscode . workspace . workspaceFolders ?. [ 0 ] . uri ,
307
307
openLabel : "Select Output Folder" ,
@@ -332,7 +332,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
332
332
}
333
333
} ) ;
334
334
335
- private setOutputPath = instrumentOperation ( "classpath.setOutputPath" , async ( operationId : string , currentProjectRoot : vscode . Uri , outputRelativePath : string ) => {
335
+ private setOutputPath = instrumentOperation ( "projectSettings. classpath.setOutputPath" , async ( operationId : string , currentProjectRoot : vscode . Uri , outputRelativePath : string ) => {
336
336
if ( vscode . workspace . getConfiguration ( "java" , currentProjectRoot ) . get < string > ( "project.outputPath" ) === outputRelativePath ) {
337
337
return ;
338
338
}
@@ -357,7 +357,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
357
357
) ;
358
358
} ) ;
359
359
360
- private addNewJdk = instrumentOperation ( "classpath.addNewJdk" , async ( operationId : string , currentProjectRoot : vscode . Uri ) => {
360
+ private addNewJdk = instrumentOperation ( "projectSettings. classpath.addNewJdk" , async ( operationId : string , currentProjectRoot : vscode . Uri ) => {
361
361
const actionResult : Record < string , string > = {
362
362
name : "classpath.configuration" ,
363
363
kind : "add-new-jdk"
@@ -404,7 +404,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
404
404
}
405
405
} ) ;
406
406
407
- private changeJdk = instrumentOperation ( "classpath.changeJdk" , async ( operationId : string , currentProjectRoot : vscode . Uri , jdkPath : string ) => {
407
+ private changeJdk = instrumentOperation ( "projectSettings. classpath.changeJdk" , async ( operationId : string , currentProjectRoot : vscode . Uri , jdkPath : string ) => {
408
408
const actionResult : Record < string , string > = {
409
409
name : "classpath.configuration" ,
410
410
kind : "use-existing-jdk"
@@ -439,7 +439,7 @@ export class ClasspathRequestHandler implements vscode.Disposable {
439
439
}
440
440
} ) ;
441
441
442
- private selectLibraries = instrumentOperation ( "classpath.selectLibraries" , async ( _operationId : string , currentProjectRoot : vscode . Uri ) => {
442
+ private selectLibraries = instrumentOperation ( "projectSettings. classpath.selectLibraries" , async ( _operationId : string , currentProjectRoot : vscode . Uri ) => {
443
443
const jarFiles : vscode . Uri [ ] | undefined = await vscode . window . showOpenDialog ( {
444
444
defaultUri : vscode . workspace . workspaceFolders ?. [ 0 ] . uri ,
445
445
openLabel : "Select Jar File" ,
@@ -469,13 +469,13 @@ export class ClasspathRequestHandler implements vscode.Disposable {
469
469
}
470
470
} ) ;
471
471
472
- private updateUnmanagedFolderLibraries = instrumentOperation ( "classpath.updateUnmanagedFolderLibraries" , async ( _operationId : string , jarFilePaths : string [ ] ) => {
472
+ private updateUnmanagedFolderLibraries = instrumentOperation ( "projectSettings. classpath.updateUnmanagedFolderLibraries" , async ( _operationId : string , jarFilePaths : string [ ] ) => {
473
473
const setting = this . getReferencedLibrariesSetting ( ) ;
474
474
setting . include = jarFilePaths ;
475
475
this . updateReferencedLibraries ( setting ) ;
476
476
} ) ;
477
477
478
- private gotoProjectConfigurationFile = instrumentOperation ( "classpath.gotoProjectConfigurationFile" , ( operationId : string , rootUri : string , projectType : ProjectType ) => {
478
+ private gotoProjectConfigurationFile = instrumentOperation ( "projectSettings. classpath.gotoProjectConfigurationFile" , ( operationId : string , rootUri : string , projectType : ProjectType ) => {
479
479
const rootPath : string = vscode . Uri . parse ( rootUri ) . fsPath ;
480
480
let configurationPath : string = "" ;
481
481
if ( projectType === ProjectType . Gradle ) {
0 commit comments