configureLabel=nls.localize('configureAssociationsExt',"Configure File Association for '{0}'...",ext);
}
}
configureModeAssociations={
label:nls.localize('configureAssociationsExt',"Configure File Association for '{0}'...",paths.extname(resource.fsPath)||paths.basename(resource.fsPath))
};
constconfigureModeAssociations:IPickOpenEntry={
label:configureLabel
};
picks.unshift(configureModeAssociations);
picks.unshift(configureModeAssociations);
}
// Offer to "Auto Detect"
constautoDetectMode:IPickOpenEntry={
...
...
@@ -699,7 +697,7 @@ export class ChangeModeAction extends Action {
picks.unshift(autoDetectMode);
}
returnthis.quickOpenService.pick(picks,{placeHolder:nls.localize('pickLanguage',"Select Language Mode")}).then((language)=>{
returnthis.quickOpenService.pick(picks,{placeHolder:nls.localize('pickLanguage',"Select Language Mode")}).then(language=>{
this.messageService.show(Severity.Info,nls.localize('persistFileAssociations',"You can configure filename to language associations in the **files.associations** section. The changes may need a restart to take effect on already opened files."));
TPromise.timeout(50/* quick open is sensitive to being opened so soon after another */).done(()=>{
constextension=paths.extname(resource.fsPath);
constbasename=paths.basename(resource.fsPath);
this.quickOpenService.pick(picks,{placeHolder:nls.localize('pickLanguageToConfigure',"Select Language Mode to Associate with '{0}'",extension||basename)}).done(language=>{
returnthis.quickOpenService.pick(EOLOptions,{placeHolder:nls.localize('pickEndOfLine',"Select End of Line Sequence"),autoFocus:{autoFocusIndex:selectedIndex}}).then((eol)=>{
returnthis.quickOpenService.pick(EOLOptions,{placeHolder:nls.localize('pickEndOfLine',"Select End of Line Sequence"),autoFocus:{autoFocusIndex:selectedIndex}}).then(eol=>{
@@ -927,7 +955,7 @@ export class ChangeEncodingAction extends Action {
returnthis.quickOpenService.pick(picks,{
placeHolder:isReopenWithEncoding?nls.localize('pickEncodingForReopen',"Select File Encoding to Reopen File"):nls.localize('pickEncodingForSave',"Select File Encoding to Save with"),