mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1 (#8722)
* Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1 * remove tests that aren't working
This commit is contained in:
2
.yarnrc
2
.yarnrc
@@ -1,3 +1,3 @@
|
||||
disturl "https://atom.io/download/electron"
|
||||
target "6.1.5"
|
||||
target "6.1.6"
|
||||
runtime "electron"
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
"git": {
|
||||
"name": "electron",
|
||||
"repositoryUrl": "https://github.com/electron/electron",
|
||||
"commitHash": "6f62f91822a80192cb711c604f1a8f1a176f328d"
|
||||
"commitHash": "19c705ab80cd6fdccca3d65803ec2c4addb9540a"
|
||||
}
|
||||
},
|
||||
"isOnlyProductionDependency": true,
|
||||
"license": "MIT",
|
||||
"version": "6.1.5"
|
||||
"version": "6.1.6"
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
|
||||
@@ -88,6 +88,10 @@
|
||||
"fileMatch": "/.vscode/tasks.json",
|
||||
"url": "vscode://schemas/tasks"
|
||||
},
|
||||
{
|
||||
"fileMatch": "%APP_SETTINGS_HOME%/tasks.json",
|
||||
"url": "vscode://schemas/tasks"
|
||||
},
|
||||
{
|
||||
"fileMatch": "%APP_SETTINGS_HOME%/snippets/*.json",
|
||||
"url": "vscode://schemas/snippets"
|
||||
|
||||
@@ -23,7 +23,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
const previewManager = new PreviewManager(extensionRoot, sizeStatusBarEntry, binarySizeStatusBarEntry, zoomStatusBarEntry);
|
||||
|
||||
context.subscriptions.push(vscode.window.registerWebviewEditorProvider(PreviewManager.viewType, previewManager));
|
||||
context.subscriptions.push(vscode.window.registerWebviewCustomEditorProvider(PreviewManager.viewType, previewManager));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('imagePreview.zoomIn', () => {
|
||||
previewManager.activePreview?.zoomIn();
|
||||
|
||||
@@ -13,7 +13,7 @@ import { BinarySizeStatusBarEntry } from './binarySizeStatusBarEntry';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
|
||||
export class PreviewManager implements vscode.WebviewEditorProvider {
|
||||
export class PreviewManager implements vscode.WebviewCustomEditorProvider {
|
||||
|
||||
public static readonly viewType = 'imagePreview.previewEditor';
|
||||
|
||||
@@ -28,10 +28,10 @@ export class PreviewManager implements vscode.WebviewEditorProvider {
|
||||
) { }
|
||||
|
||||
public async resolveWebviewEditor(
|
||||
input: { readonly resource: vscode.Uri, },
|
||||
resource: vscode.Uri,
|
||||
webviewEditor: vscode.WebviewPanel,
|
||||
): Promise<vscode.WebviewEditorCapabilities> {
|
||||
const preview = new Preview(this.extensionRoot, input.resource, webviewEditor, this.sizeStatusBarEntry, this.binarySizeStatusBarEntry, this.zoomStatusBarEntry);
|
||||
): Promise<void> {
|
||||
const preview = new Preview(this.extensionRoot, resource, webviewEditor, this.sizeStatusBarEntry, this.binarySizeStatusBarEntry, this.zoomStatusBarEntry);
|
||||
this._previews.add(preview);
|
||||
this.setActivePreview(preview);
|
||||
|
||||
@@ -44,8 +44,6 @@ export class PreviewManager implements vscode.WebviewEditorProvider {
|
||||
this.setActivePreview(undefined);
|
||||
}
|
||||
});
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
public get activePreview() { return this._activePreview; }
|
||||
|
||||
@@ -52,7 +52,7 @@ class PreviewStore extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
export class MarkdownPreviewManager extends Disposable implements vscode.WebviewPanelSerializer, vscode.WebviewEditorProvider {
|
||||
export class MarkdownPreviewManager extends Disposable implements vscode.WebviewPanelSerializer, vscode.WebviewCustomEditorProvider {
|
||||
private static readonly markdownPreviewActiveContextKey = 'markdownPreviewFocus';
|
||||
|
||||
private readonly _topmostLineMonitor = new TopmostLineMonitor();
|
||||
@@ -70,7 +70,7 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
||||
) {
|
||||
super();
|
||||
this._register(vscode.window.registerWebviewPanelSerializer(DynamicMarkdownPreview.viewType, this));
|
||||
this._register(vscode.window.registerWebviewEditorProvider('vscode.markdown.preview.editor', this));
|
||||
this._register(vscode.window.registerWebviewCustomEditorProvider('vscode.markdown.preview.editor', this));
|
||||
}
|
||||
|
||||
public refresh() {
|
||||
@@ -149,11 +149,11 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
||||
}
|
||||
|
||||
public async resolveWebviewEditor(
|
||||
input: { readonly resource: vscode.Uri; },
|
||||
resource: vscode.Uri,
|
||||
webview: vscode.WebviewPanel
|
||||
): Promise<vscode.WebviewEditorCapabilities> {
|
||||
): Promise<void> {
|
||||
const preview = DynamicMarkdownPreview.revive(
|
||||
{ resource: input.resource, locked: false, resourceColumn: vscode.ViewColumn.One },
|
||||
{ resource, locked: false, resourceColumn: vscode.ViewColumn.One },
|
||||
webview,
|
||||
this._contentProvider,
|
||||
this._previewConfigurations,
|
||||
@@ -161,7 +161,6 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
||||
this._topmostLineMonitor,
|
||||
this._contributions);
|
||||
this.registerStaticPreview(preview);
|
||||
return {};
|
||||
}
|
||||
|
||||
private createNewDynamicPreview(
|
||||
|
||||
@@ -252,11 +252,11 @@ export class PlatformService implements IPlatformService {
|
||||
outputChannel.appendLine(localize('platformService.RunStreamedCommand.ExitedWithSignal', " >>> {0} … exited with signal: {1}", command, signal));
|
||||
}
|
||||
});
|
||||
child.stdout.on('data', (data: string | Buffer) => {
|
||||
child.stdout!.on('data', (data: string | Buffer) => {
|
||||
stdoutData.push(data.toString());
|
||||
this.outputDataChunk(data, outputChannel, localize('platformService.RunCommand.stdout', " stdout: "));
|
||||
});
|
||||
child.stderr.on('data', (data: string | Buffer) => { this.outputDataChunk(data, outputChannel, localize('platformService.RunCommand.stderr', " stderr: ")); });
|
||||
child.stderr!.on('data', (data: string | Buffer) => { this.outputDataChunk(data, outputChannel, localize('platformService.RunCommand.stderr', " stderr: ")); });
|
||||
|
||||
await child;
|
||||
return stdoutData.join('');
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Language Features for Search Result files
|
||||
|
||||
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
|
||||
|
||||
This extension provides Syntax Highlighting, Symbol Infomation, Result Highlighting, and Go to Definition capabilities for the Search Results Editor.
|
||||
|
||||
@@ -96,12 +96,13 @@
|
||||
"@types/iconv-lite": "0.0.1",
|
||||
"@types/keytar": "^4.4.0",
|
||||
"@types/mocha": "2.2.39",
|
||||
"@types/node": "^10.12.12",
|
||||
"@types/node": "^12.11.7",
|
||||
"@types/plotly.js": "^1.44.9",
|
||||
"@types/sanitize-html": "^1.18.2",
|
||||
"@types/sinon": "^1.16.36",
|
||||
"@types/webpack": "^4.4.10",
|
||||
"@types/windows-foreground-love": "^0.3.0",
|
||||
"@types/windows-mutex": "^0.4.0",
|
||||
"@types/windows-process-tree": "^0.2.0",
|
||||
"@types/winreg": "^1.2.30",
|
||||
"@types/yauzl": "^2.9.1",
|
||||
@@ -113,7 +114,7 @@
|
||||
"coveralls": "^2.11.11",
|
||||
"cson-parser": "^1.3.3",
|
||||
"debounce": "^1.0.0",
|
||||
"electron": "6.1.5",
|
||||
"electron": "6.1.6",
|
||||
"event-stream": "3.3.4",
|
||||
"express": "^4.13.1",
|
||||
"fancy-log": "^1.3.3",
|
||||
|
||||
@@ -33,4 +33,8 @@ export class Deferred<T> implements Promise<T> {
|
||||
finally(onfinally?: () => void): Promise<T> {
|
||||
return this.promise.finally(onfinally);
|
||||
}
|
||||
|
||||
get [Symbol.toStringTag](): string {
|
||||
return this.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,15 +39,15 @@ export class ConnectionConfig {
|
||||
|
||||
let allGroups: IConnectionProfileGroup[] = [];
|
||||
const config = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY);
|
||||
let { user } = config;
|
||||
const { workspace } = config;
|
||||
let { userValue } = config;
|
||||
const { workspaceValue } = config;
|
||||
|
||||
if (user) {
|
||||
if (workspace) {
|
||||
user = user.filter(x => find(workspace, f => this.isSameGroupName(f, x)) === undefined);
|
||||
allGroups = allGroups.concat(workspace);
|
||||
if (userValue) {
|
||||
if (workspaceValue) {
|
||||
userValue = userValue.filter(x => find(workspaceValue, f => this.isSameGroupName(f, x)) === undefined);
|
||||
allGroups = allGroups.concat(workspaceValue);
|
||||
}
|
||||
allGroups = allGroups.concat(user);
|
||||
allGroups = allGroups.concat(userValue);
|
||||
}
|
||||
return allGroups.map(g => {
|
||||
if (g.parentId === '' || !g.parentId) {
|
||||
@@ -63,7 +63,7 @@ export class ConnectionConfig {
|
||||
public addConnection(profile: IConnectionProfile): Promise<IConnectionProfile> {
|
||||
if (profile.saveProfile) {
|
||||
return this.addGroupFromProfile(profile).then(groupId => {
|
||||
let profiles = this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).user;
|
||||
let profiles = this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).userValue;
|
||||
if (!profiles) {
|
||||
profiles = [];
|
||||
}
|
||||
@@ -108,7 +108,7 @@ export class ConnectionConfig {
|
||||
if (profile.groupId && profile.groupId !== Utils.defaultGroupId) {
|
||||
return Promise.resolve(profile.groupId);
|
||||
} else {
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).user;
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).userValue;
|
||||
let result = this.saveGroup(groups!, profile.groupFullName, undefined, undefined);
|
||||
groups = result.groups;
|
||||
|
||||
@@ -123,7 +123,7 @@ export class ConnectionConfig {
|
||||
if (profileGroup.id) {
|
||||
return Promise.resolve(profileGroup.id);
|
||||
} else {
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).user;
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).userValue;
|
||||
let sameNameGroup = groups ? find(groups, group => group.name === profileGroup.name) : undefined;
|
||||
if (sameNameGroup) {
|
||||
let errMessage: string = nls.localize('invalidServerName', "A server group with the same name already exists.");
|
||||
@@ -143,9 +143,9 @@ export class ConnectionConfig {
|
||||
if (configs) {
|
||||
let fromConfig: IConnectionProfileStore[] | undefined;
|
||||
if (configTarget === ConfigurationTarget.USER) {
|
||||
fromConfig = configs.user;
|
||||
fromConfig = configs.userValue;
|
||||
} else if (configTarget === ConfigurationTarget.WORKSPACE) {
|
||||
fromConfig = configs.workspace || [];
|
||||
fromConfig = configs.workspaceValue || [];
|
||||
}
|
||||
if (fromConfig) {
|
||||
profiles = fromConfig;
|
||||
@@ -218,7 +218,7 @@ export class ConnectionConfig {
|
||||
*/
|
||||
public deleteConnection(profile: ConnectionProfile): Promise<void> {
|
||||
// Get all connections in the settings
|
||||
let profiles = this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).user;
|
||||
let profiles = this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).userValue;
|
||||
// Remove the profile from the connections
|
||||
profiles = profiles!.filter(value => {
|
||||
let providerConnectionProfile = ConnectionProfile.createFromStoredProfile(value, this._capabilitiesService);
|
||||
@@ -239,7 +239,7 @@ export class ConnectionConfig {
|
||||
// Add selected group to subgroups list
|
||||
subgroups.push(group);
|
||||
// Get all connections in the settings
|
||||
let profiles = this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).user;
|
||||
let profiles = this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).userValue;
|
||||
// Remove the profiles from the connections
|
||||
profiles = profiles!.filter(value => {
|
||||
let providerConnectionProfile = ConnectionProfile.createFromStoredProfile(value, this._capabilitiesService);
|
||||
@@ -247,7 +247,7 @@ export class ConnectionConfig {
|
||||
});
|
||||
|
||||
// Get all groups in the settings
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).user;
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).userValue;
|
||||
// Remove subgroups in the settings
|
||||
groups = groups!.filter((grp) => {
|
||||
return !subgroups.some((item) => item.id === grp.id);
|
||||
@@ -262,7 +262,7 @@ export class ConnectionConfig {
|
||||
* Moves the source group under the target group.
|
||||
*/
|
||||
public changeGroupIdForConnectionGroup(source: ConnectionProfileGroup, target: ConnectionProfileGroup): Promise<void> {
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).user;
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).userValue;
|
||||
groups = groups!.map(g => {
|
||||
if (g.id === source.id) {
|
||||
g.parentId = target.id;
|
||||
@@ -286,8 +286,8 @@ export class ConnectionConfig {
|
||||
* Moves the connection under the target group with the new ID.
|
||||
*/
|
||||
private changeGroupIdForConnectionInSettings(profile: ConnectionProfile, newGroupID: string, target: ConfigurationTarget = ConfigurationTarget.USER): Promise<void> {
|
||||
let profiles = target === ConfigurationTarget.USER ? this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).user :
|
||||
this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).workspace;
|
||||
let profiles = target === ConfigurationTarget.USER ? this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).userValue :
|
||||
this.configurationService.inspect<IConnectionProfileStore[]>(CONNECTIONS_CONFIG_KEY).workspaceValue;
|
||||
if (profiles) {
|
||||
if (profile.parent && profile.parent.id === UNSAVED_GROUP_ID) {
|
||||
profile.groupId = newGroupID;
|
||||
@@ -328,7 +328,7 @@ export class ConnectionConfig {
|
||||
}
|
||||
|
||||
public editGroup(source: ConnectionProfileGroup): Promise<void> {
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).user;
|
||||
let groups = this.configurationService.inspect<IConnectionProfileGroup[]>(GROUPS_CONFIG_KEY).userValue;
|
||||
let sameNameGroup = groups ? find(groups, group => group.name === source.name && group.id !== source.id) : undefined;
|
||||
if (sameNameGroup) {
|
||||
let errMessage: string = nls.localize('invalidServerName', "A server group with the same name already exists.");
|
||||
|
||||
@@ -269,7 +269,7 @@ suite('ConnectionConfig', () => {
|
||||
let savedConnectionProfile = await config.addConnection(connectionProfile);
|
||||
|
||||
assert.ok(!!savedConnectionProfile.id);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').user.length, testConnections.length + 1);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').userValue.length, testConnections.length + 1);
|
||||
});
|
||||
|
||||
test('addConnection should not add the new profile to user settings if already exists', async () => {
|
||||
@@ -303,7 +303,7 @@ suite('ConnectionConfig', () => {
|
||||
let savedConnectionProfile = await config.addConnection(connectionProfile);
|
||||
|
||||
assert.equal(savedConnectionProfile.id, existingConnection.id);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').user.length, testConnections.length);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').userValue.length, testConnections.length);
|
||||
});
|
||||
|
||||
test('addConnection should add the new group to user settings if does not exist', async () => {
|
||||
@@ -333,8 +333,8 @@ suite('ConnectionConfig', () => {
|
||||
let config = new ConnectionConfig(configurationService, capabilitiesService.object);
|
||||
await config.addConnection(connectionProfile);
|
||||
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').user.length, testConnections.length + 1);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connectionGroups').user.length, testGroups.length + 1);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').userValue.length, testConnections.length + 1);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connectionGroups').userValue.length, testGroups.length + 1);
|
||||
});
|
||||
|
||||
test('getConnections should return connections from user and workspace settings given getWorkspaceConnections set to true', () => {
|
||||
@@ -452,7 +452,7 @@ suite('ConnectionConfig', () => {
|
||||
let config = new ConnectionConfig(configurationService, capabilitiesService.object);
|
||||
await config.deleteConnection(connectionProfile);
|
||||
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').user.length, testConnections.length - 1);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').userValue.length, testConnections.length - 1);
|
||||
});
|
||||
|
||||
test('deleteConnectionGroup should remove the children connections and subgroups from config', async () => {
|
||||
@@ -488,8 +488,8 @@ suite('ConnectionConfig', () => {
|
||||
let config = new ConnectionConfig(configurationService, capabilitiesService.object);
|
||||
await config.deleteGroup(connectionProfileGroup);
|
||||
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').user.length, testConnections.length - 1);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').user.length, testGroups.length - 2);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').userValue.length, testConnections.length - 1);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').userValue.length, testGroups.length - 2);
|
||||
});
|
||||
|
||||
test('deleteConnection should not throw error for connection not in config', async () => {
|
||||
@@ -517,7 +517,7 @@ suite('ConnectionConfig', () => {
|
||||
let config = new ConnectionConfig(configurationService, capabilitiesService.object);
|
||||
await config.deleteConnection(connectionProfile);
|
||||
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').user.length, testConnections.length);
|
||||
assert.equal(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').userValue.length, testConnections.length);
|
||||
});
|
||||
|
||||
test('renameGroup should change group name', async () => {
|
||||
@@ -528,7 +528,7 @@ suite('ConnectionConfig', () => {
|
||||
let config = new ConnectionConfig(configurationService, capabilitiesService.object);
|
||||
await config.editGroup(connectionProfileGroup);
|
||||
|
||||
let editedGroups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').user;
|
||||
let editedGroups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').userValue;
|
||||
|
||||
assert.equal(editedGroups.length, testGroups.length);
|
||||
let editedGroup = find(editedGroups, group => group.id === 'g2');
|
||||
@@ -547,7 +547,7 @@ suite('ConnectionConfig', () => {
|
||||
await config.editGroup(sameNameGroup);
|
||||
assert.fail();
|
||||
} catch (e) {
|
||||
let groups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').user;
|
||||
let groups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').userValue;
|
||||
let originalGroup = find(groups, g => g.id === 'g2');
|
||||
assert.ok(!!originalGroup);
|
||||
assert.equal(originalGroup.name, 'g2');
|
||||
@@ -563,7 +563,7 @@ suite('ConnectionConfig', () => {
|
||||
let config = new ConnectionConfig(configurationService, capabilitiesService.object);
|
||||
await config.changeGroupIdForConnectionGroup(sourceProfileGroup, targetProfileGroup);
|
||||
|
||||
let editedGroups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').user;
|
||||
let editedGroups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').userValue;
|
||||
|
||||
assert.equal(editedGroups.length, testGroups.length);
|
||||
let editedGroup = find(editedGroups, group => group.id === 'g2');
|
||||
@@ -620,7 +620,7 @@ suite('ConnectionConfig', () => {
|
||||
await config.changeGroupIdForConnection(connectionProfile, 'test');
|
||||
assert.fail();
|
||||
} catch (e) {
|
||||
let editedConnections = configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').user;
|
||||
let editedConnections = configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').userValue;
|
||||
// two
|
||||
assert.equal(editedConnections.length, _testConnections.length);
|
||||
let editedConnection = find(editedConnections, con => con.id === 'server3-2');
|
||||
@@ -657,7 +657,7 @@ suite('ConnectionConfig', () => {
|
||||
let config = new ConnectionConfig(configurationService, capabilitiesService.object);
|
||||
await config.changeGroupIdForConnection(connectionProfile, newId);
|
||||
|
||||
let editedConnections = configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').user;
|
||||
let editedConnections = configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').userValue;
|
||||
assert.equal(editedConnections.length, testConnections.length);
|
||||
let editedConnection = find(editedConnections, con => con.id === 'server3');
|
||||
assert.ok(!!editedConnection);
|
||||
@@ -704,7 +704,7 @@ suite('ConnectionConfig', () => {
|
||||
|
||||
await config.addGroup(newGroup);
|
||||
|
||||
let editGroups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').user;
|
||||
let editGroups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').userValue;
|
||||
|
||||
assert.equal(editGroups.length, testGroups.length + 1);
|
||||
});
|
||||
@@ -725,7 +725,7 @@ suite('ConnectionConfig', () => {
|
||||
await config.addGroup(existingGroupName);
|
||||
assert.fail();
|
||||
} catch (e) {
|
||||
let editGroups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').user;
|
||||
let editGroups = configurationService.inspect<IConnectionProfileGroup[]>('datasource.connectionGroups').userValue;
|
||||
|
||||
assert.equal(editGroups.length, testGroups.length);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { getConfigurationKeys, IConfigurationOverrides, IConfigurationService, getConfigurationValue, ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import { getConfigurationKeys, IConfigurationOverrides, IConfigurationService, getConfigurationValue, ConfigurationTarget, IConfigurationValue } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
export class TestConfigurationService implements IConfigurationService {
|
||||
public _serviceBrand: undefined;
|
||||
@@ -42,19 +42,13 @@ export class TestConfigurationService implements IConfigurationService {
|
||||
return { dispose() { } };
|
||||
}
|
||||
|
||||
public inspect<T>(key: string, overrides?: IConfigurationOverrides): {
|
||||
default: T,
|
||||
user: T,
|
||||
workspace?: T,
|
||||
workspaceFolder?: T
|
||||
value: T,
|
||||
} {
|
||||
public inspect<T>(key: string, overrides?: IConfigurationOverrides): IConfigurationValue<T> {
|
||||
|
||||
return {
|
||||
value: getConfigurationValue<T>(this.configuration.user, key),
|
||||
default: undefined,
|
||||
user: getConfigurationValue<T>(this.configuration.user, key),
|
||||
workspace: getConfigurationValue<T>(this.configuration.workspace, key),
|
||||
userValue: getConfigurationValue<T>(this.configuration.user, key),
|
||||
workspaceValue: getConfigurationValue<T>(this.configuration.workspace, key),
|
||||
workspaceFolder: undefined
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
|
||||
import { IGridDataProvider, getResultsString } from 'sql/platform/query/common/gridDataProvider';
|
||||
|
||||
@@ -22,7 +22,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { isUndefinedOrNull } from 'vs/base/common/types';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { find, firstIndex } from 'vs/base/common/arrays';
|
||||
|
||||
@@ -31,7 +31,7 @@ import { append, $ } from 'vs/base/browser/dom';
|
||||
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { StandaloneCodeEditor } from 'vs/editor/standalone/browser/standaloneCodeEditor';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
@@ -43,7 +43,7 @@ export class QueryTextEditor extends BaseTextEditor {
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IResourceConfigurationService configurationService: IResourceConfigurationService,
|
||||
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService,
|
||||
@IEditorService protected editorService: IEditorService,
|
||||
|
||||
@@ -33,7 +33,7 @@ import { IClipboardService } from 'sql/platform/clipboard/common/clipboardServic
|
||||
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { IViewPaneOptions, ViewPane } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
export class AutoOAuthDialog extends Modal {
|
||||
|
||||
@@ -28,7 +28,7 @@ import { IAccountPickerService } from 'sql/workbench/contrib/accounts/browser/ac
|
||||
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
|
||||
import { append, $ } from 'vs/base/browser/dom';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
export class BackupDialog extends Modal {
|
||||
|
||||
@@ -17,7 +17,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IAddedViewDescriptorRef } from 'vs/workbench/browser/parts/views/views';
|
||||
import { ConnectionViewletPanel } from 'sql/workbench/contrib/dataExplorer/browser/connectionViewletPanel';
|
||||
import { Extensions as ViewContainerExtensions, IViewDescriptor, IViewsRegistry, IViewContainersRegistry } from 'vs/workbench/common/views';
|
||||
import { Extensions as ViewContainerExtensions, IViewDescriptor, IViewsRegistry, IViewContainersRegistry, ViewContainerLocation } from 'vs/workbench/common/views';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
@@ -46,7 +46,7 @@ export class OpenDataExplorerViewletAction extends ShowViewletAction {
|
||||
}
|
||||
}
|
||||
|
||||
export const VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer(VIEWLET_ID);
|
||||
export const VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer(VIEWLET_ID, ViewContainerLocation.Sidebar);
|
||||
|
||||
export class DataExplorerViewletViewsContribution implements IWorkbenchContribution {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { NotebookChangeType } from 'sql/workbench/contrib/notebook/common/models/contracts';
|
||||
import { Deferred } from 'sql/base/common/promise';
|
||||
import { NotebookTextFileModel } from 'sql/workbench/contrib/notebook/browser/models/notebookTextFileModel';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorModel';
|
||||
import { UntitledTextEditorModel } from 'vs/workbench/common/editor/untitledTextEditorModel';
|
||||
import { UntitledTextEditorInput } from 'vs/workbench/common/editor/untitledTextEditorInput';
|
||||
|
||||
@@ -13,7 +13,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { SaveFormat } from 'sql/workbench/contrib/grid/common/interfaces';
|
||||
import { IDataResource } from 'sql/workbench/services/notebook/browser/sql/sqlSessionManager';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { getEolString, shouldIncludeHeaders, shouldRemoveNewLines } from 'sql/platform/query/common/queryRunner';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
|
||||
@@ -28,6 +28,10 @@ export class FileNoteBookEditorInputFactory implements IEditorInputFactory {
|
||||
const fileEditorInput = factory.deserialize(instantiationService, serializedEditorInput) as FileEditorInput;
|
||||
return instantiationService.createInstance(FileNotebookInput, fileEditorInput.getName(), fileEditorInput.getResource(), fileEditorInput);
|
||||
}
|
||||
|
||||
canSerialize(): boolean { // we can always serialize notebooks
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class UntitledNoteBookEditorInputFactory implements IEditorInputFactory {
|
||||
@@ -44,4 +48,8 @@ export class UntitledNoteBookEditorInputFactory implements IEditorInputFactory {
|
||||
const untitledEditorInput = factory.deserialize(instantiationService, serializedEditorInput) as UntitledTextEditorInput;
|
||||
return instantiationService.createInstance(UntitledNotebookInput, untitledEditorInput.getName(), untitledEditorInput.getResource(), untitledEditorInput);
|
||||
}
|
||||
|
||||
canSerialize(): boolean { // we can always serialize notebooks
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import { startsWith } from 'vs/base/common/strings';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IModelContentChangedEvent } from 'vs/editor/common/model/textModelEvents';
|
||||
import { Promise } from 'es6-promise';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { TestNotificationService } from 'vs/platform/notification/test/common/testNotificationService';
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import { IClipboardService } from 'sql/platform/clipboard/common/clipboardServic
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
export class ServerGroupDialog extends Modal {
|
||||
|
||||
@@ -25,7 +25,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
class EventItem {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ import { CopyKeybind } from 'sql/base/browser/ui/table/plugins/copyKeybind.plugi
|
||||
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
|
||||
import { CellSelectionModel } from 'sql/base/browser/ui/table/plugins/cellSelectionModel.plugin';
|
||||
import { handleCopyRequest } from 'sql/workbench/contrib/profiler/browser/profilerCopyHandler';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { find } from 'vs/base/common/arrays';
|
||||
import { UntitledTextEditorInput } from 'vs/workbench/common/editor/untitledTextEditorInput';
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { ProfilerFilter, ProfilerFilterClause, ProfilerFilterClauseOperator, IProfilerService } from 'sql/workbench/services/profiler/browser/interfaces';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { find, firstIndex } from 'vs/base/common/arrays';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { StandaloneCodeEditor } from 'vs/editor/standalone/browser/standaloneCodeEditor';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
@@ -43,7 +43,7 @@ export class ProfilerResourceEditor extends BaseTextEditor {
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IResourceConfigurationService configurationService: IResourceConfigurationService,
|
||||
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IEditorService protected editorService: IEditorService,
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService
|
||||
|
||||
@@ -32,7 +32,7 @@ import { localize } from 'vs/nls';
|
||||
import { CopyKeybind } from 'sql/base/browser/ui/table/plugins/copyKeybind.plugin';
|
||||
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
|
||||
import { handleCopyRequest } from 'sql/workbench/contrib/profiler/browser/profilerCopyHandler';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
|
||||
export interface ProfilerTableViewState {
|
||||
scrollTop: number;
|
||||
|
||||
@@ -30,6 +30,10 @@ export class FileQueryEditorInputFactory implements IEditorInputFactory {
|
||||
const queryResultsInput = instantiationService.createInstance(QueryResultsInput, fileEditorInput.getResource().toString());
|
||||
return instantiationService.createInstance(FileQueryEditorInput, '', fileEditorInput, queryResultsInput);
|
||||
}
|
||||
|
||||
canSerialize(): boolean { // we can always serialize query inputs
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class UntitledQueryEditorInputFactory implements IEditorInputFactory {
|
||||
@@ -47,4 +51,8 @@ export class UntitledQueryEditorInputFactory implements IEditorInputFactory {
|
||||
const queryResultsInput = instantiationService.createInstance(QueryResultsInput, untitledEditorInput.getResource().toString());
|
||||
return instantiationService.createInstance(UntitledQueryEditorInput, '', untitledEditorInput, queryResultsInput);
|
||||
}
|
||||
|
||||
canSerialize(): boolean { // we can always serialize query inputs
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ const resultsGridConfiguration: IConfigurationNode = {
|
||||
id: 'resultsGrid',
|
||||
type: 'object',
|
||||
title: nls.localize('resultsGridConfigurationTitle', "Results Grid and Messages"),
|
||||
overridable: true,
|
||||
properties: {
|
||||
'resultsGrid.fontFamily': {
|
||||
type: 'string',
|
||||
|
||||
@@ -42,7 +42,7 @@ import { IClipboardService } from 'sql/platform/clipboard/common/clipboardServic
|
||||
import { IFileBrowserDialogController } from 'sql/workbench/services/fileBrowser/common/fileBrowserDialogController';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
interface FileListElement {
|
||||
|
||||
@@ -19,7 +19,7 @@ import * as DOM from 'vs/base/browser/dom';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWebviewService, WebviewElement } from 'vs/workbench/contrib/webview/browser/webview';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
export class WebViewDialog extends Modal {
|
||||
|
||||
@@ -35,7 +35,7 @@ import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { entries } from 'sql/base/common/collections';
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import { IDashboardTab } from 'sql/workbench/contrib/dashboard/browser/dashboard
|
||||
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
class ExtensionListDelegate implements IListVirtualDelegate<IDashboardUITab> {
|
||||
|
||||
@@ -22,7 +22,7 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { append, $ } from 'vs/base/browser/dom';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import { append, $ } from 'vs/base/browser/dom';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { IAction } from 'vs/base/common/actions';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import { IClipboardService } from 'sql/platform/clipboard/common/clipboardServic
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { IInsightsConfigDetails } from 'sql/platform/dashboard/browser/insightRegistry';
|
||||
import { TaskRegistry } from 'sql/platform/tasks/browser/tasksRegistry';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
|
||||
@@ -22,7 +22,7 @@ import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilit
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { isUndefinedOrNull } from 'vs/base/common/types';
|
||||
import { ILanguageMagic } from 'sql/workbench/services/notebook/browser/notebookService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { getUriPrefix, uriPrefixes } from 'sql/platform/connection/common/utils';
|
||||
import { firstIndex } from 'vs/base/common/arrays';
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"./sql"
|
||||
],
|
||||
"exclude": [
|
||||
"./typings/es6-promise.d.ts",
|
||||
"./typings/require-monaco.d.ts",
|
||||
"./typings/xterm.d.ts",
|
||||
"./typings/xterm-addon-search.d.ts",
|
||||
|
||||
4
src/typings/lib.ie11_safe_es6.d.ts
vendored
4
src/typings/lib.ie11_safe_es6.d.ts
vendored
@@ -25,7 +25,7 @@ interface Map<K, V> {
|
||||
|
||||
interface MapConstructor {
|
||||
new <K, V>(): Map<K, V>;
|
||||
prototype: Map<any, any>;
|
||||
readonly prototype: Map<any, any>;
|
||||
|
||||
// not supported on IE11:
|
||||
// new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
|
||||
@@ -51,7 +51,7 @@ interface Set<T> {
|
||||
|
||||
interface SetConstructor {
|
||||
new <T>(): Set<T>;
|
||||
prototype: Set<any>;
|
||||
readonly prototype: Set<any>;
|
||||
|
||||
// not supported on IE11:
|
||||
// new <T>(iterable: Iterable<T>): Set<T>;
|
||||
|
||||
14
src/typings/windows-mutex.d.ts
vendored
14
src/typings/windows-mutex.d.ts
vendored
@@ -1,14 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'windows-mutex' {
|
||||
export class Mutex {
|
||||
constructor(name: string);
|
||||
isActive(): boolean;
|
||||
release(): void;
|
||||
}
|
||||
|
||||
export function isActive(name: string): boolean;
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@font-face {
|
||||
font-family: "codicon";
|
||||
src: url("./codicon.ttf?7ed98366b9684aff02478216decd2fe9") format("truetype");
|
||||
src: url("./codicon.ttf?072cd8445a025297c265f9d008123381") format("truetype");
|
||||
}
|
||||
|
||||
.codicon[class*='codicon-'] {
|
||||
@@ -408,4 +408,5 @@
|
||||
.codicon-call-incoming:before { content: "\eb92" }
|
||||
.codicon-call-outgoing:before { content: "\eb93" }
|
||||
.codicon-menu:before { content: "\eb94" }
|
||||
.codicon-expand-all:before { content: "\eb95" }
|
||||
.codicon-debug-alt:before { content: "\f101" }
|
||||
|
||||
Binary file not shown.
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
/** Dialog: Modal Block */
|
||||
.monaco-workbench .dialog-modal-block {
|
||||
.monaco-dialog-modal-block {
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
@@ -15,12 +15,12 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.monaco-workbench .dialog-modal-block.dimmed {
|
||||
.monaco-dialog-modal-block.dimmed {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
/** Dialog: Container */
|
||||
.monaco-workbench .dialog-box {
|
||||
.monaco-dialog-box {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
width: min-content;
|
||||
@@ -32,11 +32,11 @@
|
||||
}
|
||||
|
||||
/** Dialog: Title Actions Row */
|
||||
.monaco-workbench .dialog-box .dialog-toolbar-row {
|
||||
.monaco-dialog-box .dialog-toolbar-row {
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.monaco-workbench .dialog-box .action-label {
|
||||
.monaco-dialog-box .action-label {
|
||||
height: 16px;
|
||||
min-width: 16px;
|
||||
background-size: 16px;
|
||||
@@ -48,14 +48,14 @@
|
||||
|
||||
|
||||
/** Dialog: Message Row */
|
||||
.monaco-workbench .dialog-box .dialog-message-row {
|
||||
.monaco-dialog-box .dialog-message-row {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.monaco-workbench .dialog-box .dialog-message-row > .codicon {
|
||||
.monaco-dialog-box .dialog-message-row > .codicon {
|
||||
flex: 0 0 48px;
|
||||
height: 48px;
|
||||
align-self: baseline;
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
/** Dialog: Message Container */
|
||||
.monaco-workbench .dialog-box .dialog-message-row .dialog-message-container {
|
||||
.monaco-dialog-box .dialog-message-row .dialog-message-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
@@ -77,7 +77,7 @@
|
||||
}
|
||||
|
||||
/** Dialog: Message */
|
||||
.monaco-workbench .dialog-box .dialog-message-row .dialog-message-container .dialog-message {
|
||||
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message {
|
||||
line-height: 22px;
|
||||
font-size: 18px;
|
||||
flex: 1; /* let the message always grow */
|
||||
@@ -90,23 +90,23 @@
|
||||
}
|
||||
|
||||
/** Dialog: Details */
|
||||
.monaco-workbench .dialog-box .dialog-message-row .dialog-message-container .dialog-message-detail {
|
||||
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-detail {
|
||||
line-height: 22px;
|
||||
flex: 1; /* let the message always grow */
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
.monaco-workbench .dialog-box .dialog-message-row .dialog-message-container .dialog-message a:focus {
|
||||
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message a:focus {
|
||||
outline-width: 1px;
|
||||
outline-style: solid;
|
||||
}
|
||||
|
||||
.monaco-workbench .dialog-box .dialog-message-row .dialog-message-container .dialog-checkbox-row {
|
||||
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-checkbox-row {
|
||||
padding: 15px 0px 0px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.monaco-workbench .dialog-box .dialog-message-row .dialog-message-container .dialog-checkbox-row .dialog-checkbox-message {
|
||||
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-checkbox-row .dialog-checkbox-message {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
@@ -114,7 +114,7 @@
|
||||
}
|
||||
|
||||
/** Dialog: Buttons Row */
|
||||
.monaco-workbench .dialog-box > .dialog-buttons-row {
|
||||
.monaco-dialog-box > .dialog-buttons-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
@@ -122,19 +122,19 @@
|
||||
overflow: hidden; /* buttons row should never overflow */
|
||||
}
|
||||
|
||||
.monaco-workbench .dialog-box > .dialog-buttons-row {
|
||||
.monaco-dialog-box > .dialog-buttons-row {
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
padding: 20px 10px 10px;
|
||||
}
|
||||
|
||||
/** Dialog: Buttons */
|
||||
.monaco-workbench .dialog-box > .dialog-buttons-row > .dialog-buttons {
|
||||
.monaco-dialog-box > .dialog-buttons-row > .dialog-buttons {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.monaco-workbench .dialog-box > .dialog-buttons-row > .dialog-buttons > .monaco-button {
|
||||
.monaco-dialog-box > .dialog-buttons-row > .dialog-buttons > .monaco-button {
|
||||
width: fit-content;
|
||||
width: -moz-fit-content;
|
||||
padding: 5px 10px;
|
||||
|
||||
@@ -61,9 +61,9 @@ export class Dialog extends Disposable {
|
||||
|
||||
constructor(private container: HTMLElement, private message: string, buttons: string[], private options: IDialogOptions) {
|
||||
super();
|
||||
this.modal = this.container.appendChild($(`.dialog-modal-block${options.type === 'pending' ? '.dimmed' : ''}`));
|
||||
this.modal = this.container.appendChild($(`.monaco-dialog-modal-block${options.type === 'pending' ? '.dimmed' : ''}`));
|
||||
this.shadowElement = this.modal.appendChild($('.dialog-shadow'));
|
||||
this.element = this.shadowElement.appendChild($('.dialog-box'));
|
||||
this.element = this.shadowElement.appendChild($('.monaco-dialog-box'));
|
||||
hide(this.element);
|
||||
|
||||
// If no button is provided, default to OK
|
||||
|
||||
@@ -129,6 +129,8 @@ export abstract class CachedListVirtualDelegate<T extends object> implements ILi
|
||||
abstract getTemplateId(element: T): string;
|
||||
|
||||
setDynamicHeight(element: T, height: number): void {
|
||||
this.cache.set(element, height);
|
||||
if (height > 0) {
|
||||
this.cache.set(element, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
|
||||
font-size: 16px;
|
||||
font-size: 16px !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@@ -308,8 +308,9 @@ export class MenuBar extends Disposable {
|
||||
}
|
||||
|
||||
createOverflowMenu(): void {
|
||||
const label = this.options.compactMode !== undefined ? nls.localize('mAppMenu', 'Application Menu') : nls.localize('mMore', "...");
|
||||
const buttonElement = $('div.menubar-menu-button', { 'role': 'menuitem', 'tabindex': -1, 'aria-label': label, 'title': label, 'aria-haspopup': true });
|
||||
const label = this.options.compactMode !== undefined ? nls.localize('mAppMenu', 'Application Menu') : nls.localize('mMore', 'More');
|
||||
const title = this.options.compactMode !== undefined ? label : undefined;
|
||||
const buttonElement = $('div.menubar-menu-button', { 'role': 'menuitem', 'tabindex': -1, 'aria-label': label, 'title': title, 'aria-haspopup': true });
|
||||
const titleElement = $('div.menubar-menu-title.toolbar-toggle-more.codicon.codicon-more', { 'role': 'none', 'aria-hidden': true });
|
||||
|
||||
buttonElement.appendChild(titleElement);
|
||||
@@ -910,7 +911,7 @@ export class MenuBar extends Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
const menuHolder = $('div.menubar-menu-items-holder');
|
||||
const menuHolder = $('div.menubar-menu-items-holder', { 'title': '' });
|
||||
|
||||
DOM.addClass(customMenu.buttonElement, 'open');
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export function createCancelablePromise<T>(callback: (token: CancellationToken)
|
||||
});
|
||||
});
|
||||
|
||||
return new class implements CancelablePromise<T> {
|
||||
return <CancelablePromise<T>>new class {
|
||||
cancel() {
|
||||
source.cancel();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { equals } from 'vs/base/common/arrays';
|
||||
import { UriComponents } from 'vs/base/common/uri';
|
||||
import { escapeCodicons, markdownUnescapeCodicons } from 'vs/base/common/codicons';
|
||||
import { escapeCodicons } from 'vs/base/common/codicons';
|
||||
|
||||
export interface IMarkdownString {
|
||||
readonly value: string;
|
||||
@@ -39,10 +39,9 @@ export class MarkdownString implements IMarkdownString {
|
||||
|
||||
appendText(value: string): MarkdownString {
|
||||
// escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
||||
value = value
|
||||
this._value += (this._supportThemeIcons ? escapeCodicons(value) : value)
|
||||
.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&')
|
||||
.replace('\n', '\n\n');
|
||||
this._value += this.supportThemeIcons ? markdownUnescapeCodicons(value) : value;
|
||||
|
||||
return this;
|
||||
}
|
||||
@@ -61,10 +60,6 @@ export class MarkdownString implements IMarkdownString {
|
||||
this._value += '\n```\n';
|
||||
return this;
|
||||
}
|
||||
|
||||
static escapeThemeIcons(value: string): string {
|
||||
return escapeCodicons(value);
|
||||
}
|
||||
}
|
||||
|
||||
export function isEmptyMarkdownString(oneOrMany: IMarkdownString | IMarkdownString[] | null | undefined): boolean {
|
||||
|
||||
@@ -526,6 +526,14 @@ export class LinkedMap<K, V> {
|
||||
return this._size;
|
||||
}
|
||||
|
||||
get first(): V | undefined {
|
||||
return this._head?.value;
|
||||
}
|
||||
|
||||
get last(): V | undefined {
|
||||
return this._tail?.value;
|
||||
}
|
||||
|
||||
has(key: K): boolean {
|
||||
return this._map.has(key);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import { CharCode } from 'vs/base/common/charCode';
|
||||
* - forEach() over the result to get the lines
|
||||
*/
|
||||
export class LineDecoder {
|
||||
private stringDecoder: sd.NodeStringDecoder;
|
||||
private stringDecoder: sd.StringDecoder;
|
||||
private remaining: string | null;
|
||||
|
||||
constructor(encoding: string = 'utf8') {
|
||||
|
||||
@@ -54,34 +54,26 @@ suite('MarkdownRenderer', () => {
|
||||
|
||||
test('render appendText', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: true });
|
||||
mds.appendText('$(zap) $(dont match me)');
|
||||
mds.appendText('$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
let result: HTMLElement = renderMarkdown(mds);
|
||||
assert.strictEqual(result.innerHTML, `<p><span class="codicon codicon-zap"></span> $(dont match me)</p>`);
|
||||
});
|
||||
|
||||
test('render appendText escaped', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: true });
|
||||
mds.appendText(MarkdownString.escapeThemeIcons('$(zap) $(dont match me)'));
|
||||
|
||||
let result: HTMLElement = renderMarkdown(mds);
|
||||
assert.strictEqual(result.innerHTML, `<p>$(zap) $(dont match me)</p>`);
|
||||
assert.strictEqual(result.innerHTML, `<p>$(zap) $(not a theme icon) $(add)</p>`);
|
||||
});
|
||||
|
||||
test('render appendMarkdown', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: true });
|
||||
mds.appendMarkdown('$(zap) $(dont match me)');
|
||||
mds.appendMarkdown('$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
let result: HTMLElement = renderMarkdown(mds);
|
||||
assert.strictEqual(result.innerHTML, `<p><span class="codicon codicon-zap"></span> $(dont match me)</p>`);
|
||||
assert.strictEqual(result.innerHTML, `<p><span class="codicon codicon-zap"></span> $(not a theme icon) <span class="codicon codicon-add"></span></p>`);
|
||||
});
|
||||
|
||||
test('render appendMarkdown escaped', () => {
|
||||
test('render appendMarkdown with escaped icon', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: true });
|
||||
mds.appendMarkdown(MarkdownString.escapeThemeIcons('$(zap) $(dont match me)'));
|
||||
mds.appendMarkdown('\\$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
let result: HTMLElement = renderMarkdown(mds);
|
||||
assert.strictEqual(result.innerHTML, `<p>$(zap) $(dont match me)</p>`);
|
||||
assert.strictEqual(result.innerHTML, `<p>$(zap) $(not a theme icon) <span class="codicon codicon-add"></span></p>`);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -90,18 +82,18 @@ suite('MarkdownRenderer', () => {
|
||||
|
||||
test('render appendText', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: false });
|
||||
mds.appendText('$(zap) $(dont match me)');
|
||||
mds.appendText('$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
let result: HTMLElement = renderMarkdown(mds);
|
||||
assert.strictEqual(result.innerHTML, `<p>$(zap) $(dont match me)</p>`);
|
||||
assert.strictEqual(result.innerHTML, `<p>$(zap) $(not a theme icon) $(add)</p>`);
|
||||
});
|
||||
|
||||
test('render appendMarkdown', () => {
|
||||
test('render appendMarkdown with escaped icon', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: false });
|
||||
mds.appendMarkdown('$(zap) $(dont match me)');
|
||||
mds.appendMarkdown('\\$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
let result: HTMLElement = renderMarkdown(mds);
|
||||
assert.strictEqual(result.innerHTML, `<p>$(zap) $(dont match me)</p>`);
|
||||
assert.strictEqual(result.innerHTML, `<p>$(zap) $(not a theme icon) $(add)</p>`);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -16,6 +16,8 @@ suite('Map', () => {
|
||||
map.set('bk', 'bv');
|
||||
assert.deepStrictEqual(map.keys(), ['ak', 'bk']);
|
||||
assert.deepStrictEqual(map.values(), ['av', 'bv']);
|
||||
assert.equal(map.first, 'av');
|
||||
assert.equal(map.last, 'bv');
|
||||
});
|
||||
|
||||
test('LinkedMap - Touch Old one', () => {
|
||||
|
||||
@@ -8,10 +8,9 @@ import { MarkdownString } from 'vs/base/common/htmlContent';
|
||||
|
||||
suite('MarkdownString', () => {
|
||||
|
||||
test('escape', () => {
|
||||
test('appendText', () => {
|
||||
|
||||
const mds = new MarkdownString();
|
||||
|
||||
mds.appendText('# foo\n*bar*');
|
||||
|
||||
assert.equal(mds.value, '\\# foo\n\n\\*bar\\*');
|
||||
@@ -19,59 +18,54 @@ suite('MarkdownString', () => {
|
||||
|
||||
suite('ThemeIcons', () => {
|
||||
|
||||
test('escapeThemeIcons', () => {
|
||||
assert.equal(
|
||||
MarkdownString.escapeThemeIcons('$(zap) $(not an icon) foo$(bar)'),
|
||||
'\\$(zap) $(not an icon) foo\\$(bar)'
|
||||
);
|
||||
});
|
||||
|
||||
suite('Support On', () => {
|
||||
|
||||
test('appendText', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: true });
|
||||
mds.appendText('$(zap)');
|
||||
mds.appendText('$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
assert.equal(mds.value, '$(zap)');
|
||||
});
|
||||
|
||||
test('appendText escaped', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: true });
|
||||
mds.appendText(MarkdownString.escapeThemeIcons('$(zap)'));
|
||||
|
||||
assert.equal(mds.value, '\\\\$\\(zap\\)');
|
||||
assert.equal(mds.value, '\\\\$\\(zap\\) $\\(not a theme icon\\) \\\\$\\(add\\)');
|
||||
});
|
||||
|
||||
test('appendMarkdown', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: true });
|
||||
mds.appendMarkdown('$(zap)');
|
||||
mds.appendMarkdown('$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
assert.equal(mds.value, '$(zap)');
|
||||
assert.equal(mds.value, '$(zap) $(not a theme icon) $(add)');
|
||||
});
|
||||
|
||||
test('appendMarkdown escaped', () => {
|
||||
test('appendMarkdown with escaped icon', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: true });
|
||||
mds.appendMarkdown(MarkdownString.escapeThemeIcons('$(zap)'));
|
||||
mds.appendMarkdown('\\$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
assert.equal(mds.value, '\\$(zap)');
|
||||
assert.equal(mds.value, '\\$(zap) $(not a theme icon) $(add)');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('Support Off', () => {
|
||||
|
||||
test('appendText', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: false });
|
||||
mds.appendText('$(zap)');
|
||||
mds.appendText('$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
assert.equal(mds.value, '$\\(zap\\)');
|
||||
assert.equal(mds.value, '$\\(zap\\) $\\(not a theme icon\\) $\\(add\\)');
|
||||
});
|
||||
|
||||
test('appendMarkdown', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: false });
|
||||
mds.appendMarkdown('$(zap)');
|
||||
mds.appendMarkdown('$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
assert.equal(mds.value, '$(zap)');
|
||||
assert.equal(mds.value, '$(zap) $(not a theme icon) $(add)');
|
||||
});
|
||||
|
||||
test('appendMarkdown with escaped icon', () => {
|
||||
const mds = new MarkdownString(undefined, { supportThemeIcons: true });
|
||||
mds.appendMarkdown('\\$(zap) $(not a theme icon) $(add)');
|
||||
|
||||
assert.equal(mds.value, '\\$(zap) $(not a theme icon) $(add)');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -15,7 +15,6 @@ import { getPathFromAmdModule } from 'vs/base/common/amd';
|
||||
import { isWindows, isLinux } from 'vs/base/common/platform';
|
||||
import { canNormalize } from 'vs/base/common/normalization';
|
||||
import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import { join } from 'path';
|
||||
|
||||
const chunkSize = 64 * 1024;
|
||||
const readError = 'Error while reading';
|
||||
@@ -379,12 +378,12 @@ suite('PFS', function () {
|
||||
if (canNormalize && typeof process.versions['electron'] !== 'undefined' /* needs electron */) {
|
||||
const id = uuid.generateUuid();
|
||||
const parentDir = path.join(os.tmpdir(), 'vsctests', id);
|
||||
const testDir = join(parentDir, 'pfs', id);
|
||||
const testDir = path.join(parentDir, 'pfs', id);
|
||||
|
||||
const newDir = path.join(testDir, 'öäü');
|
||||
await pfs.mkdirp(newDir, 493);
|
||||
|
||||
await pfs.writeFile(join(testDir, 'somefile.txt'), 'contents');
|
||||
await pfs.writeFile(path.join(testDir, 'somefile.txt'), 'contents');
|
||||
|
||||
assert.ok(fs.existsSync(newDir));
|
||||
|
||||
|
||||
@@ -130,11 +130,6 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
show: !isFullscreenOrMaximized,
|
||||
title: product.nameLong,
|
||||
webPreferences: {
|
||||
// By default if Code is in the background, intervals and timeouts get throttled, so we
|
||||
// want to enforce that Code stays in the foreground. This triggers a disable_hidden_
|
||||
// flag that Electron provides via patch:
|
||||
// https://github.com/electron/libchromiumcontent/blob/master/patches/common/chromium/disable_hidden.patch
|
||||
backgroundThrottling: false,
|
||||
nodeIntegration: true,
|
||||
nodeIntegrationInWorker: RUN_TEXTMATE_IN_WORKER,
|
||||
webviewTag: true
|
||||
@@ -778,6 +773,8 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
}
|
||||
|
||||
private validateWindowState(state: IWindowState, displays: Display[]): IWindowState | undefined {
|
||||
this.logService.trace(`window#validateWindowState: validating window state on ${displays.length} display(s)`, state);
|
||||
|
||||
if (typeof state.x !== 'number'
|
||||
|| typeof state.y !== 'number'
|
||||
|| typeof state.width !== 'number'
|
||||
@@ -793,34 +790,62 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
}
|
||||
|
||||
// Single Monitor: be strict about x/y positioning
|
||||
// macOS & Linux: these OS seem to be pretty good in ensuring that a window is never outside of it's bounds.
|
||||
// Windows: it is possible to have a window with a size that makes it fall out of the window. our strategy
|
||||
// is to try as much as possible to keep the window in the monitor bounds. we are not as strict as
|
||||
// macOS and Linux and allow the window to exceed the monitor bounds as long as the window is still
|
||||
// some pixels (128) visible on the screen for the user to drag it back.
|
||||
if (displays.length === 1) {
|
||||
const displayWorkingArea = this.getWorkingArea(displays[0]);
|
||||
if (displayWorkingArea) {
|
||||
this.logService.trace('window#validateWindowState: 1 display', displayWorkingArea);
|
||||
this.logService.trace('window#validateWindowState: 1 monitor working area', displayWorkingArea);
|
||||
|
||||
if (state.x < displayWorkingArea.x) {
|
||||
state.x = displayWorkingArea.x; // prevent window from falling out of the screen to the left
|
||||
function ensureStateInDisplayWorkingArea(): void {
|
||||
if (!state || typeof state.x !== 'number' || typeof state.y !== 'number' || !displayWorkingArea) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (state.x < displayWorkingArea.x) {
|
||||
// prevent window from falling out of the screen to the left
|
||||
state.x = displayWorkingArea.x;
|
||||
}
|
||||
|
||||
if (state.y < displayWorkingArea.y) {
|
||||
// prevent window from falling out of the screen to the top
|
||||
state.y = displayWorkingArea.y;
|
||||
}
|
||||
}
|
||||
|
||||
if (state.y < displayWorkingArea.y) {
|
||||
state.y = displayWorkingArea.y; // prevent window from falling out of the screen to the top
|
||||
}
|
||||
|
||||
if (state.x > (displayWorkingArea.x + displayWorkingArea.width)) {
|
||||
state.x = displayWorkingArea.x; // prevent window from falling out of the screen to the right
|
||||
}
|
||||
|
||||
if (state.y > (displayWorkingArea.y + displayWorkingArea.height)) {
|
||||
state.y = displayWorkingArea.y; // prevent window from falling out of the screen to the bottom
|
||||
}
|
||||
// ensure state is not outside display working area (top, left)
|
||||
ensureStateInDisplayWorkingArea();
|
||||
|
||||
if (state.width > displayWorkingArea.width) {
|
||||
state.width = displayWorkingArea.width; // prevent window from exceeding display bounds width
|
||||
// prevent window from exceeding display bounds width
|
||||
state.width = displayWorkingArea.width;
|
||||
}
|
||||
|
||||
if (state.height > displayWorkingArea.height) {
|
||||
state.height = displayWorkingArea.height; // prevent window from exceeding display bounds height
|
||||
// prevent window from exceeding display bounds height
|
||||
state.height = displayWorkingArea.height;
|
||||
}
|
||||
|
||||
if (state.x > (displayWorkingArea.x + displayWorkingArea.width - 128)) {
|
||||
// prevent window from falling out of the screen to the right with
|
||||
// 128px margin by positioning the window to the far right edge of
|
||||
// the screen
|
||||
state.x = displayWorkingArea.x + displayWorkingArea.width - state.width;
|
||||
}
|
||||
|
||||
if (state.y > (displayWorkingArea.y + displayWorkingArea.height - 128)) {
|
||||
// prevent window from falling out of the screen to the bottom with
|
||||
// 128px margin by positioning the window to the far bottom edge of
|
||||
// the screen
|
||||
state.y = displayWorkingArea.y + displayWorkingArea.height - state.height;
|
||||
}
|
||||
|
||||
// again ensure state is not outside display working area
|
||||
// (it may have changed from the previous validation step)
|
||||
ensureStateInDisplayWorkingArea();
|
||||
}
|
||||
|
||||
return state;
|
||||
@@ -840,19 +865,18 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
}
|
||||
}
|
||||
|
||||
// Multi Monitor (non-fullscreen): be less strict because metrics can be crazy
|
||||
const bounds = { x: state.x, y: state.y, width: state.width, height: state.height };
|
||||
const display = screen.getDisplayMatching(bounds);
|
||||
// Multi Monitor (non-fullscreen): ensure window is within display bounds
|
||||
const display = screen.getDisplayMatching({ x: state.x, y: state.y, width: state.width, height: state.height });
|
||||
const displayWorkingArea = this.getWorkingArea(display);
|
||||
if (
|
||||
display && // we have a display matching the desired bounds
|
||||
displayWorkingArea && // we have valid working area bounds
|
||||
bounds.x < displayWorkingArea.x + displayWorkingArea.width && // prevent window from falling out of the screen to the right
|
||||
bounds.y < displayWorkingArea.y + displayWorkingArea.height && // prevent window from falling out of the screen to the bottom
|
||||
bounds.x + bounds.width > displayWorkingArea.x && // prevent window from falling out of the screen to the left
|
||||
bounds.y + bounds.height > displayWorkingArea.y // prevent window from falling out of the scree nto the top
|
||||
state.x + state.width > displayWorkingArea.x && // prevent window from falling out of the screen to the left
|
||||
state.y + state.height > displayWorkingArea.y && // prevent window from falling out of the screen to the top
|
||||
state.x < displayWorkingArea.x + displayWorkingArea.width && // prevent window from falling out of the screen to the right
|
||||
state.y < displayWorkingArea.y + displayWorkingArea.height // prevent window from falling out of the screen to the bottom
|
||||
) {
|
||||
this.logService.trace('window#validateWindowState: multi display', displayWorkingArea);
|
||||
this.logService.trace('window#validateWindowState: multi-monitor working area', displayWorkingArea);
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -673,6 +673,13 @@ export class MouseTargetFactory {
|
||||
const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);
|
||||
return request.fulfill(MouseTargetType.CONTENT_EMPTY, new Position(lineNumber, 1), undefined, detail);
|
||||
}
|
||||
|
||||
const lineWidth = ctx.getLineWidth(lineNumber);
|
||||
if (request.mouseContentHorizontalOffset >= lineWidth) {
|
||||
const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);
|
||||
const pos = new Position(lineNumber, ctx.model.getLineMaxColumn(lineNumber));
|
||||
return request.fulfill(MouseTargetType.CONTENT_EMPTY, pos, undefined, detail);
|
||||
}
|
||||
}
|
||||
|
||||
// We have already executed hit test...
|
||||
|
||||
@@ -422,7 +422,6 @@ export interface ICodeEditor extends editorCommon.IEditor {
|
||||
/**
|
||||
* An event emitted when users paste text in the editor.
|
||||
* @event
|
||||
* @internal
|
||||
*/
|
||||
onDidPaste(listener: (range: Range) => void): IDisposable;
|
||||
/**
|
||||
|
||||
@@ -460,7 +460,11 @@ export class View extends ViewEventHandler {
|
||||
}
|
||||
|
||||
public getTargetAtClientPoint(clientX: number, clientY: number): IMouseTarget | null {
|
||||
return this.pointerHandler.getTargetAtClientPoint(clientX, clientY);
|
||||
const mouseTarget = this.pointerHandler.getTargetAtClientPoint(clientX, clientY);
|
||||
if (!mouseTarget) {
|
||||
return null;
|
||||
}
|
||||
return ViewOutgoingEvents.convertViewToModelMouseTarget(mouseTarget, this._context.model.coordinatesConverter);
|
||||
}
|
||||
|
||||
public createOverviewRuler(cssClassName: string): OverviewRuler {
|
||||
|
||||
@@ -11,7 +11,7 @@ import { Position } from 'vs/editor/common/core/position';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { IScrollEvent } from 'vs/editor/common/editorCommon';
|
||||
import * as viewEvents from 'vs/editor/common/view/viewEvents';
|
||||
import { IViewModel } from 'vs/editor/common/viewModel/viewModel';
|
||||
import { IViewModel, ICoordinatesConverter } from 'vs/editor/common/viewModel/viewModel';
|
||||
import { IMouseWheelEvent } from 'vs/base/browser/mouseEvent';
|
||||
|
||||
export interface EventCallback<T> {
|
||||
@@ -132,23 +132,19 @@ export class ViewOutgoingEvents extends Disposable {
|
||||
}
|
||||
|
||||
private _convertViewToModelMouseTarget(target: IMouseTarget): IMouseTarget {
|
||||
return ViewOutgoingEvents.convertViewToModelMouseTarget(target, this._viewModel.coordinatesConverter);
|
||||
}
|
||||
|
||||
public static convertViewToModelMouseTarget(target: IMouseTarget, coordinatesConverter: ICoordinatesConverter): IMouseTarget {
|
||||
return new ExternalMouseTarget(
|
||||
target.element,
|
||||
target.type,
|
||||
target.mouseColumn,
|
||||
target.position ? this._convertViewToModelPosition(target.position) : null,
|
||||
target.range ? this._convertViewToModelRange(target.range) : null,
|
||||
target.position ? coordinatesConverter.convertViewPositionToModelPosition(target.position) : null,
|
||||
target.range ? coordinatesConverter.convertViewRangeToModelRange(target.range) : null,
|
||||
target.detail
|
||||
);
|
||||
}
|
||||
|
||||
private _convertViewToModelPosition(viewPosition: Position): Position {
|
||||
return this._viewModel.coordinatesConverter.convertViewPositionToModelPosition(viewPosition);
|
||||
}
|
||||
|
||||
private _convertViewToModelRange(viewRange: Range): Range {
|
||||
return this._viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange);
|
||||
}
|
||||
}
|
||||
|
||||
class ExternalMouseTarget implements IMouseTarget {
|
||||
|
||||
@@ -53,8 +53,6 @@ import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
|
||||
let EDITOR_ID = 0;
|
||||
|
||||
const SHOW_UNUSED_ENABLED_CLASS = 'showUnused';
|
||||
|
||||
export interface ICodeEditorWidgetOptions {
|
||||
/**
|
||||
* Is this a simple widget (not a real code editor) ?
|
||||
@@ -263,11 +261,6 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
const layoutInfo = options.get(EditorOption.layoutInfo);
|
||||
this._onDidLayoutChange.fire(layoutInfo);
|
||||
}
|
||||
if (options.get(EditorOption.showUnused)) {
|
||||
this._domElement.classList.add(SHOW_UNUSED_ENABLED_CLASS);
|
||||
} else {
|
||||
this._domElement.classList.remove(SHOW_UNUSED_ENABLED_CLASS);
|
||||
}
|
||||
}));
|
||||
|
||||
this._contextKeyService = this._register(contextKeyService.createScoped(this._domElement));
|
||||
@@ -1871,12 +1864,12 @@ registerThemingParticipant((theme, collector) => {
|
||||
|
||||
const unnecessaryForeground = theme.getColor(editorUnnecessaryCodeOpacity);
|
||||
if (unnecessaryForeground) {
|
||||
collector.addRule(`.${SHOW_UNUSED_ENABLED_CLASS} .monaco-editor .${ClassName.EditorUnnecessaryInlineDecoration} { opacity: ${unnecessaryForeground.rgba.a}; }`);
|
||||
collector.addRule(`.monaco-editor.showUnused .${ClassName.EditorUnnecessaryInlineDecoration} { opacity: ${unnecessaryForeground.rgba.a}; }`);
|
||||
}
|
||||
|
||||
const unnecessaryBorder = theme.getColor(editorUnnecessaryCodeBorder);
|
||||
if (unnecessaryBorder) {
|
||||
collector.addRule(`.${SHOW_UNUSED_ENABLED_CLASS} .monaco-editor .${ClassName.EditorUnnecessaryDecoration} { border-bottom: 2px dashed ${unnecessaryBorder}; }`);
|
||||
collector.addRule(`.monaco-editor.showUnused .${ClassName.EditorUnnecessaryDecoration} { border-bottom: 2px dashed ${unnecessaryBorder}; }`);
|
||||
}
|
||||
|
||||
const deprecatedForeground = theme.getColor(editorForeground) || 'inherit';
|
||||
|
||||
@@ -432,8 +432,7 @@ export const editorConfigurationBaseNode = Object.freeze<IConfigurationNode>({
|
||||
order: 5,
|
||||
type: 'object',
|
||||
title: nls.localize('editorConfigurationTitle', "Editor"),
|
||||
overridable: true,
|
||||
scope: ConfigurationScope.RESOURCE,
|
||||
scope: ConfigurationScope.RESOURCE_LANGUAGE,
|
||||
});
|
||||
|
||||
const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);
|
||||
|
||||
@@ -1118,6 +1118,9 @@ class EditorClassName extends ComputedEditorOption<EditorOption.editorClassName,
|
||||
} else if (options.get(EditorOption.mouseStyle) === 'copy') {
|
||||
className += ' mouse-copy';
|
||||
}
|
||||
if (options.get(EditorOption.showUnused)) {
|
||||
className += ' showUnused';
|
||||
}
|
||||
return className;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ export interface CompletionItem {
|
||||
preselect?: boolean;
|
||||
/**
|
||||
* A string or snippet that should be inserted in a document when selecting
|
||||
* this completion.
|
||||
* this completion. When `falsy` the [label](#CompletionItem.label)
|
||||
* is used.
|
||||
*/
|
||||
insertText: string;
|
||||
|
||||
@@ -17,7 +17,7 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo
|
||||
import { EditorSimpleWorker } from 'vs/editor/common/services/editorSimpleWorker';
|
||||
import { IDiffComputationResult, IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { regExpFlags } from 'vs/base/common/strings';
|
||||
import { isNonEmptyArray } from 'vs/base/common/arrays';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
@@ -52,7 +52,7 @@ export class EditorWorkerServiceImpl extends Disposable implements IEditorWorker
|
||||
private readonly _logService: ILogService;
|
||||
constructor(
|
||||
@IModelService modelService: IModelService,
|
||||
@IResourceConfigurationService configurationService: IResourceConfigurationService,
|
||||
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
|
||||
@ILogService logService: ILogService
|
||||
) {
|
||||
super();
|
||||
@@ -129,14 +129,14 @@ export class EditorWorkerServiceImpl extends Disposable implements IEditorWorker
|
||||
class WordBasedCompletionItemProvider implements modes.CompletionItemProvider {
|
||||
|
||||
private readonly _workerManager: WorkerManager;
|
||||
private readonly _configurationService: IResourceConfigurationService;
|
||||
private readonly _configurationService: ITextResourceConfigurationService;
|
||||
private readonly _modelService: IModelService;
|
||||
|
||||
readonly _debugDisplayName = 'wordbasedCompletions';
|
||||
|
||||
constructor(
|
||||
workerManager: WorkerManager,
|
||||
configurationService: IResourceConfigurationService,
|
||||
configurationService: ITextResourceConfigurationService,
|
||||
modelService: IModelService
|
||||
) {
|
||||
this._workerManager = workerManager;
|
||||
@@ -236,7 +236,7 @@ class WorkerManager extends Disposable {
|
||||
public withWorker(): Promise<EditorWorkerClient> {
|
||||
this._lastWorkerUsedTime = (new Date()).getTime();
|
||||
if (!this._editorWorkerClient) {
|
||||
this._editorWorkerClient = new EditorWorkerClient(this._modelService, 'editorWorkerService');
|
||||
this._editorWorkerClient = new EditorWorkerClient(this._modelService, false, 'editorWorkerService');
|
||||
}
|
||||
return Promise.resolve(this._editorWorkerClient);
|
||||
}
|
||||
@@ -374,13 +374,15 @@ export class EditorWorkerHost {
|
||||
export class EditorWorkerClient extends Disposable {
|
||||
|
||||
private readonly _modelService: IModelService;
|
||||
private readonly _keepIdleModels: boolean;
|
||||
private _worker: IWorkerClient<EditorSimpleWorker> | null;
|
||||
private readonly _workerFactory: DefaultWorkerFactory;
|
||||
private _modelManager: EditorModelManager | null;
|
||||
|
||||
constructor(modelService: IModelService, label: string | undefined) {
|
||||
constructor(modelService: IModelService, keepIdleModels: boolean, label: string | undefined) {
|
||||
super();
|
||||
this._modelService = modelService;
|
||||
this._keepIdleModels = keepIdleModels;
|
||||
this._workerFactory = new DefaultWorkerFactory(label);
|
||||
this._worker = null;
|
||||
this._modelManager = null;
|
||||
@@ -417,7 +419,7 @@ export class EditorWorkerClient extends Disposable {
|
||||
|
||||
private _getOrCreateModelManager(proxy: EditorSimpleWorker): EditorModelManager {
|
||||
if (!this._modelManager) {
|
||||
this._modelManager = this._register(new EditorModelManager(proxy, this._modelService, false));
|
||||
this._modelManager = this._register(new EditorModelManager(proxy, this._modelService, this._keepIdleModels));
|
||||
}
|
||||
return this._modelManager;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import { LanguageIdentifier, SemanticTokensProviderRegistry, SemanticTokensProvi
|
||||
import { PLAINTEXT_LANGUAGE_IDENTIFIER } from 'vs/editor/common/modes/modesRegistry';
|
||||
import { ILanguageSelection } from 'vs/editor/common/services/modeService';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { CancellationTokenSource } from 'vs/base/common/cancellation';
|
||||
|
||||
@@ -9,9 +9,9 @@ import { IPosition } from 'vs/editor/common/core/position';
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export const IResourceConfigurationService = createDecorator<IResourceConfigurationService>('resourceConfigurationService');
|
||||
export const ITextResourceConfigurationService = createDecorator<ITextResourceConfigurationService>('textResourceConfigurationService');
|
||||
|
||||
export interface IResourceConfigurationChangeEvent {
|
||||
export interface ITextResourceConfigurationChangeEvent {
|
||||
|
||||
/**
|
||||
* All affected keys. Also includes language overrides and keys changed under language overrides.
|
||||
@@ -29,14 +29,14 @@ export interface IResourceConfigurationChangeEvent {
|
||||
affectsConfiguration(resource: URI, section: string): boolean;
|
||||
}
|
||||
|
||||
export interface IResourceConfigurationService {
|
||||
export interface ITextResourceConfigurationService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Event that fires when the configuration changes.
|
||||
*/
|
||||
onDidChangeConfiguration: Event<IResourceConfigurationChangeEvent>;
|
||||
onDidChangeConfiguration: Event<ITextResourceConfigurationChangeEvent>;
|
||||
|
||||
/**
|
||||
* Fetches the value of the section for the given resource by applying language overrides.
|
||||
@@ -9,15 +9,15 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { IPosition, Position } from 'vs/editor/common/core/position';
|
||||
import { IModeService } from 'vs/editor/common/services/modeService';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { IResourceConfigurationService, IResourceConfigurationChangeEvent } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourceConfigurationService, ITextResourceConfigurationChangeEvent } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IConfigurationService, ConfigurationTarget, IConfigurationValue, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
export class TextResourceConfigurationService extends Disposable implements IResourceConfigurationService {
|
||||
export class TextResourceConfigurationService extends Disposable implements ITextResourceConfigurationService {
|
||||
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private readonly _onDidChangeConfiguration: Emitter<IResourceConfigurationChangeEvent> = this._register(new Emitter<IResourceConfigurationChangeEvent>());
|
||||
public readonly onDidChangeConfiguration: Event<IResourceConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
|
||||
private readonly _onDidChangeConfiguration: Emitter<ITextResourceConfigurationChangeEvent> = this._register(new Emitter<ITextResourceConfigurationChangeEvent>());
|
||||
public readonly onDidChangeConfiguration: Event<ITextResourceConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
|
||||
|
||||
constructor(
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@@ -45,15 +45,15 @@ export class TextResourceConfigurationService extends Disposable implements IRes
|
||||
}
|
||||
switch (configurationTarget) {
|
||||
case ConfigurationTarget.MEMORY:
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.memoryTarget?.override, resource, language);
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.memory?.override, resource, language);
|
||||
case ConfigurationTarget.WORKSPACE_FOLDER:
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.workspaceFolderTarget?.override, resource, language);
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.workspaceFolder?.override, resource, language);
|
||||
case ConfigurationTarget.WORKSPACE:
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.workspaceTarget?.override, resource, language);
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.workspace?.override, resource, language);
|
||||
case ConfigurationTarget.USER_REMOTE:
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.userRemoteTarget?.override, resource, language);
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.userRemote?.override, resource, language);
|
||||
default:
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.userLocalTarget?.override, resource, language);
|
||||
return this._updateValue(key, value, configurationTarget, configurationValue.userLocal?.override, resource, language);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,32 +67,32 @@ export class TextResourceConfigurationService extends Disposable implements IRes
|
||||
|
||||
private deriveConfigurationTarget(configurationValue: IConfigurationValue<any>, language: string | null): ConfigurationTarget {
|
||||
if (language) {
|
||||
if (configurationValue.memoryTarget?.override !== undefined) {
|
||||
if (configurationValue.memory?.override !== undefined) {
|
||||
return ConfigurationTarget.MEMORY;
|
||||
}
|
||||
if (configurationValue.workspaceFolderTarget?.override !== undefined) {
|
||||
if (configurationValue.workspaceFolder?.override !== undefined) {
|
||||
return ConfigurationTarget.WORKSPACE_FOLDER;
|
||||
}
|
||||
if (configurationValue.workspaceTarget?.override !== undefined) {
|
||||
if (configurationValue.workspace?.override !== undefined) {
|
||||
return ConfigurationTarget.WORKSPACE;
|
||||
}
|
||||
if (configurationValue.userRemoteTarget?.override !== undefined) {
|
||||
if (configurationValue.userRemote?.override !== undefined) {
|
||||
return ConfigurationTarget.USER_REMOTE;
|
||||
}
|
||||
if (configurationValue.userLocalTarget?.override !== undefined) {
|
||||
if (configurationValue.userLocal?.override !== undefined) {
|
||||
return ConfigurationTarget.USER_LOCAL;
|
||||
}
|
||||
}
|
||||
if (configurationValue.memoryTarget?.value !== undefined) {
|
||||
if (configurationValue.memory?.value !== undefined) {
|
||||
return ConfigurationTarget.MEMORY;
|
||||
}
|
||||
if (configurationValue.workspaceFolderTarget?.value !== undefined) {
|
||||
if (configurationValue.workspaceFolder?.value !== undefined) {
|
||||
return ConfigurationTarget.WORKSPACE_FOLDER;
|
||||
}
|
||||
if (configurationValue.workspaceTarget?.value !== undefined) {
|
||||
if (configurationValue.workspace?.value !== undefined) {
|
||||
return ConfigurationTarget.WORKSPACE;
|
||||
}
|
||||
if (configurationValue.userRemoteTarget?.value !== undefined) {
|
||||
if (configurationValue.userRemote?.value !== undefined) {
|
||||
return ConfigurationTarget.USER_REMOTE;
|
||||
}
|
||||
return ConfigurationTarget.USER_LOCAL;
|
||||
@@ -114,7 +114,7 @@ export class TextResourceConfigurationService extends Disposable implements IRes
|
||||
return this.modeService.getModeIdByFilepathOrFirstLine(resource);
|
||||
}
|
||||
|
||||
private toResourceConfigurationChangeEvent(configurationChangeEvent: IConfigurationChangeEvent): IResourceConfigurationChangeEvent {
|
||||
private toResourceConfigurationChangeEvent(configurationChangeEvent: IConfigurationChangeEvent): ITextResourceConfigurationChangeEvent {
|
||||
return {
|
||||
affectedKeys: configurationChangeEvent.affectedKeys,
|
||||
affectsConfiguration: (resource: URI, configuration: string) => {
|
||||
@@ -53,6 +53,11 @@ export interface IWebWorkerOptions {
|
||||
* An object that can be used by the web worker to make calls back to the main thread.
|
||||
*/
|
||||
host?: any;
|
||||
/**
|
||||
* Keep idle models.
|
||||
* Defaults to false, which means that idle models will stop syncing after a while.
|
||||
*/
|
||||
keepIdleModels?: boolean;
|
||||
}
|
||||
|
||||
class MonacoWebWorkerImpl<T> extends EditorWorkerClient implements MonacoWebWorker<T> {
|
||||
@@ -63,7 +68,7 @@ class MonacoWebWorkerImpl<T> extends EditorWorkerClient implements MonacoWebWork
|
||||
private _foreignProxy: Promise<T> | null;
|
||||
|
||||
constructor(modelService: IModelService, opts: IWebWorkerOptions) {
|
||||
super(modelService, opts.label);
|
||||
super(modelService, opts.keepIdleModels || false, opts.label);
|
||||
this._foreignModuleId = opts.moduleId;
|
||||
this._foreignModuleCreateData = opts.createData || null;
|
||||
this._foreignModuleHost = opts.host || null;
|
||||
|
||||
@@ -225,8 +225,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
const editorLightBulbForegroundColor = theme.getColor(editorLightBulbForeground);
|
||||
if (editorLightBulbForegroundColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .contentWidgets .codicon-lightbulb,
|
||||
.monaco-workbench .markers-panel-container .codicon-lightbulb {
|
||||
.monaco-editor .contentWidgets .codicon-lightbulb {
|
||||
color: ${editorLightBulbForegroundColor};
|
||||
}`);
|
||||
}
|
||||
@@ -235,8 +234,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
const editorLightBulbAutoFixForegroundColor = theme.getColor(editorLightBulbAutoFixForeground);
|
||||
if (editorLightBulbAutoFixForegroundColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .contentWidgets .codicon-lightbulb-autofix,
|
||||
.monaco-workbench .markers-panel-container .codicon-lightbulb-autofix {
|
||||
.monaco-editor .contentWidgets .codicon-lightbulb-autofix {
|
||||
color: ${editorLightBulbAutoFixForegroundColor};
|
||||
}`);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,16 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.monaco-editor .codelens-decoration .codicon {
|
||||
line-height: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.monaco-editor .codelens-decoration > a:hover .codicon::before {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
0% { opacity: 0; visibility: visible;}
|
||||
100% { opacity: 1; }
|
||||
|
||||
@@ -342,9 +342,11 @@ registerThemingParticipant((theme, collector) => {
|
||||
const codeLensForeground = theme.getColor(editorCodeLensForeground);
|
||||
if (codeLensForeground) {
|
||||
collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`);
|
||||
collector.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${codeLensForeground}; }`);
|
||||
}
|
||||
const activeLinkForeground = theme.getColor(editorActiveLinkForeground);
|
||||
if (activeLinkForeground) {
|
||||
collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`);
|
||||
collector.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${activeLinkForeground} !important; }`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -3,22 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.monaco-workbench .monaco-icon-label.deprecated {
|
||||
.monaco-icon-label.deprecated {
|
||||
text-decoration: line-through;
|
||||
opacity: 0.66;
|
||||
}
|
||||
|
||||
.monaco-workbench .symbol-icon.inline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.monaco-workbench .symbol-icon.block {
|
||||
display: inline-block;
|
||||
height: 14px;
|
||||
width: 16px;
|
||||
min-height: 14px;
|
||||
min-width: 16px;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import { MarkerSeverity } from 'vs/platform/markers/common/markers';
|
||||
import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { registerColor, listErrorForeground, listWarningForeground, foreground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { IdleValue } from 'vs/base/common/async';
|
||||
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
export type OutlineItem = OutlineGroup | OutlineElement;
|
||||
@@ -282,7 +282,7 @@ export class OutlineFilter implements ITreeFilter<OutlineItem> {
|
||||
|
||||
constructor(
|
||||
private readonly _prefix: string,
|
||||
@IResourceConfigurationService private readonly _textResourceConfigService: IResourceConfigurationService,
|
||||
@ITextResourceConfigurationService private readonly _textResourceConfigService: ITextResourceConfigurationService,
|
||||
) { }
|
||||
|
||||
filter(element: OutlineItem): boolean {
|
||||
@@ -540,300 +540,168 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
|
||||
const symbolIconArrayColor = theme.getColor(SYMBOL_ICON_ARRAY_FOREGROUND);
|
||||
if (symbolIconArrayColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-array {
|
||||
color: ${symbolIconArrayColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-array { color: ${symbolIconArrayColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconBooleanColor = theme.getColor(SYMBOL_ICON_BOOLEAN_FOREGROUND);
|
||||
if (symbolIconBooleanColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-boolean {
|
||||
color: ${symbolIconBooleanColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-boolean { color: ${symbolIconBooleanColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconClassColor = theme.getColor(SYMBOL_ICON_CLASS_FOREGROUND);
|
||||
if (symbolIconClassColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-class {
|
||||
color: ${symbolIconClassColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-class { color: ${symbolIconClassColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconMethodColor = theme.getColor(SYMBOL_ICON_METHOD_FOREGROUND);
|
||||
if (symbolIconMethodColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-method {
|
||||
color: ${symbolIconMethodColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-method { color: ${symbolIconMethodColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconColorColor = theme.getColor(SYMBOL_ICON_COLOR_FOREGROUND);
|
||||
if (symbolIconColorColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-color {
|
||||
color: ${symbolIconColorColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-color { color: ${symbolIconColorColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconConstantColor = theme.getColor(SYMBOL_ICON_CONSTANT_FOREGROUND);
|
||||
if (symbolIconConstantColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-constant {
|
||||
color: ${symbolIconConstantColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-constant { color: ${symbolIconConstantColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconConstructorColor = theme.getColor(SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);
|
||||
if (symbolIconConstructorColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-constructor {
|
||||
color: ${symbolIconConstructorColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-constructor { color: ${symbolIconConstructorColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconEnumeratorColor = theme.getColor(SYMBOL_ICON_ENUMERATOR_FOREGROUND);
|
||||
if (symbolIconEnumeratorColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-value,
|
||||
.monaco-workbench .codicon-symbol-enum {
|
||||
color: ${symbolIconEnumeratorColor} !important;
|
||||
}
|
||||
`);
|
||||
.codicon-symbol-value,.codicon-symbol-enum { color: ${symbolIconEnumeratorColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconEnumeratorMemberColor = theme.getColor(SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);
|
||||
if (symbolIconEnumeratorMemberColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-enum-member {
|
||||
color: ${symbolIconEnumeratorMemberColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-enum-member { color: ${symbolIconEnumeratorMemberColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconEventColor = theme.getColor(SYMBOL_ICON_EVENT_FOREGROUND);
|
||||
if (symbolIconEventColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-event {
|
||||
color: ${symbolIconEventColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-event { color: ${symbolIconEventColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconFieldColor = theme.getColor(SYMBOL_ICON_FIELD_FOREGROUND);
|
||||
if (symbolIconFieldColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-field {
|
||||
color: ${symbolIconFieldColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-field { color: ${symbolIconFieldColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconFileColor = theme.getColor(SYMBOL_ICON_FILE_FOREGROUND);
|
||||
if (symbolIconFileColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-file {
|
||||
color: ${symbolIconFileColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-file { color: ${symbolIconFileColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconFolderColor = theme.getColor(SYMBOL_ICON_FOLDER_FOREGROUND);
|
||||
if (symbolIconFolderColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-folder {
|
||||
color: ${symbolIconFolderColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-folder { color: ${symbolIconFolderColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconFunctionColor = theme.getColor(SYMBOL_ICON_FUNCTION_FOREGROUND);
|
||||
if (symbolIconFunctionColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-function {
|
||||
color: ${symbolIconFunctionColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-function { color: ${symbolIconFunctionColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconInterfaceColor = theme.getColor(SYMBOL_ICON_INTERFACE_FOREGROUND);
|
||||
if (symbolIconInterfaceColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-interface {
|
||||
color: ${symbolIconInterfaceColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-interface { color: ${symbolIconInterfaceColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconKeyColor = theme.getColor(SYMBOL_ICON_KEY_FOREGROUND);
|
||||
if (symbolIconKeyColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-key {
|
||||
color: ${symbolIconKeyColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-key { color: ${symbolIconKeyColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconKeywordColor = theme.getColor(SYMBOL_ICON_KEYWORD_FOREGROUND);
|
||||
if (symbolIconKeywordColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-keyword {
|
||||
color: ${symbolIconKeywordColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-keyword { color: ${symbolIconKeywordColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconModuleColor = theme.getColor(SYMBOL_ICON_MODULE_FOREGROUND);
|
||||
if (symbolIconModuleColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-module {
|
||||
color: ${symbolIconModuleColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-module { color: ${symbolIconModuleColor} !important; }`);
|
||||
}
|
||||
|
||||
const outlineNamespaceColor = theme.getColor(SYMBOL_ICON_NAMESPACE_FOREGROUND);
|
||||
if (outlineNamespaceColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-namespace {
|
||||
color: ${outlineNamespaceColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-namespace { color: ${outlineNamespaceColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconNullColor = theme.getColor(SYMBOL_ICON_NULL_FOREGROUND);
|
||||
if (symbolIconNullColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-null {
|
||||
color: ${symbolIconNullColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-null { color: ${symbolIconNullColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconNumberColor = theme.getColor(SYMBOL_ICON_NUMBER_FOREGROUND);
|
||||
if (symbolIconNumberColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-number {
|
||||
color: ${symbolIconNumberColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-number { color: ${symbolIconNumberColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconObjectColor = theme.getColor(SYMBOL_ICON_OBJECT_FOREGROUND);
|
||||
if (symbolIconObjectColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-object {
|
||||
color: ${symbolIconObjectColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-object { color: ${symbolIconObjectColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconOperatorColor = theme.getColor(SYMBOL_ICON_OPERATOR_FOREGROUND);
|
||||
if (symbolIconOperatorColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-operator {
|
||||
color: ${symbolIconOperatorColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-operator { color: ${symbolIconOperatorColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconPackageColor = theme.getColor(SYMBOL_ICON_PACKAGE_FOREGROUND);
|
||||
if (symbolIconPackageColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-package {
|
||||
color: ${symbolIconPackageColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-package { color: ${symbolIconPackageColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconPropertyColor = theme.getColor(SYMBOL_ICON_PROPERTY_FOREGROUND);
|
||||
if (symbolIconPropertyColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-property {
|
||||
color: ${symbolIconPropertyColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-property { color: ${symbolIconPropertyColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconReferenceColor = theme.getColor(SYMBOL_ICON_REFERENCE_FOREGROUND);
|
||||
if (symbolIconReferenceColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-reference {
|
||||
color: ${symbolIconReferenceColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-reference { color: ${symbolIconReferenceColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconSnippetColor = theme.getColor(SYMBOL_ICON_SNIPPET_FOREGROUND);
|
||||
if (symbolIconSnippetColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-snippet {
|
||||
color: ${symbolIconSnippetColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-snippet { color: ${symbolIconSnippetColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconStringColor = theme.getColor(SYMBOL_ICON_STRING_FOREGROUND);
|
||||
if (symbolIconStringColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-string {
|
||||
color: ${symbolIconStringColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-string { color: ${symbolIconStringColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconStructColor = theme.getColor(SYMBOL_ICON_STRUCT_FOREGROUND);
|
||||
if (symbolIconStructColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-struct {
|
||||
color: ${symbolIconStructColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-struct { color: ${symbolIconStructColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconTextColor = theme.getColor(SYMBOL_ICON_TEXT_FOREGROUND);
|
||||
if (symbolIconTextColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-text {
|
||||
color: ${symbolIconTextColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-text { color: ${symbolIconTextColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconTypeParameterColor = theme.getColor(SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);
|
||||
if (symbolIconTypeParameterColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-type-parameter {
|
||||
color: ${symbolIconTypeParameterColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-type-parameter { color: ${symbolIconTypeParameterColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconUnitColor = theme.getColor(SYMBOL_ICON_UNIT_FOREGROUND);
|
||||
if (symbolIconUnitColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-unit {
|
||||
color: ${symbolIconUnitColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-unit { color: ${symbolIconUnitColor} !important; }`);
|
||||
}
|
||||
|
||||
const symbolIconVariableColor = theme.getColor(SYMBOL_ICON_VARIABLE_FOREGROUND);
|
||||
if (symbolIconVariableColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-symbol-variable {
|
||||
color: ${symbolIconVariableColor} !important;
|
||||
}
|
||||
`);
|
||||
collector.addRule(`.codicon-symbol-variable { color: ${symbolIconVariableColor} !important; }`);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -3,31 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* Checkbox */
|
||||
|
||||
.monaco-checkbox .codicon-selection {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: 1px solid black;
|
||||
background-color: transparent;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.monaco-checkbox .checkbox {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
margin: -1px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.monaco-checkbox .checkbox:checked + .codicon-selection {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
/* Find widget */
|
||||
.monaco-editor .find-widget {
|
||||
position: absolute;
|
||||
@@ -184,40 +159,6 @@
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.monaco-editor .find-widget .monaco-checkbox {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.monaco-editor .find-widget .monaco-checkbox .codicon-selection {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.monaco-editor .find-widget .monaco-checkbox .checkbox:disabled + .codicon-selection {
|
||||
opacity: 0.3;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled) + .codicon-selection {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .codicon-selection {
|
||||
background-color: #DDD;
|
||||
}
|
||||
|
||||
.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .codicon-selection {
|
||||
background-color: rgba(100, 100, 100, 0.2);
|
||||
}
|
||||
|
||||
.monaco-editor .find-widget > .replace-part {
|
||||
display: none;
|
||||
}
|
||||
@@ -238,8 +179,7 @@
|
||||
}
|
||||
|
||||
/* REDUCED */
|
||||
.monaco-editor .find-widget.reduced-find-widget .matchesCount,
|
||||
.monaco-editor .find-widget.reduced-find-widget .monaco-checkbox {
|
||||
.monaco-editor .find-widget.reduced-find-widget .matchesCount {
|
||||
display:none;
|
||||
}
|
||||
|
||||
@@ -271,13 +211,8 @@
|
||||
margin-left: -4px;
|
||||
}
|
||||
|
||||
.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .codicon-selection {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.monaco-editor.hc-black .find-widget .button:not(.disabled):hover,
|
||||
.monaco-editor.vs-dark .find-widget .button:not(.disabled):hover,
|
||||
.monaco-editor.vs-dark .find-widget .monaco-checkbox:not(.disabled):hover {
|
||||
.monaco-editor.vs-dark .find-widget .button:not(.disabled):hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
@@ -286,7 +221,3 @@
|
||||
top: 1px;
|
||||
left: 2px;
|
||||
}
|
||||
|
||||
.monaco-editor.hc-black .find-widget .monaco-checkbox .checkbox:checked + .codicon-selection {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
@@ -1341,20 +1341,10 @@ registerThemingParticipant((theme, collector) => {
|
||||
}
|
||||
}
|
||||
|
||||
const inputActiveBorder = theme.getColor(inputActiveOptionBorder);
|
||||
if (inputActiveBorder) {
|
||||
collector.addRule(`.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .label { border: 1px solid ${inputActiveBorder.toString()}; }`);
|
||||
}
|
||||
|
||||
const inputActiveBackground = theme.getColor(inputActiveOptionBackground);
|
||||
if (inputActiveBackground) {
|
||||
collector.addRule(`.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .label { background-color: ${inputActiveBackground.toString()}; }`);
|
||||
}
|
||||
|
||||
// This rule is used to override the outline color for synthetic-focus find input.
|
||||
const focusOutline = theme.getColor(focusBorder);
|
||||
if (focusOutline) {
|
||||
collector.addRule(`.monaco-workbench .monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${focusOutline}; }`);
|
||||
collector.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${focusOutline}; }`);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -69,7 +69,8 @@ suite('Multicursor selection', () => {
|
||||
store: (key: string, value: any) => { queryState[key] = value; return Promise.resolve(); },
|
||||
remove: (key) => undefined,
|
||||
logStorage: () => undefined,
|
||||
migrate: (toWorkspace) => Promise.resolve(undefined)
|
||||
migrate: (toWorkspace) => Promise.resolve(undefined),
|
||||
flush: () => undefined
|
||||
} as IStorageService);
|
||||
|
||||
test('issue #8817: Cursor position changes when you cancel multicursor', () => {
|
||||
|
||||
@@ -259,20 +259,21 @@ export class SuggestController implements IEditorContribution {
|
||||
this.editor.pushUndoStop();
|
||||
}
|
||||
|
||||
if (Array.isArray(suggestion.additionalTextEdits)) {
|
||||
this.editor.executeEdits('suggestController.additionalTextEdits', suggestion.additionalTextEdits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text)));
|
||||
}
|
||||
// compute overwrite[Before|After] deltas BEFORE applying extra edits
|
||||
const info = this.getOverwriteInfo(item, Boolean(flags & InsertFlags.AlternativeOverwriteConfig));
|
||||
|
||||
// keep item in memory
|
||||
this._memoryService.memorize(model, this.editor.getPosition(), item);
|
||||
|
||||
if (Array.isArray(suggestion.additionalTextEdits)) {
|
||||
this.editor.executeEdits('suggestController.additionalTextEdits', suggestion.additionalTextEdits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text)));
|
||||
}
|
||||
|
||||
let { insertText } = suggestion;
|
||||
if (!(suggestion.insertTextRules! & CompletionItemInsertTextRule.InsertAsSnippet)) {
|
||||
insertText = SnippetParser.escape(insertText);
|
||||
}
|
||||
|
||||
const info = this.getOverwriteInfo(item, Boolean(flags & InsertFlags.AlternativeOverwriteConfig));
|
||||
|
||||
SnippetController2.get(this.editor).insert(insertText, {
|
||||
overwriteBefore: info.overwriteBefore,
|
||||
overwriteAfter: info.overwriteAfter,
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!./media/suggest';
|
||||
import 'vs/base/browser/ui/codiconLabel/codiconLabel'; // The codicon symbol styles are defined here and must be loaded
|
||||
import 'vs/editor/contrib/documentSymbols/outlineTree'; // The codicon symbol colors are defined here and must be loaded
|
||||
import * as nls from 'vs/nls';
|
||||
import { createMatches } from 'vs/base/common/filters';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
|
||||
96
src/vs/editor/contrib/suggest/test/suggestController.test.ts
Normal file
96
src/vs/editor/contrib/suggest/test/suggestController.test.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { SuggestController } from 'vs/editor/contrib/suggest/suggestController';
|
||||
import { createTestCodeEditor, TestCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
|
||||
import { TextModel } from 'vs/editor/common/model/textModel';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
import { IStorageService, InMemoryStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { MockKeybindingService } from 'vs/platform/keybinding/test/common/mockKeybindingService';
|
||||
import { ISuggestMemoryService } from 'vs/editor/contrib/suggest/suggestMemory';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService';
|
||||
import { mock } from 'vs/editor/contrib/suggest/test/suggestModel.test';
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
import { CompletionProviderRegistry, CompletionItemKind, CompletionItemInsertTextRule } from 'vs/editor/common/modes';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2';
|
||||
|
||||
suite('SuggestController', function () {
|
||||
|
||||
const disposables = new DisposableStore();
|
||||
|
||||
let controller: SuggestController;
|
||||
let editor: TestCodeEditor;
|
||||
let model: TextModel;
|
||||
|
||||
setup(function () {
|
||||
disposables.clear();
|
||||
|
||||
const serviceCollection = new ServiceCollection(
|
||||
[ITelemetryService, NullTelemetryService],
|
||||
[IStorageService, new InMemoryStorageService()],
|
||||
[IKeybindingService, new MockKeybindingService()],
|
||||
[IEditorWorkerService, new class extends mock<IEditorWorkerService>() {
|
||||
computeWordRanges() {
|
||||
return Promise.resolve({});
|
||||
}
|
||||
}],
|
||||
[ISuggestMemoryService, new class extends mock<ISuggestMemoryService>() {
|
||||
memorize(): void { }
|
||||
select(): number { return 0; }
|
||||
}]
|
||||
);
|
||||
|
||||
model = TextModel.createFromString('', undefined, undefined, URI.from({ scheme: 'test-ctrl', path: '/path.tst' }));
|
||||
editor = createTestCodeEditor({
|
||||
model,
|
||||
serviceCollection,
|
||||
});
|
||||
|
||||
editor.registerAndInstantiateContribution(SnippetController2.ID, SnippetController2);
|
||||
controller = editor.registerAndInstantiateContribution(SuggestController.ID, SuggestController);
|
||||
});
|
||||
|
||||
test('postfix completion reports incorrect position #86984', async function () {
|
||||
disposables.add(CompletionProviderRegistry.register({ scheme: 'test-ctrl' }, {
|
||||
provideCompletionItems(doc, pos) {
|
||||
return {
|
||||
suggestions: [{
|
||||
kind: CompletionItemKind.Snippet,
|
||||
label: 'let',
|
||||
insertText: 'let ${1:name} = foo$0',
|
||||
insertTextRules: CompletionItemInsertTextRule.InsertAsSnippet,
|
||||
range: { startLineNumber: 1, startColumn: 9, endLineNumber: 1, endColumn: 11 },
|
||||
additionalTextEdits: [{
|
||||
text: '',
|
||||
range: { startLineNumber: 1, startColumn: 5, endLineNumber: 1, endColumn: 9 }
|
||||
}]
|
||||
}]
|
||||
};
|
||||
}
|
||||
}));
|
||||
|
||||
editor.setValue(' foo.le');
|
||||
editor.setSelection(new Selection(1, 11, 1, 11));
|
||||
|
||||
// trigger
|
||||
let p1 = Event.toPromise(controller.model.onDidSuggest);
|
||||
controller.triggerSuggest();
|
||||
await p1;
|
||||
|
||||
//
|
||||
let p2 = Event.toPromise(controller.model.onDidCancel);
|
||||
controller.acceptSelectedSuggestion(false, false);
|
||||
await p2;
|
||||
|
||||
assert.equal(editor.getValue(), ' let name = foo');
|
||||
});
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@@ -4,6 +4,8 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!./quickOutline';
|
||||
import 'vs/base/browser/ui/codiconLabel/codiconLabel'; // The codicon symbol styles are defined here and must be loaded
|
||||
import 'vs/editor/contrib/documentSymbols/outlineTree'; // The codicon symbol colors are defined here and must be loaded
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { matchesFuzzy } from 'vs/base/common/filters';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<svg width="300" height="40" viewBox="0 0 300 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 26.8575L4.4855 26L9.4855 23H10.5145L15.5145 26L16 26.8575V32.8575L15.5145 33.715L10.5145 36.715H9.4855L4.4855 33.715L4 32.8575V26.8575ZM9.5 35.5575L5 32.8575V27.6998L9.5 30.1543V35.5575ZM10.5 35.5575L15 32.8575V27.6998L10.5 30.1543V35.5575ZM10 23.8575L5.25913 26.702L10 29.2879L14.7409 26.702L10 23.8575Z" fill="#B180D7"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 6.85749L4.4855 6L9.4855 3H10.5145L15.5145 6L16 6.85749V12.8575L15.5145 13.715L10.5145 16.715H9.4855L4.4855 13.715L4 12.8575V6.85749ZM9.5 15.5575L5 12.8575V7.69975L9.5 10.1543V15.5575ZM10.5 15.5575L15 12.8575V7.69975L10.5 10.1543V15.5575ZM10 3.85749L5.25913 6.70201L10 9.28794L14.7409 6.70201L10 3.85749Z" fill="#652D90"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M23 28.3944L23.5528 27.5L30.5528 24H31.4472L36.4472 26.5L37 27.3944V31.8944L36.4472 32.7889L29.4472 36.2889H28.5528L23.5528 33.7889L23 32.8944V28.3944ZM28.5 35.1444L24 32.8944V29.1709L28.5 31.2164V35.1444ZM29.5 35.1444L36 31.8944V28.1795L29.5 31.2129V35.1444ZM31 24.8944L24.3373 28.2258L28.9972 30.344L35.6706 27.2297L31 24.8944Z" fill="#75BEFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M23 8.39443L23.5528 7.5L30.5528 4H31.4472L36.4472 6.5L37 7.39443V11.8944L36.4472 12.7889L29.4472 16.2889H28.5528L23.5528 13.7889L23 12.8944V8.39443ZM28.5 15.1444L24 12.8944V9.17094L28.5 11.2164V15.1444ZM29.5 15.1444L36 11.8944V8.17954L29.5 11.2129V15.1444ZM31 4.89443L24.3373 8.22579L28.9972 10.344L35.6706 7.22973L31 4.89443Z" fill="#007ACC"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M45.3536 28.6464L44.0607 27.3535L47.3536 24.0607L48.6465 25.3535L45.3536 28.6464ZM47 23L43 27V27.7071L45 29.7071H45.7071L46.8536 28.5606V34.3535L47.3536 34.8535H52.0097V35.3741L53.343 36.7074H54.0501L56.7168 34.0407V33.3336L55.3835 32.0003H54.6763L52.8231 33.8535H47.8536V29.8935H52.0097V30.374L53.343 31.7073H54.0501L56.7168 29.0407V28.3336L55.3835 27.0002H54.6763L52.863 28.8136H47.8536V27.5606L49.7071 25.7071V25L47.7071 23H47ZM53.0703 30.0205L53.6966 30.6467L55.6561 28.6871L55.0299 28.0609L53.0703 30.0205ZM53.0703 35.0205L53.6966 35.6467L55.6561 33.6872L55.0299 33.061L53.0703 35.0205Z" fill="#EE9D28"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M45.3536 8.64642L44.0607 7.35353L47.3536 4.06065L48.6465 5.35354L45.3536 8.64642ZM47 3L43 6.99998V7.70708L45 9.70707H45.7071L46.8536 8.56063V14.3535L47.3536 14.8535H52.0097V15.3741L53.343 16.7074H54.0501L56.7168 14.0407V13.3336L55.3835 12.0003H54.6763L52.8231 13.8535H47.8536V9.89355H52.0097V10.374L53.343 11.7073H54.0501L56.7168 9.04068V8.33357L55.3835 7.00024H54.6763L52.863 8.81356H47.8536V7.56064L49.7071 5.70709V4.99999L47.7071 3H47ZM53.0703 10.0205L53.6966 10.6467L55.6561 8.68713L55.0299 8.0609L53.0703 10.0205ZM53.0703 15.0205L53.6966 15.6467L55.6561 13.6872L55.0299 13.061L53.0703 15.0205Z" fill="#D67E00"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M88 24.9836V24.9718V24H87.9108C87.5974 24 87.2941 24.0616 87.0013 24.1847C86.7082 24.308 86.4494 24.4847 86.2258 24.715C86.0031 24.9442 85.8379 25.195 85.7328 25.4677L85.7323 25.469C85.6338 25.7352 85.5681 26.012 85.5353 26.2992L85.5352 26.3005C85.5068 26.5805 85.4987 26.8684 85.5108 27.1643C85.5227 27.4538 85.5287 27.7433 85.5287 28.0328C85.5287 28.2356 85.4897 28.4259 85.412 28.6051L85.4116 28.606C85.3369 28.783 85.2342 28.9387 85.1032 29.0736C84.9764 29.2041 84.8247 29.3106 84.6467 29.3925C84.4706 29.4695 84.285 29.5082 84.0892 29.5082H84V29.6V30.4V30.4918H84.0892C84.2847 30.4918 84.47 30.5324 84.646 30.6133L84.6474 30.614C84.8246 30.6916 84.9758 30.7976 85.1022 30.9316L85.1041 30.9335C85.2343 31.0637 85.3366 31.2187 85.4113 31.3994L85.412 31.4011C85.4899 31.5805 85.5287 31.7688 85.5287 31.9672C85.5287 32.2567 85.5227 32.5462 85.5108 32.8357C85.4987 33.1316 85.5068 33.4215 85.5352 33.7055L85.5354 33.7072C85.5682 33.9903 85.6339 34.265 85.7323 34.531L85.7328 34.5323C85.8379 34.805 86.0031 35.0558 86.2258 35.285C86.4494 35.5153 86.7082 35.692 87.0013 35.8153C87.2941 35.9384 87.5974 36 87.9108 36H88V35.2V35.0164H87.9108C87.7109 35.0164 87.5235 34.9777 87.3476 34.9008C87.174 34.8191 87.0219 34.7126 86.8909 34.5818C86.7639 34.4469 86.661 34.2911 86.5822 34.1137C86.5084 33.9346 86.4713 33.744 86.4713 33.541C86.4713 33.3127 86.4753 33.0885 86.4832 32.8686C86.4912 32.6411 86.4913 32.4195 86.4832 32.2039C86.4791 31.9825 86.4608 31.7688 86.4282 31.5631C86.3951 31.3502 86.3392 31.1476 86.2604 30.9554C86.1809 30.7616 86.0726 30.5775 85.9362 30.403C85.8235 30.2588 85.6854 30.1246 85.5228 30C85.6854 29.8754 85.8235 29.7412 85.9362 29.597C86.0726 29.4225 86.1809 29.2384 86.2604 29.0446C86.3391 28.8526 86.3951 28.6517 86.4283 28.4428C86.4608 28.2333 86.4791 28.0197 86.4832 27.8022C86.4913 27.5826 86.4913 27.3611 86.4832 27.1375C86.4753 26.9134 86.4713 26.6872 86.4713 26.459C86.4713 26.2602 86.5083 26.0715 86.5824 25.8921C86.6614 25.7103 86.7642 25.5548 86.8909 25.4244C87.0219 25.2894 87.1746 25.1827 87.348 25.1051C87.5238 25.0243 87.7111 24.9836 87.9108 24.9836H88ZM92 35.0164V35.0282V36H92.0892C92.4026 36 92.7059 35.9384 92.9987 35.8153C93.2918 35.692 93.5506 35.5153 93.7742 35.285C93.9969 35.0558 94.1621 34.805 94.2672 34.5323L94.2677 34.531C94.3662 34.2648 94.4319 33.988 94.4647 33.7008L94.4648 33.6995C94.4932 33.4195 94.5013 33.1316 94.4892 32.8357C94.4773 32.5462 94.4713 32.2567 94.4713 31.9672C94.4713 31.7644 94.5103 31.5741 94.588 31.3949L94.5884 31.394C94.6631 31.217 94.7658 31.0613 94.8968 30.9264C95.0236 30.7959 95.1753 30.6894 95.3533 30.6075C95.5294 30.5305 95.715 30.4918 95.9108 30.4918H96V30.4V29.6V29.5082H95.9108C95.7153 29.5082 95.53 29.4676 95.354 29.3867L95.3526 29.386C95.1754 29.3084 95.0242 29.2024 94.8978 29.0684L94.8959 29.0665C94.7657 28.9363 94.6634 28.7813 94.5887 28.6006L94.588 28.5989C94.5101 28.4195 94.4713 28.2312 94.4713 28.0328C94.4713 27.7433 94.4773 27.4538 94.4892 27.1643C94.5013 26.8684 94.4932 26.5785 94.4648 26.2945L94.4646 26.2928C94.4318 26.0097 94.3661 25.735 94.2677 25.469L94.2672 25.4677C94.1621 25.195 93.9969 24.9442 93.7742 24.715C93.5506 24.4847 93.2918 24.308 92.9987 24.1847C92.7059 24.0616 92.4026 24 92.0892 24H92V24.8V24.9836H92.0892C92.2891 24.9836 92.4765 25.0223 92.6524 25.0992C92.826 25.1809 92.9781 25.2874 93.1091 25.4182C93.2361 25.5531 93.339 25.7089 93.4178 25.8863C93.4916 26.0654 93.5287 26.256 93.5287 26.459C93.5287 26.6873 93.5247 26.9115 93.5168 27.1314C93.5088 27.3589 93.5087 27.5805 93.5168 27.7961C93.5209 28.0175 93.5392 28.2312 93.5718 28.4369C93.6049 28.6498 93.6608 28.8524 93.7396 29.0446C93.8191 29.2384 93.9274 29.4225 94.0638 29.597C94.1765 29.7412 94.3146 29.8754 94.4772 30C94.3146 30.1246 94.1765 30.2588 94.0638 30.403C93.9274 30.5775 93.8191 30.7616 93.7396 30.9554C93.6609 31.1474 93.6049 31.3483 93.5717 31.5572C93.5392 31.7667 93.5209 31.9803 93.5168 32.1978C93.5087 32.4174 93.5087 32.6389 93.5168 32.8625C93.5247 33.0866 93.5287 33.3128 93.5287 33.541C93.5287 33.7398 93.4917 33.9285 93.4176 34.1079C93.3386 34.2897 93.2358 34.4452 93.1091 34.5756C92.9781 34.7106 92.8254 34.8173 92.652 34.8949C92.4762 34.9757 92.2889 35.0164 92.0892 35.0164H92Z" fill="#C5C5C5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M88 4.98361V4.97184V4H87.9108C87.5974 4 87.2941 4.06161 87.0013 4.18473C86.7082 4.30798 86.4494 4.48474 86.2258 4.71498C86.0031 4.94422 85.8379 5.19498 85.7328 5.46766L85.7323 5.46898C85.6338 5.7352 85.5681 6.01201 85.5353 6.29917L85.5352 6.30053C85.5068 6.5805 85.4987 6.86844 85.5108 7.16428C85.5227 7.45379 85.5287 7.74329 85.5287 8.03279C85.5287 8.23556 85.4897 8.42594 85.412 8.60507L85.4116 8.60601C85.3369 8.78296 85.2342 8.93866 85.1032 9.07359C84.9764 9.20405 84.8247 9.31055 84.6467 9.3925C84.4706 9.46954 84.285 9.5082 84.0892 9.5082H84V9.6V10.4V10.4918H84.0892C84.2847 10.4918 84.47 10.5324 84.646 10.6133L84.6474 10.614C84.8246 10.6916 84.9758 10.7976 85.1022 10.9316L85.1041 10.9335C85.2343 11.0637 85.3366 11.2187 85.4113 11.3994L85.412 11.4011C85.4899 11.5805 85.5287 11.7688 85.5287 11.9672C85.5287 12.2567 85.5227 12.5462 85.5108 12.8357C85.4987 13.1316 85.5068 13.4215 85.5352 13.7055L85.5354 13.7072C85.5682 13.9903 85.6339 14.265 85.7323 14.531L85.7328 14.5323C85.8379 14.805 86.0031 15.0558 86.2258 15.285C86.4494 15.5153 86.7082 15.692 87.0013 15.8153C87.2941 15.9384 87.5974 16 87.9108 16H88V15.2V15.0164H87.9108C87.7109 15.0164 87.5235 14.9777 87.3476 14.9008C87.174 14.8191 87.0219 14.7126 86.8909 14.5818C86.7639 14.4469 86.661 14.2911 86.5822 14.1137C86.5084 13.9346 86.4713 13.744 86.4713 13.541C86.4713 13.3127 86.4753 13.0885 86.4832 12.8686C86.4912 12.6411 86.4913 12.4195 86.4832 12.2039C86.4791 11.9825 86.4608 11.7688 86.4282 11.5631C86.3951 11.3502 86.3392 11.1476 86.2604 10.9554C86.1809 10.7616 86.0726 10.5775 85.9362 10.403C85.8235 10.2588 85.6854 10.1246 85.5228 10C85.6854 9.87538 85.8235 9.74119 85.9362 9.59702C86.0726 9.42254 86.1809 9.23843 86.2604 9.04464C86.3391 8.85263 86.3951 8.65175 86.4283 8.44285C86.4608 8.2333 86.4791 8.01973 86.4832 7.80219C86.4913 7.58262 86.4913 7.36105 86.4832 7.13749C86.4753 6.9134 86.4713 6.68725 86.4713 6.45902C86.4713 6.26019 86.5083 6.07152 86.5824 5.89205C86.6614 5.71034 86.7642 5.55475 86.8909 5.42437C87.0219 5.28942 87.1746 5.18275 87.348 5.10513C87.5238 5.02427 87.7111 4.98361 87.9108 4.98361H88ZM92 15.0164V15.0282V16H92.0892C92.4026 16 92.7059 15.9384 92.9987 15.8153C93.2918 15.692 93.5506 15.5153 93.7742 15.285C93.9969 15.0558 94.1621 14.805 94.2672 14.5323L94.2677 14.531C94.3662 14.2648 94.4319 13.988 94.4647 13.7008L94.4648 13.6995C94.4932 13.4195 94.5013 13.1316 94.4892 12.8357C94.4773 12.5462 94.4713 12.2567 94.4713 11.9672C94.4713 11.7644 94.5103 11.5741 94.588 11.3949L94.5884 11.394C94.6631 11.217 94.7658 11.0613 94.8968 10.9264C95.0236 10.7959 95.1753 10.6894 95.3533 10.6075C95.5294 10.5305 95.715 10.4918 95.9108 10.4918H96V10.4V9.6V9.5082H95.9108C95.7153 9.5082 95.53 9.46762 95.354 9.38666L95.3526 9.38604C95.1754 9.30844 95.0242 9.20238 94.8978 9.06839L94.8959 9.06648C94.7657 8.9363 94.6634 8.78129 94.5887 8.60058L94.588 8.59892C94.5101 8.41953 94.4713 8.23117 94.4713 8.03279C94.4713 7.74329 94.4773 7.45379 94.4892 7.16428C94.5013 6.86842 94.4932 6.57848 94.4648 6.29454L94.4646 6.29285C94.4318 6.00971 94.3661 5.73502 94.2677 5.46897L94.2672 5.46766C94.1621 5.19499 93.9969 4.94422 93.7742 4.71498C93.5506 4.48474 93.2918 4.30798 92.9987 4.18473C92.7059 4.06161 92.4026 4 92.0892 4H92V4.8V4.98361H92.0892C92.2891 4.98361 92.4765 5.0223 92.6524 5.09917C92.826 5.18092 92.9781 5.28736 93.1091 5.41823C93.2361 5.55305 93.339 5.70889 93.4178 5.88628C93.4916 6.0654 93.5287 6.25596 93.5287 6.45902C93.5287 6.68727 93.5247 6.91145 93.5168 7.13142C93.5088 7.35894 93.5087 7.58049 93.5168 7.79605C93.5209 8.01754 93.5392 8.23117 93.5718 8.43688C93.6049 8.64976 93.6608 8.85243 93.7396 9.04464C93.8191 9.23843 93.9274 9.42254 94.0638 9.59702C94.1765 9.74119 94.3146 9.87538 94.4772 10C94.3146 10.1246 94.1765 10.2588 94.0638 10.403C93.9274 10.5775 93.8191 10.7616 93.7396 10.9554C93.6609 11.1474 93.6049 11.3483 93.5717 11.5572C93.5392 11.7667 93.5209 11.9803 93.5168 12.1978C93.5087 12.4174 93.5087 12.6389 93.5168 12.8625C93.5247 13.0866 93.5287 13.3128 93.5287 13.541C93.5287 13.7398 93.4917 13.9285 93.4176 14.1079C93.3386 14.2897 93.2358 14.4452 93.1091 14.5756C92.9781 14.7106 92.8254 14.8173 92.652 14.8949C92.4762 14.9757 92.2889 15.0164 92.0892 15.0164H92Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M73.5 27C72.1193 27 71 28.1193 71 29.5C71 30.8807 72.1193 32 73.5 32C74.8807 32 76 30.8807 76 29.5C76 28.1193 74.8807 27 73.5 27ZM70.0354 30C70.2781 31.6961 71.7368 33 73.5 33C75.433 33 77 31.433 77 29.5C77 27.567 75.433 26 73.5 26C71.7368 26 70.2781 27.3039 70.0354 29H66.937C66.715 28.1374 65.9319 27.5 65 27.5C63.8954 27.5 63 28.3954 63 29.5C63 30.6046 63.8954 31.5 65 31.5C65.9319 31.5 66.715 30.8626 66.937 30H70.0354Z" fill="#75BEFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M73.5 7C72.1193 7 71 8.11929 71 9.5C71 10.8807 72.1193 12 73.5 12C74.8807 12 76 10.8807 76 9.5C76 8.11929 74.8807 7 73.5 7ZM70.0354 10C70.2781 11.6961 71.7368 13 73.5 13C75.433 13 77 11.433 77 9.5C77 7.567 75.433 6 73.5 6C71.7368 6 70.2781 7.30385 70.0354 9H66.937C66.715 8.13739 65.9319 7.5 65 7.5C63.8954 7.5 63 8.39543 63 9.5C63 10.6046 63.8954 11.5 65 11.5C65.9319 11.5 66.715 10.8626 66.937 10H70.0354Z" fill="#007ACC"/>
|
||||
<path d="M104.807 36.9754C104.571 36.9721 104.338 36.9211 104.122 36.8254C103.907 36.7297 103.712 36.5913 103.552 36.4186C103.239 36.1334 103.044 35.7408 103.008 35.3189C102.966 34.8828 103.093 34.4473 103.361 34.1013C104.568 32.8289 106.947 30.4494 108.678 28.7548C108.31 27.7589 108.327 26.6613 108.726 25.6774C109.055 24.8588 109.639 24.1681 110.391 23.7081C110.982 23.3171 111.66 23.0794 112.366 23.0167C113.071 22.954 113.781 23.0682 114.431 23.3489L115.048 23.6162L112.182 26.5674L113.437 27.8258L116.381 24.9489L116.648 25.5679C116.874 26.0898 116.993 26.6512 117 27.2196C117.006 27.788 116.9 28.3521 116.687 28.8791C116.476 29.4003 116.162 29.8737 115.765 30.2712C115.539 30.4917 115.29 30.6865 115.022 30.8522C114.467 31.2228 113.832 31.4564 113.17 31.5338C112.507 31.6112 111.835 31.5303 111.21 31.2976C110.112 32.4113 107.371 35.1704 105.891 36.5522C105.594 36.8219 105.208 36.9726 104.807 36.9754ZM112.745 23.928C112.087 23.9264 111.444 24.1202 110.896 24.4848C110.683 24.6152 110.484 24.769 110.305 24.9433C109.828 25.4242 109.509 26.0395 109.392 26.7067C109.274 27.3739 109.364 28.061 109.648 28.6759L109.783 28.9729L109.55 29.2003C107.812 30.8967 105.281 33.4201 104.065 34.7045C103.956 34.8658 103.91 35.0608 103.934 35.2535C103.959 35.4463 104.052 35.6238 104.197 35.7532C104.28 35.8462 104.382 35.9211 104.495 35.9731C104.596 36.0184 104.704 36.043 104.814 36.0455C104.981 36.0413 105.14 35.977 105.264 35.8646C106.837 34.3964 109.876 31.3264 110.768 30.4243L110.997 30.1933L111.292 30.3278C111.806 30.5673 112.373 30.6698 112.938 30.6255C113.503 30.5811 114.047 30.3913 114.517 30.0745C114.731 29.9426 114.93 29.7869 115.109 29.6105C115.418 29.3015 115.663 28.9337 115.829 28.5287C115.994 28.1237 116.077 27.6897 116.072 27.2523C116.072 27.0366 116.05 26.8215 116.008 26.6101L113.431 29.1251L110.879 26.5776L113.394 23.9883C113.18 23.9467 112.963 23.9265 112.745 23.928Z" fill="#C5C5C5"/>
|
||||
<path d="M104.807 16.9754C104.571 16.9721 104.338 16.9211 104.122 16.8254C103.907 16.7297 103.712 16.5913 103.552 16.4186C103.239 16.1334 103.044 15.7408 103.008 15.3189C102.966 14.8828 103.093 14.4473 103.361 14.1013C104.568 12.8289 106.947 10.4494 108.678 8.75479C108.31 7.75887 108.327 6.66127 108.726 5.67739C109.055 4.85876 109.639 4.16805 110.391 3.70807C110.982 3.31706 111.66 3.07944 112.366 3.01673C113.071 2.95402 113.781 3.06819 114.431 3.34892L115.048 3.6162L112.182 6.56738L113.437 7.82582L116.381 4.94887L116.648 5.56788C116.874 6.08976 116.993 6.65119 117 7.21961C117.006 7.78802 116.9 8.35211 116.687 8.87915C116.476 9.40029 116.162 9.87368 115.765 10.2712C115.539 10.4917 115.29 10.6865 115.022 10.8522C114.467 11.2228 113.832 11.4564 113.17 11.5338C112.507 11.6112 111.835 11.5303 111.21 11.2976C110.112 12.4113 107.371 15.1704 105.891 16.5522C105.594 16.8219 105.208 16.9726 104.807 16.9754ZM112.745 3.92802C112.087 3.92637 111.444 4.12018 110.896 4.48485C110.683 4.6152 110.484 4.76897 110.305 4.9433C109.828 5.42423 109.509 6.03953 109.392 6.70669C109.274 7.37385 109.364 8.06098 109.648 8.67591L109.783 8.97288L109.55 9.20025C107.812 10.8967 105.281 13.4201 104.065 14.7045C103.956 14.8658 103.91 15.0608 103.934 15.2535C103.959 15.4463 104.052 15.6238 104.197 15.7532C104.28 15.8462 104.382 15.9211 104.495 15.9731C104.596 16.0184 104.704 16.043 104.814 16.0455C104.981 16.0413 105.14 15.977 105.264 15.8646C106.837 14.3964 109.876 11.3264 110.768 10.4243L110.997 10.1933L111.292 10.3278C111.806 10.5673 112.373 10.6698 112.938 10.6255C113.503 10.5811 114.047 10.3913 114.517 10.0745C114.731 9.9426 114.93 9.78694 115.109 9.61045C115.418 9.30153 115.663 8.93374 115.829 8.52874C115.994 8.12375 116.077 7.68974 116.072 7.25228C116.072 7.03662 116.05 6.82148 116.008 6.61007L113.431 9.12508L110.879 6.57759L113.394 3.98834C113.18 3.94674 112.963 3.92653 112.745 3.92802Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M149 25L150 24H156L157 25V30L156 31H152V30H156V25H150V28H149V25ZM150 29L151 30V31V35L150 36H144L143 35V30L144 29H149H150ZM150 30V31V35H144V30H149H150ZM151.414 29L151 28.5858V28H155V29H151.414ZM151 26H155V27H151V26ZM149 32H145V33H149V32Z" fill="#75BEFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M149 5L150 4H156L157 5V10L156 11H152V10H156V5H150V8H149V5ZM150 9L151 10V11V15L150 16H144L143 15V10L144 9H149H150ZM150 10V11V15H144V10H149H150ZM151.414 9L151 8.58579V8H155V9H151.414ZM151 6H155V7H151V6ZM149 12H145V13H149V12Z" fill="#007ACC"/>
|
||||
<path d="M177 6H172V5H177V6ZM176 9H174V10H176V9ZM172 9H163V10H172V9ZM174 15H163V16H174V15ZM169 12H163V13H169V12ZM177 12H172V13H177V12ZM170 4V7H163V4H170ZM169 5H164V6H169V5Z" fill="#C5C5C5"/>
|
||||
<path d="M177 26H172V25H177V26ZM176 29H174V30H176V29ZM172 29H163V30H172V29ZM174 35H163V36H174V35ZM169 32H163V33H169V32ZM177 32H172V33H177V32ZM170 24V27H163V24H170ZM169 25H164V26H169V25Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M209.223 32.933C209.549 33.1254 209.922 33.2231 210.3 33.215C210.638 33.2218 210.973 33.1492 211.277 33.003C211.582 32.8567 211.848 32.6409 212.054 32.373C212.509 31.7652 212.74 31.0187 212.708 30.26C212.741 29.5862 212.537 28.9221 212.132 28.383C211.936 28.1416 211.686 27.9496 211.402 27.8223C211.118 27.695 210.809 27.636 210.498 27.65C210.075 27.647 209.66 27.7608 209.298 27.979C209.183 28.0481 209.075 28.1278 208.975 28.217V25.475H207.984V33.1H208.979V32.756C209.055 32.8217 209.137 32.8809 209.223 32.933ZM209.85 28.7001C210.036 28.621 210.238 28.5868 210.44 28.6C210.613 28.5945 210.784 28.6305 210.94 28.705C211.096 28.7795 211.232 28.8902 211.336 29.028C211.593 29.3905 211.718 29.8295 211.693 30.273C211.72 30.7975 211.58 31.317 211.293 31.757C211.188 31.9153 211.045 32.0447 210.878 32.1335C210.71 32.2223 210.523 32.2675 210.333 32.265C210.149 32.2732 209.966 32.24 209.797 32.1678C209.628 32.0956 209.478 31.9863 209.357 31.848C209.102 31.5596 208.965 31.1851 208.975 30.8V30.2C208.963 29.7833 209.103 29.3765 209.368 29.055C209.499 28.9006 209.664 28.7791 209.85 28.7001ZM205.289 27.675C204.97 27.6793 204.654 27.734 204.352 27.837C204.064 27.9229 203.793 28.0583 203.552 28.237L203.452 28.314V29.514L203.875 29.155C204.246 28.8048 204.731 28.6015 205.241 28.583C205.366 28.5716 205.492 28.5915 205.607 28.6407C205.722 28.6899 205.824 28.767 205.902 28.865C206.052 29.0971 206.132 29.3675 206.133 29.644L204.9 29.825C204.394 29.8778 203.915 30.0777 203.522 30.4C203.367 30.5518 203.243 30.7327 203.158 30.9324C203.073 31.132 203.028 31.3464 203.026 31.5634C203.024 31.7804 203.065 31.9957 203.146 32.1969C203.228 32.3981 203.348 32.5813 203.5 32.736C203.669 32.8904 203.866 33.01 204.081 33.0879C204.296 33.1659 204.525 33.2005 204.753 33.19C205.147 33.1931 205.533 33.0774 205.86 32.858C205.962 32.7897 206.057 32.7131 206.146 32.629V33.073H207.087V29.715C207.121 29.1742 206.954 28.6399 206.618 28.215C206.45 28.0329 206.243 27.89 206.014 27.7967C205.784 27.7034 205.537 27.6618 205.289 27.675ZM206.146 30.716C206.166 31.1343 206.026 31.5446 205.755 31.864C205.637 32.0005 205.49 32.1092 205.325 32.1821C205.16 32.2551 204.98 32.2906 204.8 32.286C204.69 32.2945 204.58 32.2812 204.476 32.2469C204.372 32.2125 204.275 32.1579 204.192 32.086C204.061 31.9346 203.989 31.7409 203.989 31.5405C203.989 31.3401 204.061 31.1464 204.192 30.995C204.473 30.8213 204.792 30.7184 205.122 30.695L206.142 30.547L206.146 30.716ZM214.459 33.0325C214.766 33.1638 215.098 33.2261 215.432 33.215C215.927 33.227 216.415 33.1006 216.842 32.85L216.965 32.775L216.978 32.768V31.615L216.532 31.935C216.216 32.1592 215.836 32.2747 215.448 32.264C215.25 32.2719 215.052 32.2342 214.87 32.1538C214.689 32.0733 214.528 31.9523 214.4 31.8C214.114 31.4245 213.973 30.9591 214 30.488C213.974 29.9873 214.135 29.4948 214.453 29.107C214.593 28.9411 214.77 28.8091 214.968 28.7213C215.167 28.6335 215.383 28.592 215.6 28.6C215.944 28.5984 216.281 28.6953 216.571 28.879L217 29.144V27.97L216.831 27.897C216.463 27.7343 216.064 27.6502 215.661 27.65C215.3 27.6399 214.941 27.7076 214.608 27.8486C214.275 27.9896 213.976 28.2005 213.732 28.467C213.226 29.0268 212.958 29.7619 212.985 30.516C212.957 31.2235 213.196 31.9157 213.654 32.455C213.877 32.704 214.152 32.9012 214.459 33.0325Z" fill="#C5C5C5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M209.223 12.933C209.549 13.1254 209.922 13.2231 210.3 13.215C210.638 13.2218 210.973 13.1492 211.277 13.003C211.582 12.8567 211.848 12.6409 212.054 12.373C212.509 11.7652 212.74 11.0187 212.708 10.26C212.741 9.58622 212.537 8.9221 212.132 8.38298C211.936 8.14161 211.686 7.94957 211.402 7.82228C211.118 7.69498 210.809 7.63597 210.498 7.64997C210.075 7.64699 209.66 7.76085 209.298 7.97898C209.183 8.04807 209.075 8.12775 208.975 8.21698V5.47498H207.984V13.1H208.979V12.756C209.055 12.8217 209.137 12.8809 209.223 12.933ZM209.85 8.70006C210.036 8.62105 210.238 8.58677 210.44 8.59998C210.613 8.59452 210.784 8.63054 210.94 8.70501C211.096 8.77948 211.232 8.89023 211.336 9.02798C211.593 9.39053 211.718 9.82951 211.693 10.273C211.72 10.7975 211.58 11.317 211.293 11.757C211.188 11.9153 211.045 12.0447 210.878 12.1335C210.71 12.2223 210.523 12.2675 210.333 12.265C210.149 12.2732 209.966 12.24 209.797 12.1678C209.628 12.0956 209.478 11.9863 209.357 11.848C209.102 11.5596 208.965 11.1851 208.975 10.8V10.2C208.963 9.78332 209.103 9.3765 209.368 9.05498C209.499 8.90064 209.664 8.77908 209.85 8.70006ZM205.289 7.67499C204.97 7.67933 204.654 7.734 204.352 7.83699C204.064 7.92293 203.793 8.05828 203.552 8.23699L203.452 8.31399V9.51399L203.875 9.15499C204.246 8.80478 204.731 8.60146 205.241 8.58299C205.366 8.57164 205.492 8.59147 205.607 8.64068C205.722 8.6899 205.824 8.76697 205.902 8.86499C206.052 9.0971 206.132 9.36754 206.133 9.64399L204.9 9.82499C204.394 9.87781 203.915 10.0777 203.522 10.4C203.367 10.5518 203.243 10.7327 203.158 10.9324C203.073 11.132 203.028 11.3464 203.026 11.5634C203.024 11.7804 203.065 11.9957 203.146 12.1969C203.228 12.3981 203.348 12.5813 203.5 12.736C203.669 12.8904 203.866 13.01 204.081 13.0879C204.296 13.1659 204.525 13.2005 204.753 13.19C205.147 13.1931 205.533 13.0774 205.86 12.858C205.962 12.7897 206.057 12.7131 206.146 12.629V13.073H207.087V9.71499C207.121 9.17422 206.954 8.63988 206.618 8.21499C206.45 8.03285 206.243 7.89003 206.014 7.7967C205.784 7.70336 205.537 7.66181 205.289 7.67499ZM206.146 10.716C206.166 11.1343 206.026 11.5446 205.755 11.864C205.637 12.0005 205.49 12.1092 205.325 12.1821C205.16 12.2551 204.98 12.2906 204.8 12.286C204.69 12.2945 204.58 12.2812 204.476 12.2469C204.372 12.2125 204.275 12.1579 204.192 12.086C204.061 11.9346 203.989 11.7409 203.989 11.5405C203.989 11.3401 204.061 11.1464 204.192 10.995C204.473 10.8213 204.792 10.7184 205.122 10.695L206.142 10.547L206.146 10.716ZM214.459 13.0325C214.766 13.1638 215.098 13.2261 215.432 13.215C215.927 13.227 216.415 13.1006 216.842 12.85L216.965 12.775L216.978 12.768V11.615L216.532 11.935C216.216 12.1592 215.836 12.2747 215.448 12.264C215.25 12.2719 215.052 12.2342 214.87 12.1538C214.689 12.0733 214.528 11.9523 214.4 11.8C214.114 11.4245 213.973 10.9591 214 10.488C213.974 9.98732 214.135 9.49475 214.453 9.10704C214.593 8.94105 214.77 8.80914 214.968 8.7213C215.167 8.63346 215.383 8.592 215.6 8.60004C215.944 8.59844 216.281 8.69525 216.571 8.87904L217 9.14404V7.97004L216.831 7.89704C216.463 7.73432 216.064 7.6502 215.661 7.65004C215.3 7.63991 214.941 7.70762 214.608 7.84859C214.275 7.98956 213.976 8.20048 213.732 8.46704C213.226 9.02683 212.958 9.76186 212.985 10.516C212.957 11.2235 213.196 11.9157 213.654 12.455C213.877 12.704 214.152 12.9012 214.459 13.0325Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M266 3L265 4V16L266 17H275L276 16V7L275.707 6.29289L272.707 3.29289L272 3H266ZM266 16V4L271 4V8H275V16H266ZM275 7L272 4V7L275 7Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M266 23L265 24V36L266 37H275L276 36V27L275.707 26.2929L272.707 23.2929L272 23H266ZM266 36V24L271 24V28H275V36H266ZM275 27L272 24V27L275 27Z" fill="#C5C5C5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M130 24L129 25V28H130V25H136V30H132V31H136L137 30V25L136 24H130ZM131 30L130 29H129H124L123 30V35L124 36H130L131 35V31V30ZM130 31V30H129H124V35H130V31ZM131 28.5858L131.414 29H135V28H131V28.5858ZM135 26H131V27H135V26ZM129 31H125V32H129V31ZM125 33H129V34H125V33Z" fill="#EE9D28"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M130 4L129 5V8H130V5H136V10H132V11H136L137 10V5L136 4H130ZM131 10L130 9H129H124L123 10V15L124 16H130L131 15V11V10ZM130 11V10H129H124V15H130V11ZM131 8.58579L131.414 9H135V8H131V8.58579ZM135 6H131V7H135V6ZM129 11H125V12H129V11ZM125 13H129V14H125V13Z" fill="#D67E00"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M246 3L245 4V16L246 17H254L255 16V4L254 3H246ZM246 5V4H254V16H246V15H248V14H246V12H250V11H246V9H248V8H246V6H250V5H246Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M246 23L245 24V36L246 37H254L255 36V24L254 23H246ZM246 25V24H254V36H246V35H248V34H246V32H250V31H246V29H248V28H246V26H250V25H246Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 25 KiB |
@@ -23,7 +23,7 @@ import { ITextModel, ITextSnapshot } from 'vs/editor/common/model';
|
||||
import { TextEdit, WorkspaceEdit, isResourceTextEdit } from 'vs/editor/common/modes';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { IResolvedTextEditorModel, ITextModelContentProvider, ITextModelService } from 'vs/editor/common/services/resolverService';
|
||||
import { IResourceConfigurationService, ITextResourcePropertiesService, IResourceConfigurationChangeEvent } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourceConfigurationService, ITextResourcePropertiesService, ITextResourceConfigurationChangeEvent } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { CommandsRegistry, ICommand, ICommandEvent, ICommandHandler, ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IConfigurationChangeEvent, IConfigurationData, IConfigurationOverrides, IConfigurationService, IConfigurationModel, IConfigurationValue, ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import { Configuration, ConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/configurationModels';
|
||||
@@ -312,30 +312,29 @@ export class StandaloneKeybindingService extends AbstractKeybindingService {
|
||||
|
||||
public addDynamicKeybinding(commandId: string, _keybinding: number, handler: ICommandHandler, when: ContextKeyExpr | undefined): IDisposable {
|
||||
const keybinding = createKeybinding(_keybinding, OS);
|
||||
if (!keybinding) {
|
||||
throw new Error(`Invalid keybinding`);
|
||||
}
|
||||
|
||||
const toDispose = new DisposableStore();
|
||||
|
||||
this._dynamicKeybindings.push({
|
||||
keybinding: keybinding,
|
||||
command: commandId,
|
||||
when: when,
|
||||
weight1: 1000,
|
||||
weight2: 0
|
||||
});
|
||||
if (keybinding) {
|
||||
this._dynamicKeybindings.push({
|
||||
keybinding: keybinding,
|
||||
command: commandId,
|
||||
when: when,
|
||||
weight1: 1000,
|
||||
weight2: 0
|
||||
});
|
||||
|
||||
toDispose.add(toDisposable(() => {
|
||||
for (let i = 0; i < this._dynamicKeybindings.length; i++) {
|
||||
let kb = this._dynamicKeybindings[i];
|
||||
if (kb.command === commandId) {
|
||||
this._dynamicKeybindings.splice(i, 1);
|
||||
this.updateResolver({ source: KeybindingSource.Default });
|
||||
return;
|
||||
toDispose.add(toDisposable(() => {
|
||||
for (let i = 0; i < this._dynamicKeybindings.length; i++) {
|
||||
let kb = this._dynamicKeybindings[i];
|
||||
if (kb.command === commandId) {
|
||||
this._dynamicKeybindings.splice(i, 1);
|
||||
this.updateResolver({ source: KeybindingSource.Default });
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
}));
|
||||
}
|
||||
|
||||
let commandService = this._commandService;
|
||||
if (commandService instanceof StandaloneCommandService) {
|
||||
@@ -487,11 +486,11 @@ export class SimpleConfigurationService implements IConfigurationService {
|
||||
}
|
||||
}
|
||||
|
||||
export class SimpleResourceConfigurationService implements IResourceConfigurationService {
|
||||
export class SimpleResourceConfigurationService implements ITextResourceConfigurationService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _onDidChangeConfiguration = new Emitter<IResourceConfigurationChangeEvent>();
|
||||
private readonly _onDidChangeConfiguration = new Emitter<ITextResourceConfigurationChangeEvent>();
|
||||
public readonly onDidChangeConfiguration = this._onDidChangeConfiguration.event;
|
||||
|
||||
constructor(private readonly configurationService: SimpleConfigurationService) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { IModeService } from 'vs/editor/common/services/modeService';
|
||||
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
|
||||
import { IResourceConfigurationService, ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourceConfigurationService, ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { SimpleBulkEditService, SimpleConfigurationService, SimpleDialogService, SimpleNotificationService, SimpleEditorProgressService, SimpleResourceConfigurationService, SimpleResourcePropertiesService, SimpleUriLabelService, SimpleWorkspaceContextService, StandaloneCommandService, StandaloneKeybindingService, StandaloneTelemetryService, SimpleLayoutService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { StandaloneCodeEditorServiceImpl } from 'vs/editor/standalone/browser/standaloneCodeServiceImpl';
|
||||
import { StandaloneThemeServiceImpl } from 'vs/editor/standalone/browser/standaloneThemeServiceImpl';
|
||||
@@ -126,7 +126,7 @@ export module StaticServices {
|
||||
const configurationServiceImpl = new SimpleConfigurationService();
|
||||
export const configurationService = define(IConfigurationService, () => configurationServiceImpl);
|
||||
|
||||
export const resourceConfigurationService = define(IResourceConfigurationService, () => new SimpleResourceConfigurationService(configurationServiceImpl));
|
||||
export const resourceConfigurationService = define(ITextResourceConfigurationService, () => new SimpleResourceConfigurationService(configurationServiceImpl));
|
||||
|
||||
export const resourcePropertiesService = define(ITextResourcePropertiesService, () => new SimpleResourcePropertiesService(configurationServiceImpl));
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import { createStringBuilder } from 'vs/editor/common/core/stringBuilder';
|
||||
import { DefaultEndOfLine } from 'vs/editor/common/model';
|
||||
import { TextModel, createTextBuffer } from 'vs/editor/common/model/textModel';
|
||||
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
|
||||
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { IModeService } from 'vs/editor/common/services/modeService';
|
||||
import { IConfigurationValue, IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import { TextResourceConfigurationService } from 'vs/editor/common/services/resourceConfigurationImpl';
|
||||
import { TextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationServiceImpl';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
|
||||
@@ -52,9 +52,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into given memory target without overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
workspaceFolderTarget: { value: '1' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
workspaceFolder: { value: '1' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -65,9 +65,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into given workspace target without overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
workspaceFolderTarget: { value: '2' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
workspaceFolder: { value: '2' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -78,9 +78,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into given user target without overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
workspaceFolderTarget: { value: '2' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
workspaceFolder: { value: '2' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -91,9 +91,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into given workspace folder target with overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
workspaceFolderTarget: { value: '2', override: '1' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
workspaceFolder: { value: '2', override: '1' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -104,9 +104,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived workspace folder target without overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
workspaceFolderTarget: { value: '2' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
workspaceFolder: { value: '2' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -117,10 +117,10 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived workspace folder target with overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
workspaceTarget: { value: '2', override: '1' },
|
||||
workspaceFolderTarget: { value: '2', override: '2' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
workspace: { value: '2', override: '1' },
|
||||
workspaceFolder: { value: '2', override: '2' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -131,9 +131,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived workspace target without overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
workspaceTarget: { value: '2' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
workspace: { value: '2' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -144,9 +144,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived workspace target with overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
workspaceTarget: { value: '2', override: '2' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
workspace: { value: '2', override: '2' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -157,10 +157,10 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived workspace target with overrides and value defined in folder', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1', override: '3' },
|
||||
userLocalTarget: { value: '2' },
|
||||
workspaceTarget: { value: '2', override: '2' },
|
||||
workspaceFolderTarget: { value: '2' },
|
||||
default: { value: '1', override: '3' },
|
||||
userLocal: { value: '2' },
|
||||
workspace: { value: '2', override: '2' },
|
||||
workspaceFolder: { value: '2' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -171,9 +171,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived user remote target without overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
userRemoteTarget: { value: '2' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
userRemote: { value: '2' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -184,9 +184,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived user remote target with overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
userRemoteTarget: { value: '2', override: '3' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
userRemote: { value: '2', override: '3' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -197,10 +197,10 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived user remote target with overrides and value defined in workspace', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
userRemoteTarget: { value: '2', override: '3' },
|
||||
workspaceTarget: { value: '3' }
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
userRemote: { value: '2', override: '3' },
|
||||
workspace: { value: '3' }
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -211,11 +211,11 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived user remote target with overrides and value defined in workspace folder', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2', override: '1' },
|
||||
userRemoteTarget: { value: '2', override: '3' },
|
||||
workspaceTarget: { value: '3' },
|
||||
workspaceFolderTarget: { value: '3' }
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2', override: '1' },
|
||||
userRemote: { value: '2', override: '3' },
|
||||
workspace: { value: '3' },
|
||||
workspaceFolder: { value: '3' }
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -226,8 +226,8 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived user target without overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -238,8 +238,8 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived user target with overrides', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2', override: '3' },
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2', override: '3' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -250,9 +250,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived user target with overrides and value is defined in remote', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2', override: '3' },
|
||||
userRemoteTarget: { value: '3' }
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2', override: '3' },
|
||||
userRemote: { value: '3' }
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -263,9 +263,9 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived user target with overrides and value is defined in workspace', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
userLocalTarget: { value: '2', override: '3' },
|
||||
workspace: { value: '3' }
|
||||
default: { value: '1' },
|
||||
userLocal: { value: '2', override: '3' },
|
||||
workspaceValue: { value: '3' }
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -276,10 +276,10 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue writes into derived user target with overrides and value is defined in workspace folder', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1', override: '3' },
|
||||
userLocalTarget: { value: '2', override: '3' },
|
||||
userRemoteTarget: { value: '3' },
|
||||
workspaceFolder: { value: '3' }
|
||||
default: { value: '1', override: '3' },
|
||||
userLocal: { value: '2', override: '3' },
|
||||
userRemote: { value: '3' },
|
||||
workspaceFolderValue: { value: '3' }
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -290,7 +290,7 @@ suite('TextResourceConfigurationService - Update', () => {
|
||||
test('updateValue when not changed', async () => {
|
||||
language = 'a';
|
||||
configurationValue = {
|
||||
defaultTarget: { value: '1' },
|
||||
default: { value: '1' },
|
||||
};
|
||||
const resource = URI.file('someFile');
|
||||
|
||||
@@ -57,7 +57,7 @@ const x16 = / x07; /.test('3');
|
||||
/// ^^^^^^^^ regex
|
||||
/// ^^^ string
|
||||
|
||||
const x17 = `.dialog-modal-block${true ? '.dimmed' : ''}`;
|
||||
const x17 = `.monaco-dialog-modal-block${true ? '.dimmed' : ''}`;
|
||||
/// ^^^^^^^^^^^^^^^^^^^^^^ string
|
||||
/// ^^^^^^^^^ string
|
||||
/// ^^^^ string
|
||||
|
||||
12
src/vs/monaco.d.ts
vendored
12
src/vs/monaco.d.ts
vendored
@@ -996,6 +996,11 @@ declare namespace monaco.editor {
|
||||
* An object that can be used by the web worker to make calls back to the main thread.
|
||||
*/
|
||||
host?: any;
|
||||
/**
|
||||
* Keep idle models.
|
||||
* Defaults to false, which means that idle models will stop syncing after a while.
|
||||
*/
|
||||
keepIdleModels?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3802,6 +3807,11 @@ declare namespace monaco.editor {
|
||||
* An event emitted after composition has ended.
|
||||
*/
|
||||
onCompositionEnd(listener: () => void): IDisposable;
|
||||
/**
|
||||
* An event emitted when users paste text in the editor.
|
||||
* @event
|
||||
*/
|
||||
onDidPaste(listener: (range: Range) => void): IDisposable;
|
||||
/**
|
||||
* An event emitted on a "mouseup".
|
||||
* @event
|
||||
@@ -4751,7 +4761,7 @@ declare namespace monaco.languages {
|
||||
preselect?: boolean;
|
||||
/**
|
||||
* A string or snippet that should be inserted in a document when selecting
|
||||
* this completion.
|
||||
* this completion. When `falsy` the [label](#CompletionItem.label)
|
||||
* is used.
|
||||
*/
|
||||
insertText: string;
|
||||
|
||||
@@ -67,22 +67,22 @@ export interface IConfigurationChangeEvent {
|
||||
|
||||
export interface IConfigurationValue<T> {
|
||||
|
||||
readonly default?: T;
|
||||
readonly user?: T;
|
||||
readonly userLocal?: T;
|
||||
readonly userRemote?: T;
|
||||
readonly workspace?: T;
|
||||
readonly workspaceFolder?: T;
|
||||
readonly memory?: T;
|
||||
readonly defaultValue?: T;
|
||||
readonly userValue?: T;
|
||||
readonly userLocalValue?: T;
|
||||
readonly userRemoteValue?: T;
|
||||
readonly workspaceValue?: T;
|
||||
readonly workspaceFolderValue?: T;
|
||||
readonly memoryValue?: T;
|
||||
readonly value?: T;
|
||||
|
||||
readonly defaultTarget?: { value?: T, override?: T };
|
||||
readonly userTarget?: { value?: T, override?: T };
|
||||
readonly userLocalTarget?: { value?: T, override?: T };
|
||||
readonly userRemoteTarget?: { value?: T, override?: T };
|
||||
readonly workspaceTarget?: { value?: T, override?: T };
|
||||
readonly workspaceFolderTarget?: { value?: T, override?: T };
|
||||
readonly memoryTarget?: { value?: T, override?: T };
|
||||
readonly default?: { value?: T, override?: T };
|
||||
readonly user?: { value?: T, override?: T };
|
||||
readonly userLocal?: { value?: T, override?: T };
|
||||
readonly userRemote?: { value?: T, override?: T };
|
||||
readonly workspace?: { value?: T, override?: T };
|
||||
readonly workspaceFolder?: { value?: T, override?: T };
|
||||
readonly memory?: { value?: T, override?: T };
|
||||
}
|
||||
|
||||
export interface IConfigurationService {
|
||||
@@ -216,14 +216,11 @@ export function compare(from: IConfigurationModel | undefined, to: IConfiguratio
|
||||
|
||||
export function toOverrides(raw: any, conflictReporter: (message: string) => void): IOverrides[] {
|
||||
const overrides: IOverrides[] = [];
|
||||
const configurationProperties = Registry.as<IConfigurationRegistry>(Extensions.Configuration).getConfigurationProperties();
|
||||
for (const key of Object.keys(raw)) {
|
||||
if (OVERRIDE_PROPERTY_PATTERN.test(key)) {
|
||||
const overrideRaw: any = {};
|
||||
for (const keyInOverrideRaw in raw[key]) {
|
||||
if (configurationProperties[keyInOverrideRaw] && configurationProperties[keyInOverrideRaw].overridable) {
|
||||
overrideRaw[keyInOverrideRaw] = raw[key][keyInOverrideRaw];
|
||||
}
|
||||
overrideRaw[keyInOverrideRaw] = raw[key][keyInOverrideRaw];
|
||||
}
|
||||
overrides.push({
|
||||
identifiers: [overrideIdentifierFromKey(key).trim()],
|
||||
@@ -361,11 +358,11 @@ export function getMigratedSettingValue<T>(configurationService: IConfigurationS
|
||||
const setting = configurationService.inspect<T>(currentSettingName);
|
||||
const legacySetting = configurationService.inspect<T>(legacySettingName);
|
||||
|
||||
if (typeof setting.user !== 'undefined' || typeof setting.workspace !== 'undefined' || typeof setting.workspaceFolder !== 'undefined') {
|
||||
if (typeof setting.userValue !== 'undefined' || typeof setting.workspaceValue !== 'undefined' || typeof setting.workspaceFolderValue !== 'undefined') {
|
||||
return setting.value!;
|
||||
} else if (typeof legacySetting.user !== 'undefined' || typeof legacySetting.workspace !== 'undefined' || typeof legacySetting.workspaceFolder !== 'undefined') {
|
||||
} else if (typeof legacySetting.userValue !== 'undefined' || typeof legacySetting.workspaceValue !== 'undefined' || typeof legacySetting.workspaceFolderValue !== 'undefined') {
|
||||
return legacySetting.value!;
|
||||
} else {
|
||||
return setting.default!;
|
||||
return setting.defaultValue!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,22 +394,22 @@ export class Configuration {
|
||||
const value = consolidateConfigurationModel.getValue<C>(key);
|
||||
|
||||
return {
|
||||
default: defaultValue,
|
||||
user: userValue,
|
||||
userLocal: userLocalValue,
|
||||
userRemote: userRemoteValue,
|
||||
workspace: workspaceValue,
|
||||
workspaceFolder: workspaceFolderValue,
|
||||
memory: memoryValue,
|
||||
defaultValue: defaultValue,
|
||||
userValue: userValue,
|
||||
userLocalValue: userLocalValue,
|
||||
userRemoteValue: userRemoteValue,
|
||||
workspaceValue: workspaceValue,
|
||||
workspaceFolderValue: workspaceFolderValue,
|
||||
memoryValue: memoryValue,
|
||||
value,
|
||||
|
||||
defaultTarget: defaultValue !== undefined ? { value: this._defaultConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this._defaultConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
userTarget: userValue !== undefined ? { value: this.userConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this.userConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
userLocalTarget: userLocalValue !== undefined ? { value: this.localUserConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this.localUserConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
userRemoteTarget: userRemoteValue !== undefined ? { value: this.remoteUserConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this.remoteUserConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
workspaceTarget: workspaceValue !== undefined ? { value: this._workspaceConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this._workspaceConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
workspaceFolderTarget: workspaceFolderValue !== undefined ? { value: folderConfigurationModel?.freeze().getValue(key), override: overrides.overrideIdentifier ? folderConfigurationModel?.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
memoryTarget: memoryValue !== undefined ? { value: memoryConfigurationModel.getValue(key), override: overrides.overrideIdentifier ? memoryConfigurationModel.getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
default: defaultValue !== undefined ? { value: this._defaultConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this._defaultConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
user: userValue !== undefined ? { value: this.userConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this.userConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
userLocal: userLocalValue !== undefined ? { value: this.localUserConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this.localUserConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
userRemote: userRemoteValue !== undefined ? { value: this.remoteUserConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this.remoteUserConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
workspace: workspaceValue !== undefined ? { value: this._workspaceConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this._workspaceConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
workspaceFolder: workspaceFolderValue !== undefined ? { value: folderConfigurationModel?.freeze().getValue(key), override: overrides.overrideIdentifier ? folderConfigurationModel?.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
memory: memoryValue !== undefined ? { value: memoryConfigurationModel.getValue(key), override: overrides.overrideIdentifier ? memoryConfigurationModel.getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,10 @@ export const enum ConfigurationScope {
|
||||
* Resource specific configuration, which can be configured in the user, workspace or folder settings.
|
||||
*/
|
||||
RESOURCE,
|
||||
/**
|
||||
* Resource specific configuration that can also be configured in language specific settings
|
||||
*/
|
||||
RESOURCE_LANGUAGE,
|
||||
/**
|
||||
* Machine specific configuration that can also be configured in workspace or folder settings.
|
||||
*/
|
||||
@@ -106,7 +110,6 @@ export const enum ConfigurationScope {
|
||||
}
|
||||
|
||||
export interface IConfigurationPropertySchema extends IJSONSchema {
|
||||
overridable?: boolean;
|
||||
scope?: ConfigurationScope;
|
||||
included?: boolean;
|
||||
tags?: string[];
|
||||
@@ -124,7 +127,6 @@ export interface IConfigurationNode {
|
||||
description?: string;
|
||||
properties?: { [path: string]: IConfigurationPropertySchema; };
|
||||
allOf?: IConfigurationNode[];
|
||||
overridable?: boolean;
|
||||
scope?: ConfigurationScope;
|
||||
extensionInfo?: IConfigurationExtensionInfo;
|
||||
}
|
||||
@@ -144,7 +146,8 @@ export const machineOverridableSettings: { properties: SettingProperties, patter
|
||||
export const windowSettings: { properties: SettingProperties, patternProperties: SettingProperties } = { properties: {}, patternProperties: {} };
|
||||
export const resourceSettings: { properties: SettingProperties, patternProperties: SettingProperties } = { properties: {}, patternProperties: {} };
|
||||
|
||||
export const editorConfigurationSchemaId = 'vscode://schemas/settings/editor';
|
||||
export const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';
|
||||
|
||||
const contributionRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);
|
||||
|
||||
class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
@@ -153,7 +156,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
private readonly configurationContributors: IConfigurationNode[];
|
||||
private readonly configurationProperties: { [qualifiedKey: string]: IJSONSchema };
|
||||
private readonly excludedConfigurationProperties: { [qualifiedKey: string]: IJSONSchema };
|
||||
private readonly editorConfigurationSchema: IJSONSchema;
|
||||
private readonly resourceLanguageSettingsSchema: IJSONSchema;
|
||||
private readonly overrideIdentifiers: string[] = [];
|
||||
private overridePropertyPattern: string;
|
||||
|
||||
@@ -170,12 +173,12 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
properties: {}
|
||||
};
|
||||
this.configurationContributors = [this.defaultOverridesConfigurationNode];
|
||||
this.editorConfigurationSchema = { properties: {}, patternProperties: {}, additionalProperties: false, errorMessage: 'Unknown editor configuration setting', allowTrailingCommas: true, allowComments: true };
|
||||
this.resourceLanguageSettingsSchema = { properties: {}, patternProperties: {}, additionalProperties: false, errorMessage: 'Unknown editor configuration setting', allowTrailingCommas: true, allowComments: true };
|
||||
this.configurationProperties = {};
|
||||
this.excludedConfigurationProperties = {};
|
||||
this.overridePropertyPattern = this.computeOverridePropertyPattern();
|
||||
|
||||
contributionRegistry.registerSchema(editorConfigurationSchemaId, this.editorConfigurationSchema);
|
||||
contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
|
||||
}
|
||||
|
||||
public registerConfiguration(configuration: IConfigurationNode, validate: boolean = true): void {
|
||||
@@ -188,9 +191,9 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
properties.push(...this.validateAndRegisterProperties(configuration, validate)); // fills in defaults
|
||||
this.configurationContributors.push(configuration);
|
||||
this.registerJSONConfiguration(configuration);
|
||||
this.updateSchemaForOverrideSettingsConfiguration(configuration);
|
||||
});
|
||||
|
||||
contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
|
||||
this._onDidSchemaChange.fire();
|
||||
this._onDidUpdateConfiguration.fire(properties);
|
||||
}
|
||||
@@ -203,7 +206,6 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
properties.push(key);
|
||||
|
||||
delete this.configurationProperties[key];
|
||||
delete this.editorConfigurationSchema.properties![key];
|
||||
|
||||
// Delete from schema
|
||||
delete allSettings.properties[key];
|
||||
@@ -221,6 +223,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
delete windowSettings.properties[key];
|
||||
break;
|
||||
case ConfigurationScope.RESOURCE:
|
||||
case ConfigurationScope.RESOURCE_LANGUAGE:
|
||||
delete resourceSettings.properties[key];
|
||||
break;
|
||||
}
|
||||
@@ -238,7 +241,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
contributionRegistry.registerSchema(editorConfigurationSchemaId, this.editorConfigurationSchema);
|
||||
contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
|
||||
this._onDidSchemaChange.fire();
|
||||
this._onDidUpdateConfiguration.fire(properties);
|
||||
}
|
||||
@@ -254,7 +257,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
type: 'object',
|
||||
default: defaultValue,
|
||||
description: nls.localize('overrideSettings.description', "Configure editor settings to be overridden for {0} language.", key),
|
||||
$ref: editorConfigurationSchemaId
|
||||
$ref: resourceLanguageSettingsSchemaId
|
||||
};
|
||||
allSettings.properties[key] = propertySchema;
|
||||
this.defaultOverridesConfigurationNode.properties![key] = propertySchema;
|
||||
@@ -291,9 +294,8 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
this.updateOverridePropertyPatternKey();
|
||||
}
|
||||
|
||||
private validateAndRegisterProperties(configuration: IConfigurationNode, validate: boolean = true, scope: ConfigurationScope = ConfigurationScope.WINDOW, overridable: boolean = false): string[] {
|
||||
private validateAndRegisterProperties(configuration: IConfigurationNode, validate: boolean = true, scope: ConfigurationScope = ConfigurationScope.WINDOW): string[] {
|
||||
scope = types.isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;
|
||||
overridable = configuration.overridable || overridable;
|
||||
let propertyKeys: string[] = [];
|
||||
let properties = configuration.properties;
|
||||
if (properties) {
|
||||
@@ -310,11 +312,6 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
if (types.isUndefined(defaultValue)) {
|
||||
property.default = getDefaultValue(property.type);
|
||||
}
|
||||
// Inherit overridable property from parent
|
||||
if (overridable) {
|
||||
property.overridable = true;
|
||||
}
|
||||
|
||||
if (OVERRIDE_PROPERTY_PATTERN.test(key)) {
|
||||
property.scope = undefined; // No scope for overridable properties `[${identifier}]`
|
||||
} else {
|
||||
@@ -337,7 +334,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
let subNodes = configuration.allOf;
|
||||
if (subNodes) {
|
||||
for (let node of subNodes) {
|
||||
propertyKeys.push(...this.validateAndRegisterProperties(node, validate, scope, overridable));
|
||||
propertyKeys.push(...this.validateAndRegisterProperties(node, validate, scope));
|
||||
}
|
||||
}
|
||||
return propertyKeys;
|
||||
@@ -356,7 +353,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
}
|
||||
|
||||
private registerJSONConfiguration(configuration: IConfigurationNode) {
|
||||
function register(configuration: IConfigurationNode) {
|
||||
const register = (configuration: IConfigurationNode) => {
|
||||
let properties = configuration.properties;
|
||||
if (properties) {
|
||||
for (const key in properties) {
|
||||
@@ -377,6 +374,10 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
case ConfigurationScope.RESOURCE:
|
||||
resourceSettings.properties[key] = properties[key];
|
||||
break;
|
||||
case ConfigurationScope.RESOURCE_LANGUAGE:
|
||||
resourceSettings.properties[key] = properties[key];
|
||||
this.resourceLanguageSettingsSchema.properties![key] = properties[key];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -384,17 +385,10 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
if (subNodes) {
|
||||
subNodes.forEach(register);
|
||||
}
|
||||
}
|
||||
};
|
||||
register(configuration);
|
||||
}
|
||||
|
||||
private updateSchemaForOverrideSettingsConfiguration(configuration: IConfigurationNode): void {
|
||||
if (configuration.id !== SETTINGS_OVERRRIDE_NODE_ID) {
|
||||
this.update(configuration);
|
||||
contributionRegistry.registerSchema(editorConfigurationSchemaId, this.editorConfigurationSchema);
|
||||
}
|
||||
}
|
||||
|
||||
private updateOverridePropertyPatternKey(): void {
|
||||
let patternProperties: IJSONSchema = allSettings.patternProperties[this.overridePropertyPattern];
|
||||
if (!patternProperties) {
|
||||
@@ -402,7 +396,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
type: 'object',
|
||||
description: nls.localize('overrideSettings.defaultDescription', "Configure editor settings to be overridden for a language."),
|
||||
errorMessage: 'Unknown Identifier. Use language identifiers',
|
||||
$ref: editorConfigurationSchemaId
|
||||
$ref: resourceLanguageSettingsSchemaId
|
||||
};
|
||||
}
|
||||
|
||||
@@ -425,27 +419,11 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
||||
this._onDidSchemaChange.fire();
|
||||
}
|
||||
|
||||
private update(configuration: IConfigurationNode): void {
|
||||
let properties = configuration.properties;
|
||||
if (properties) {
|
||||
for (let key in properties) {
|
||||
if (properties[key].overridable) {
|
||||
this.editorConfigurationSchema.properties![key] = this.getConfigurationProperties()[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
let subNodes = configuration.allOf;
|
||||
if (subNodes) {
|
||||
subNodes.forEach(subNode => this.update(subNode));
|
||||
}
|
||||
}
|
||||
|
||||
private computeOverridePropertyPattern(): string {
|
||||
return this.overrideIdentifiers.length ? OVERRIDE_PATTERN_WITH_SUBSTITUTION.replace('${0}', this.overrideIdentifiers.map(identifier => strings.createRegExp(identifier, false).source).join('|')) : OVERRIDE_PROPERTY;
|
||||
}
|
||||
}
|
||||
|
||||
const SETTINGS_OVERRRIDE_NODE_ID = 'override';
|
||||
const OVERRIDE_PROPERTY = '\\[.*\\]$';
|
||||
const OVERRIDE_PATTERN_WITH_SUBSTITUTION = '\\[(${0})\\]$';
|
||||
export const OVERRIDE_PROPERTY_PATTERN = new RegExp(OVERRIDE_PROPERTY);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user