From a44092d6f399e2f2b78ae964d7b84d6b43879517 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 20 Jan 2016 12:34:24 +0100 Subject: [PATCH] add object, key, and null as SymbolKind, fixes #2111 --- src/vs/vscode.d.ts | 5 ++++- .../workbench/api/node/extHostTypeConverters.ts | 12 ++++++++++++ src/vs/workbench/api/node/extHostTypes.ts | 3 +++ .../parts/quickopen/browser/gotoSymbolHandler.ts | 2 ++ .../browser/media/gotoSymbolHandler.css | 16 ++++++++++++++++ 5 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index ea2582295ea..d9a4cc5cb6b 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -1453,7 +1453,10 @@ declare namespace vscode { String, Number, Boolean, - Array + Array, + Object, + Key, + Null } /** diff --git a/src/vs/workbench/api/node/extHostTypeConverters.ts b/src/vs/workbench/api/node/extHostTypeConverters.ts index 1cdae6577f7..087cd1949ab 100644 --- a/src/vs/workbench/api/node/extHostTypeConverters.ts +++ b/src/vs/workbench/api/node/extHostTypeConverters.ts @@ -218,6 +218,12 @@ export namespace SymbolKind { return 'number'; case types.SymbolKind.Boolean: return 'boolean'; + case types.SymbolKind.Object: + return 'object'; + case types.SymbolKind.Key: + return 'key'; + case types.SymbolKind.Null: + return 'null'; } return 'property'; } @@ -256,6 +262,12 @@ export namespace SymbolKind { return types.SymbolKind.Number; case 'boolean': return types.SymbolKind.Boolean; + case 'object': + return types.SymbolKind.Object; + case 'key': + return types.SymbolKind.Key; + case 'null': + return types.SymbolKind.Null; } return types.SymbolKind.Property; } diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index caabab72738..6dffeec6958 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -536,6 +536,9 @@ export enum SymbolKind { Number, Boolean, Array, + Object, + Key, + Null } export class SymbolInformation { diff --git a/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts b/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts index c657354eacc..d89ed724db9 100644 --- a/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts @@ -232,6 +232,8 @@ class OutlineModel extends QuickOpenModel { result['array'] = nls.localize('array', "arrays ({0})"); result['number'] = nls.localize('number', "numbers ({0})"); result['boolean'] = nls.localize('boolean', "booleans ({0})"); + result['object'] = nls.localize('object', "objects ({0})"); + result['key'] = nls.localize('key', "keys ({0})"); return result; } } diff --git a/src/vs/workbench/parts/quickopen/browser/media/gotoSymbolHandler.css b/src/vs/workbench/parts/quickopen/browser/media/gotoSymbolHandler.css index f32bdf3168d..0718249a3e2 100644 --- a/src/vs/workbench/parts/quickopen/browser/media/gotoSymbolHandler.css +++ b/src/vs/workbench/parts/quickopen/browser/media/gotoSymbolHandler.css @@ -9,16 +9,19 @@ .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface, +.monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.object, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.namespace, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.package, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum, +.monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.key, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.string, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.array, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.number, +.monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.null, .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.boolean { background-image: url('symbol-sprite.svg'); background-repeat: no-repeat; @@ -30,16 +33,19 @@ .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable { background-position: -22px -4px; } .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class { background-position: -43px -3px; } .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface { background-position: -63px -4px; } +.monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.object, .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.namespace, .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.package, .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module { background-position: -82px -4px; } .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property { background-position: -102px -3px; } .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum { background-position: -122px -3px; } +.monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.key, .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.string { background-position: -202px -3px; } .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule { background-position: -242px -4px; } .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file { background-position: -262px -4px; } .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.array { background-position: -302px -4px; } .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.number { background-position: -322px -4px; } +.monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.null, .monaco-workbench.vs .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.boolean { background-position: -343px -4px; } .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method, @@ -48,16 +54,19 @@ .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable { background-position: -22px -24px; } .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class { background-position: -43px -23px; } .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface { background-position: -63px -24px; } +.monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.object, .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.namespace, .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.package, .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module { background-position: -82px -24px; } .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property { background-position: -102px -23px; } +.monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.key, .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.string { background-position: -202px -23px; } .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum { background-position: -122px -23px; } .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule { background-position: -242px -24px; } .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file { background-position: -262px -24px; } .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.array { background-position: -302px -24px; } .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.number { background-position: -322px -24px; } +.monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.null, .monaco-workbench.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.boolean { background-position: -342px -24px; } /* High Contrast Theming */ @@ -68,16 +77,19 @@ .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface, +.monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.object, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.namespace, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.package, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum, +.monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.key, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.string, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.array, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.number, +.monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.null, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.boolean { background: none; display: inline; @@ -89,16 +101,19 @@ .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface:before, +.monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.object:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.namespace:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.package:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum:before, +.monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.key:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.string:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.array:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.number:before, +.monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.null:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.boolean:before { height: 16px; width: 16px; @@ -126,6 +141,7 @@ content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTExLjUgNGMtMS43NTkgMC0zLjIwNCAxLjMwOC0zLjQ0OSAzaC0zLjEyMmMtLjIyMy0uODYxLS45OTgtMS41LTEuOTI5LTEuNS0xLjEwNCAwLTIgLjg5NS0yIDIgMCAxLjEwNC44OTYgMiAyIDIgLjkzMSAwIDEuNzA2LS42MzkgMS45MjktMS41aDMuMTIyYy4yNDUgMS42OTEgMS42OSAzIDMuNDQ5IDMgMS45MyAwIDMuNS0xLjU3IDMuNS0zLjUgMC0xLjkzMS0xLjU3LTMuNS0zLjUtMy41em0wIDVjLS44MjcgMC0xLjUtLjY3NC0xLjUtMS41IDAtLjgyOC42NzMtMS41IDEuNS0xLjVzMS41LjY3MiAxLjUgMS41YzAgLjgyNi0uNjczIDEuNS0xLjUgMS41eiIvPjwvc3ZnPg=="); } +.monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.object:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.namespace:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.package:before, .monaco-workbench.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module:before { -- GitLab