@@ -244,22 +244,25 @@ export class UserDataProfileImportExportService extends Disposable implements IU
244
244
const userDataProfileImportState = disposables . add ( this . instantiationService . createInstance ( UserDataProfileImportState , profileTemplate ) ) ;
245
245
246
246
const title = localize ( 'import profile preview' , "Import" ) ;
247
- let importProfile = await this . selectProfileResources (
248
- userDataProfileImportState ,
249
- localize ( 'import title' , "{0}: {1} ({2})" , PROFILES_CATEGORY . value , title , profileTemplate . name ) ,
250
- localize ( 'import description' , "Chose what to import" )
251
- ) ;
252
247
253
- if ( importProfile === undefined ) {
254
- return ;
255
- }
248
+ if ( ! userDataProfileImportState . isEmpty ( ) ) {
249
+ let importProfile = await this . selectProfileResources (
250
+ userDataProfileImportState ,
251
+ localize ( 'import title' , "{0}: {1} ({2})" , PROFILES_CATEGORY . value , title , profileTemplate . name ) ,
252
+ localize ( 'import description' , "Chose what to import" )
253
+ ) ;
256
254
257
- if ( ! importProfile ) {
258
- importProfile = await this . showProfilePreviewView ( `workbench.views.profiles.import.preview` , title , userDataProfileImportState ) ;
259
- }
255
+ if ( importProfile === undefined ) {
256
+ return ;
257
+ }
260
258
261
- if ( ! importProfile ) {
262
- return ;
259
+ if ( ! importProfile ) {
260
+ importProfile = await this . showProfilePreviewView ( `workbench.views.profiles.import.preview` , title , userDataProfileImportState ) ;
261
+ }
262
+
263
+ if ( ! importProfile ) {
264
+ return ;
265
+ }
263
266
}
264
267
265
268
profileTemplate = await userDataProfileImportState . getProfileTemplateToImport ( ) ;
@@ -942,6 +945,10 @@ class UserDataProfileImportState extends UserDataProfileImportExportState {
942
945
return roots ;
943
946
}
944
947
948
+ isEmpty ( ) : boolean {
949
+ return ! ( this . profile . settings || this . profile . keybindings || this . profile . tasks || this . profile . snippets || this . profile . globalState || this . profile . extensions ) ;
950
+ }
951
+
945
952
async getProfileTemplateToImport ( ) : Promise < IUserDataProfileTemplate > {
946
953
return this . getProfileTemplate ( this . profile . name , this . profile . shortName ) ;
947
954
}
0 commit comments