mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 02:02:35 -05:00
Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)
* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c * remove files we don't want * fix hygiene * update distro * update distro * fix hygiene * fix strict nulls * distro * distro * fix tests * fix tests * add another edit * fix viewlet icon * fix azure dialog * fix some padding * fix more padding issues
This commit is contained in:
@@ -5,12 +5,9 @@
|
||||
|
||||
.monaco-editor .tokens-inspect-widget {
|
||||
z-index: 50;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
-ms-user-select: text;
|
||||
-khtml-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-o-user-select: text;
|
||||
user-select: text;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { FontStyle, IState, ITokenizationSupport, LanguageIdentifier, StandardTo
|
||||
import { NULL_STATE, nullTokenize, nullTokenize2 } from 'vs/editor/common/modes/nullMode';
|
||||
import { IModeService } from 'vs/editor/common/services/modeService';
|
||||
import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService';
|
||||
import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { editorHoverBackground, editorHoverBorder, editorHoverForeground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { HIGH_CONTRAST, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
||||
import { InspectTokensNLS } from 'vs/editor/common/standaloneStrings';
|
||||
|
||||
@@ -335,4 +335,8 @@ registerThemingParticipant((theme, collector) => {
|
||||
if (background) {
|
||||
collector.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${background}; }`);
|
||||
}
|
||||
const foreground = theme.getColor(editorHoverForeground);
|
||||
if (foreground) {
|
||||
collector.addRule(`.monaco-editor .tokens-inspect-widget { color: ${foreground}; }`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -88,7 +88,7 @@ export class QuickCommandAction extends BaseEditorQuickOpenAction {
|
||||
primary: (browser.isIE ? KeyMod.Alt | KeyCode.F1 : KeyCode.F1),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
menuOpts: {
|
||||
contextMenuOpts: {
|
||||
group: 'z_commands',
|
||||
order: 1
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export class QuickOutlineAction extends BaseEditorQuickOpenAction {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
menuOpts: {
|
||||
contextMenuOpts: {
|
||||
group: 'navigation',
|
||||
order: 3
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { registerEditorContribution } from 'vs/editor/browser/editorExtensions';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { ReferencesController } from 'vs/editor/contrib/referenceSearch/referencesController';
|
||||
import { ReferencesController } from 'vs/editor/contrib/gotoSymbol/peek/referencesController';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
@@ -31,7 +31,7 @@ import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/commo
|
||||
import { IConfirmation, IConfirmationResult, IDialogOptions, IDialogService, IShowResult } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { AbstractKeybindingService } from 'vs/platform/keybinding/common/abstractKeybindingService';
|
||||
import { IKeybindingEvent, IKeyboardEvent, KeybindingSource } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IKeybindingEvent, IKeyboardEvent, KeybindingSource, KeybindingsSchemaContribution } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
import { IKeybindingItem, KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem';
|
||||
@@ -99,8 +99,13 @@ function withTypedEditor<T>(widget: editorCommon.IEditor, codeEditorCallback: (e
|
||||
export class SimpleEditorModelResolverService implements ITextModelService {
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private readonly modelService: IModelService | undefined;
|
||||
private editor?: editorCommon.IEditor;
|
||||
|
||||
constructor(modelService: IModelService | undefined) {
|
||||
this.modelService = modelService;
|
||||
}
|
||||
|
||||
public setEditor(editor: editorCommon.IEditor): void {
|
||||
this.editor = editor;
|
||||
}
|
||||
@@ -132,7 +137,7 @@ export class SimpleEditorModelResolverService implements ITextModelService {
|
||||
}
|
||||
|
||||
private findModel(editor: ICodeEditor, resource: URI): ITextModel | null {
|
||||
let model = editor.getModel();
|
||||
let model = this.modelService ? this.modelService.getModel(resource) : editor.getModel();
|
||||
if (model && model.uri.toString() !== resource.toString()) {
|
||||
return null;
|
||||
}
|
||||
@@ -409,6 +414,10 @@ export class StandaloneKeybindingService extends AbstractKeybindingService {
|
||||
public _dumpDebugInfoJSON(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
public registerSchemaContribution(contribution: KeybindingsSchemaContribution): void {
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
function isConfigurationOverrides(thing: any): thing is IConfigurationOverrides {
|
||||
@@ -648,7 +657,9 @@ export class SimpleBulkEditService implements IBulkEditService {
|
||||
let totalEdits = 0;
|
||||
let totalFiles = 0;
|
||||
edits.forEach((edits, model) => {
|
||||
model.applyEdits(edits.map(edit => EditOperation.replaceMove(Range.lift(edit.range), edit.text)));
|
||||
model.pushStackElement();
|
||||
model.pushEditOperations([], edits.map((e) => EditOperation.replaceMove(Range.lift(e.range), e.text)), () => []);
|
||||
model.pushStackElement();
|
||||
totalFiles += 1;
|
||||
totalEdits += edits.length;
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { OpenerService } from 'vs/editor/browser/services/openerService';
|
||||
import { DiffNavigator } from 'vs/editor/browser/widget/diffNavigator';
|
||||
import { DiffNavigator, IDiffNavigator } from 'vs/editor/browser/widget/diffNavigator';
|
||||
import { ConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions';
|
||||
import { BareFontInfo, FontInfo } from 'vs/editor/common/config/fontInfo';
|
||||
import { Token } from 'vs/editor/common/core/token';
|
||||
@@ -47,7 +47,7 @@ function withAllStandaloneServices<T extends editorCommon.IEditor>(domElement: H
|
||||
|
||||
let simpleEditorModelResolverService: SimpleEditorModelResolverService | null = null;
|
||||
if (!services.has(ITextModelService)) {
|
||||
simpleEditorModelResolverService = new SimpleEditorModelResolverService();
|
||||
simpleEditorModelResolverService = new SimpleEditorModelResolverService(StaticServices.modelService.get());
|
||||
services.set(ITextModelService, simpleEditorModelResolverService);
|
||||
}
|
||||
|
||||
@@ -127,13 +127,6 @@ export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorC
|
||||
});
|
||||
}
|
||||
|
||||
export interface IDiffNavigator {
|
||||
canNavigate(): boolean;
|
||||
next(): void;
|
||||
previous(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface IDiffNavigatorOptions {
|
||||
readonly followsCaret?: boolean;
|
||||
readonly ignoreCharChanges?: boolean;
|
||||
|
||||
@@ -89,7 +89,7 @@ export module StaticServices {
|
||||
|
||||
let _all: LazyStaticService<any>[] = [];
|
||||
|
||||
function define<T>(serviceId: ServiceIdentifier<T>, factory: (overrides: IEditorOverrideServices) => T): LazyStaticService<T> {
|
||||
function define<T>(serviceId: ServiceIdentifier<T>, factory: (overrides: IEditorOverrideServices | undefined) => T): LazyStaticService<T> {
|
||||
let r = new LazyStaticService(serviceId, factory);
|
||||
_all.push(r);
|
||||
return r;
|
||||
@@ -144,12 +144,12 @@ export module StaticServices {
|
||||
|
||||
export const modeService = define(IModeService, (o) => new ModeServiceImpl());
|
||||
|
||||
export const modelService = define(IModelService, (o) => new ModelServiceImpl(configurationService.get(o), resourcePropertiesService.get(o)));
|
||||
export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl());
|
||||
|
||||
export const modelService = define(IModelService, (o) => new ModelServiceImpl(configurationService.get(o), resourcePropertiesService.get(o), standaloneThemeService.get(o)));
|
||||
|
||||
export const markerDecorationsService = define(IMarkerDecorationsService, (o) => new MarkerDecorationsService(modelService.get(o), markerService.get(o)));
|
||||
|
||||
export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl());
|
||||
|
||||
export const codeEditorService = define(ICodeEditorService, (o) => new StandaloneCodeEditorServiceImpl(standaloneThemeService.get(o)));
|
||||
|
||||
export const editorProgressService = define(IEditorProgressService, () => new SimpleEditorProgressService());
|
||||
@@ -194,7 +194,7 @@ export class DynamicStandaloneServices extends Disposable {
|
||||
|
||||
ensure(IAccessibilityService, () => new BrowserAccessibilityService(contextKeyService, configurationService));
|
||||
|
||||
ensure(IListService, () => new ListService(contextKeyService));
|
||||
ensure(IListService, () => new ListService(themeService));
|
||||
|
||||
let commandService = ensure(ICommandService, () => new StandaloneCommandService(this._instantiationService));
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ const colorRegistry = Registry.as<IColorRegistry>(Extensions.ColorContribution);
|
||||
const themingRegistry = Registry.as<IThemingRegistry>(ThemingExtensions.ThemingContribution);
|
||||
|
||||
class StandaloneTheme implements IStandaloneTheme {
|
||||
|
||||
public readonly id: string;
|
||||
public readonly themeName: string;
|
||||
|
||||
@@ -128,6 +129,14 @@ class StandaloneTheme implements IStandaloneTheme {
|
||||
}
|
||||
return this._tokenTheme;
|
||||
}
|
||||
|
||||
public getTokenStyleMetadata(type: string, modifiers: string[]): number | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public get tokenColorMap(): string[] {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
function isBuiltinTheme(themeName: string): themeName is BuiltinTheme {
|
||||
|
||||
Reference in New Issue
Block a user