mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
change how we detect if a untitled query is valid (#6776)
This commit is contained in:
@@ -52,7 +52,7 @@ import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { IStatusbarEntryAccessor, IStatusbarService, StatusbarAlignment, IStatusbarEntry } from 'vs/platform/statusbar/common/statusbar';
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
import { QueryEditorService } from 'sql/workbench/services/queryEditor/browser/queryEditorService';
|
||||
import { IQueryEditorService } from 'sql/workbench/services/queryEditor/common/queryEditorService';
|
||||
|
||||
class SideBySideEditorEncodingSupport implements IEncodingSupport {
|
||||
constructor(private master: IEncodingSupport, private details: IEncodingSupport) { }
|
||||
@@ -864,7 +864,8 @@ export class ChangeModeAction extends Action {
|
||||
@IQuickInputService private readonly quickInputService: IQuickInputService,
|
||||
@IPreferencesService private readonly preferencesService: IPreferencesService,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService
|
||||
@IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService,
|
||||
@IQueryEditorService private readonly queryEditorService: IQueryEditorService // {{ SQL CARBON EDIT }}
|
||||
) {
|
||||
super(actionId, actionLabel);
|
||||
}
|
||||
@@ -985,7 +986,7 @@ export class ChangeModeAction extends Action {
|
||||
// {{SQL CARBON EDIT}} @anthonydresser preform a check before we actuall set the mode
|
||||
// Change mode
|
||||
if (typeof languageSelection !== 'undefined') {
|
||||
QueryEditorService.sqlLanguageModeCheck(textModel, languageSelection, activeEditor).then(newTextModel => {
|
||||
this.queryEditorService.sqlLanguageModeCheck(textModel, languageSelection, activeEditor).then(newTextModel => {
|
||||
if (newTextModel) {
|
||||
modeSupport.setMode(languageSelection.languageIdentifier.language);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user