mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
remove some vscode differences (#12146)
This commit is contained in:
@@ -704,8 +704,8 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
let elementWidth = 0;
|
||||
|
||||
if (container) {
|
||||
let longest = -1;
|
||||
let longestLength = -1;
|
||||
let longest = 0;
|
||||
let longestLength = 0;
|
||||
|
||||
this.options.forEach((option, index) => {
|
||||
const len = option.text.length + (!!option.decoratorRight ? option.decoratorRight.length : 0);
|
||||
@@ -715,9 +715,8 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
}
|
||||
});
|
||||
|
||||
if (longest >= 0) {
|
||||
container.innerHTML = this.options[longest].text + (!!this.options[longest].decoratorRight ? (this.options[longest].decoratorRight + ' ') : '');
|
||||
}
|
||||
|
||||
container.innerHTML = this.options[longest].text + (!!this.options[longest].decoratorRight ? (this.options[longest].decoratorRight + ' ') : '');
|
||||
|
||||
elementWidth = dom.getTotalWidth(container);
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ export class ObjectTreeModel<T extends NonNullable<any>, TFilterData extends Non
|
||||
let childrenNodes = [...node.children] as ITreeNode<T, TFilterData>[];
|
||||
|
||||
if (recursive || first) {
|
||||
childrenNodes = mergeSort(childrenNodes, this.sorter!.compare.bind(this.sorter)) as ITreeNode<T, TFilterData>[];
|
||||
childrenNodes = mergeSort(childrenNodes, this.sorter!.compare.bind(this.sorter)) as ITreeNode<T, TFilterData>[]; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
}
|
||||
|
||||
return Iterable.map<ITreeNode<T | null, TFilterData>, ITreeElement<T>>(childrenNodes, node => ({
|
||||
|
||||
@@ -383,7 +383,7 @@ export class URI implements UriComponents {
|
||||
static revive(data: UriComponents | URI | undefined | null): URI | undefined | null;
|
||||
static revive(data: UriComponents | URI | undefined | null): URI | undefined | null {
|
||||
if (!data) {
|
||||
// {{SQL CARBON EDIT}} @todo chlafren change back to data when we enable strict null checks
|
||||
// {{SQL CARBON EDIT}} strict-null-check
|
||||
return undefined;
|
||||
} else if (data instanceof URI) {
|
||||
return data;
|
||||
|
||||
@@ -18,7 +18,7 @@ interface IIPCEvent {
|
||||
function createScopedOnMessageEvent(senderId: number, eventName: string): Event<VSBuffer | null> {
|
||||
const onMessage = Event.fromNodeEventEmitter<IIPCEvent>(ipcMain, eventName, (event, message) => ({ event, message }));
|
||||
const onMessageFromSender = Event.filter(onMessage, ({ event }) => event.sender.id === senderId);
|
||||
// {{SQL CARBON EDIT}} cast message as null since typescript isn't saying its always null
|
||||
// {{SQL CARBON EDIT}} strict-null-checks
|
||||
return Event.map(onMessageFromSender, ({ message }) => message ? VSBuffer.wrap(message) : message as null);
|
||||
}
|
||||
|
||||
|
||||
1080
src/vs/base/test/browser/ui/grid/grid.test.ts
Normal file
1080
src/vs/base/test/browser/ui/grid/grid.test.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -57,7 +57,7 @@ export class UserDataAutoSyncEnablementService extends Disposable {
|
||||
return true;
|
||||
case 'off':
|
||||
return false;
|
||||
default: return this.storageService.getBoolean(enablementKey, StorageScope.GLOBAL, this.environmentService.enableSyncByDefault);
|
||||
default: return this.storageService.getBoolean(enablementKey, StorageScope.GLOBAL, this.environmentService.enableSyncByDefault); // {{SQL CARBON EDIT}} strict-null-checks move this to a default case
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,13 +127,11 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha
|
||||
}
|
||||
|
||||
private static _reviveCodeActionDto(data: ReadonlyArray<ICodeActionDto>): modes.CodeAction[] {
|
||||
let dataCast = data as unknown; // {{ SQL CARBON EDIT }}
|
||||
let returnval = dataCast as modes.CodeAction[]; // {{ SQL CARBON EDIT }}
|
||||
if (returnval) {
|
||||
if (data) {
|
||||
data.forEach(code => reviveWorkspaceEditDto(code.edit));
|
||||
}
|
||||
|
||||
return <modes.CodeAction[]>returnval; // {{ SQL CARBON EDIT }}
|
||||
return <modes.CodeAction[]><unknown>data; // {{SQL CARBON EDIT}} strict-null-check
|
||||
}
|
||||
|
||||
private static _reviveLinkDTO(data: ILinkDto): modes.ILink {
|
||||
|
||||
@@ -1083,7 +1083,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
|
||||
const provider = this._notebookContentProviders.get(viewType);
|
||||
const revivedUri = URI.revive(uri);
|
||||
if (!provider) {
|
||||
return undefined; // {{SQL CARBON EDIT}}
|
||||
return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
}
|
||||
|
||||
const storageRoot = this._extensionStoragePaths.workspaceValue(provider.extension) ?? this._extensionStoragePaths.globalValue(provider.extension);
|
||||
|
||||
@@ -302,7 +302,7 @@ export function appendStylizedStringToContainer(
|
||||
export function calcANSI8bitColor(colorNumber: number): RGBA | undefined {
|
||||
if (colorNumber % 1 !== 0) {
|
||||
// Should be integer
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 this is necessary because we don't use strict null checks
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 this is necessary because we don't use strict-null-checks
|
||||
return undefined;
|
||||
} if (colorNumber >= 16 && colorNumber <= 231) {
|
||||
// Converts to one of 216 RGB colors
|
||||
@@ -327,7 +327,7 @@ export function calcANSI8bitColor(colorNumber: number): RGBA | undefined {
|
||||
const colorLevel: number = Math.round(colorNumber / 23 * 255);
|
||||
return new RGBA(colorLevel, colorLevel, colorLevel);
|
||||
} else {
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 this is necessary because we don't use strict null checks
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 this is necessary because we don't use strict-null-checks
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,9 +160,6 @@ abstract class NotebookAction extends Action2 {
|
||||
}
|
||||
|
||||
const activeCell = editor.getActiveCell();
|
||||
if (!activeCell) {
|
||||
return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
}
|
||||
|
||||
return {
|
||||
cell: activeCell,
|
||||
|
||||
@@ -231,7 +231,6 @@ export class NotebookEditor extends EditorPane {
|
||||
return group.activeEditorPane._widget.value?.getEditorViewState();
|
||||
}
|
||||
}
|
||||
|
||||
return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
}
|
||||
|
||||
|
||||
@@ -192,8 +192,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
|
||||
|
||||
get activeCodeEditor(): IEditor | undefined {
|
||||
if (this._isDisposed) {
|
||||
// {{SQL CARBON EDIT}}
|
||||
return undefined;
|
||||
return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
}
|
||||
|
||||
const [focused] = this._list!.getFocusedElements();
|
||||
@@ -769,14 +768,14 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
|
||||
await this._loadKernelPreloads(this.activeKernel.extensionLocation, this.activeKernel);
|
||||
|
||||
if (tokenSource.token.isCancellationRequested) {
|
||||
return undefined; // {{ SQL CARBON EDIT }}
|
||||
return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
}
|
||||
|
||||
this._activeKernelResolvePromise = (this.activeKernel as INotebookKernelInfo2).resolve(this.viewModel!.uri, this.getId(), tokenSource.token);
|
||||
await this._activeKernelResolvePromise;
|
||||
|
||||
if (tokenSource.token.isCancellationRequested) {
|
||||
return undefined; // {{ SQL CARBON EDIT }}
|
||||
return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ export class SimpleFileDialog {
|
||||
|
||||
this.filePickBox.onDidCustom(() => {
|
||||
if (isAcceptHandled || this.busy) {
|
||||
return undefined; // {{SQL CARBON EDIT}} @todo anthonydresser return to return; when we do strict null checks
|
||||
return undefined; // {{SQL CARBON EDIT}} @todo anthonydresser return to return; when we do strict-null-checks
|
||||
}
|
||||
|
||||
isAcceptHandled = true;
|
||||
|
||||
@@ -145,7 +145,7 @@ function globExprsToRgGlobs(patterns: glob.IExpression, folder?: string, exclude
|
||||
}
|
||||
|
||||
globArgs.push(fixDriveC(key));
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 cast value because we aren't using strict null checks
|
||||
// {{SQL CARBON EDIT}} @todo anthonydresser 4/12/19 cast value because we aren't using strict-null-checks
|
||||
} else if (value && (<glob.SiblingClause>value).when) {
|
||||
siblingClauses[key] = value;
|
||||
}
|
||||
|
||||
@@ -37,12 +37,11 @@ import { isWeb } from 'vs/base/common/platform';
|
||||
|
||||
// implementation
|
||||
|
||||
const DEFAULT_COLOR_THEME_ID = 'vs sql-theme-carbon-themes-light_carbon-json';
|
||||
const DEFAULT_COLOR_THEME_ID = 'vs sql-theme-carbon-themes-light_carbon-json'; // {{SQL CARBON EDIT}}
|
||||
|
||||
const PERSISTED_OS_COLOR_SCHEME = 'osColorScheme';
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
const defaultThemeExtensionId = 'sql-theme-carbon';
|
||||
const defaultThemeExtensionId = 'sql-theme-carbon';// {{SQL CARBON EDIT}}
|
||||
const oldDefaultThemeExtensionId = 'vscode-theme-colorful-defaults';
|
||||
|
||||
const DEFAULT_FILE_ICON_THEME_ID = 'vscode.vscode-theme-seti-vs-seti';
|
||||
|
||||
@@ -33,7 +33,7 @@ const colorThemeSettingEnumDescriptions: string[] = [];
|
||||
const colorThemeSettingSchema: IConfigurationPropertySchema = {
|
||||
type: 'string',
|
||||
description: nls.localize('colorTheme', "Specifies the color theme used in the workbench."),
|
||||
default: isWeb ? DEFAULT_THEME_LIGHT_SETTING_VALUE : DEFAULT_THEME_LIGHT_SETTING_VALUE,
|
||||
default: isWeb ? DEFAULT_THEME_LIGHT_SETTING_VALUE : DEFAULT_THEME_LIGHT_SETTING_VALUE, // {{SQL CARBON EDIT}}
|
||||
enum: colorThemeSettingEnum,
|
||||
enumDescriptions: colorThemeSettingEnumDescriptions,
|
||||
errorMessage: nls.localize('colorThemeError', "Theme is unknown or not installed."),
|
||||
|
||||
@@ -141,7 +141,7 @@ suite.skip('TextSearch performance (integration)', () => {
|
||||
let i = n;
|
||||
return (function iterate(): Promise<undefined> | undefined {
|
||||
if (!i--) {
|
||||
return undefined;
|
||||
return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
}
|
||||
|
||||
return runSearch()
|
||||
|
||||
Reference in New Issue
Block a user