Path: blob/main/src/vs/workbench/contrib/outline/browser/outline.contribution.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { localize, localize2 } from '../../../../nls.js';6import { IViewsRegistry, Extensions as ViewExtensions } from '../../../common/views.js';7import { OutlinePane } from './outlinePane.js';8import { Registry } from '../../../../platform/registry/common/platform.js';9import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from '../../../../platform/configuration/common/configurationRegistry.js';10import { VIEW_CONTAINER } from '../../files/browser/explorerViewlet.js';11import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js';12import { Codicon } from '../../../../base/common/codicons.js';13import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';14import { OutlineConfigKeys } from '../../../services/outline/browser/outline.js';15import { IOutlinePane } from './outline.js';1617// --- actions1819import './outlineActions.js';2021// --- view2223const outlineViewIcon = registerIcon('outline-view-icon', Codicon.symbolClass, localize('outlineViewIcon', 'View icon of the outline view.'));2425Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry).registerViews([{26id: IOutlinePane.Id,27name: localize2('name', "Outline"),28containerIcon: outlineViewIcon,29ctorDescriptor: new SyncDescriptor(OutlinePane),30canToggleVisibility: true,31canMoveView: true,32hideByDefault: false,33collapsed: true,34order: 2,35weight: 30,36focusCommand: { id: 'outline.focus' }37}], VIEW_CONTAINER);3839// --- configurations4041Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({42'id': 'outline',43'order': 117,44'title': localize('outlineConfigurationTitle', "Outline"),45'type': 'object',46'properties': {47[OutlineConfigKeys.icons]: {48'description': localize('outline.showIcons', "Render Outline elements with icons."),49'type': 'boolean',50'default': true51},52[OutlineConfigKeys.collapseItems]: {53'description': localize('outline.initialState', "Controls whether Outline items are collapsed or expanded."),54'type': 'string',55scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,56'enum': [57'alwaysCollapse',58'alwaysExpand'59],60'enumDescriptions': [61localize('outline.initialState.collapsed', "Collapse all items."),62localize('outline.initialState.expanded', "Expand all items.")63],64'default': 'alwaysExpand'65},66[OutlineConfigKeys.problemsEnabled]: {67'markdownDescription': localize('outline.showProblem', "Show errors and warnings on Outline elements. Overwritten by {0} when it is off.", '`#problems.visibility#`'),68'type': 'boolean',69'default': true70},71[OutlineConfigKeys.problemsColors]: {72'markdownDescription': localize('outline.problem.colors', "Use colors for errors and warnings on Outline elements. Overwritten by {0} when it is off.", '`#problems.visibility#`'),73'type': 'boolean',74'default': true75},76[OutlineConfigKeys.problemsBadges]: {77'markdownDescription': localize('outline.problems.badges', "Use badges for errors and warnings on Outline elements. Overwritten by {0} when it is off.", '`#problems.visibility#`'),78'type': 'boolean',79'default': true80},81'outline.showFiles': {82type: 'boolean',83scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,84default: true,85markdownDescription: localize('filteredTypes.file', "When enabled, Outline shows `file`-symbols.")86},87'outline.showModules': {88type: 'boolean',89scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,90default: true,91markdownDescription: localize('filteredTypes.module', "When enabled, Outline shows `module`-symbols.")92},93'outline.showNamespaces': {94type: 'boolean',95default: true,96scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,97markdownDescription: localize('filteredTypes.namespace', "When enabled, Outline shows `namespace`-symbols.")98},99'outline.showPackages': {100type: 'boolean',101default: true,102scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,103markdownDescription: localize('filteredTypes.package', "When enabled, Outline shows `package`-symbols.")104},105'outline.showClasses': {106type: 'boolean',107default: true,108scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,109markdownDescription: localize('filteredTypes.class', "When enabled, Outline shows `class`-symbols.")110},111'outline.showMethods': {112type: 'boolean',113default: true,114scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,115markdownDescription: localize('filteredTypes.method', "When enabled, Outline shows `method`-symbols.")116},117'outline.showProperties': {118type: 'boolean',119default: true,120scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,121markdownDescription: localize('filteredTypes.property', "When enabled, Outline shows `property`-symbols.")122},123'outline.showFields': {124type: 'boolean',125default: true,126scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,127markdownDescription: localize('filteredTypes.field', "When enabled, Outline shows `field`-symbols.")128},129'outline.showConstructors': {130type: 'boolean',131default: true,132scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,133markdownDescription: localize('filteredTypes.constructor', "When enabled, Outline shows `constructor`-symbols.")134},135'outline.showEnums': {136type: 'boolean',137default: true,138scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,139markdownDescription: localize('filteredTypes.enum', "When enabled, Outline shows `enum`-symbols.")140},141'outline.showInterfaces': {142type: 'boolean',143default: true,144scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,145markdownDescription: localize('filteredTypes.interface', "When enabled, Outline shows `interface`-symbols.")146},147'outline.showFunctions': {148type: 'boolean',149default: true,150scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,151markdownDescription: localize('filteredTypes.function', "When enabled, Outline shows `function`-symbols.")152},153'outline.showVariables': {154type: 'boolean',155default: true,156scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,157markdownDescription: localize('filteredTypes.variable', "When enabled, Outline shows `variable`-symbols.")158},159'outline.showConstants': {160type: 'boolean',161default: true,162scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,163markdownDescription: localize('filteredTypes.constant', "When enabled, Outline shows `constant`-symbols.")164},165'outline.showStrings': {166type: 'boolean',167default: true,168scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,169markdownDescription: localize('filteredTypes.string', "When enabled, Outline shows `string`-symbols.")170},171'outline.showNumbers': {172type: 'boolean',173default: true,174scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,175markdownDescription: localize('filteredTypes.number', "When enabled, Outline shows `number`-symbols.")176},177'outline.showBooleans': {178type: 'boolean',179scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,180default: true,181markdownDescription: localize('filteredTypes.boolean', "When enabled, Outline shows `boolean`-symbols.")182},183'outline.showArrays': {184type: 'boolean',185default: true,186scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,187markdownDescription: localize('filteredTypes.array', "When enabled, Outline shows `array`-symbols.")188},189'outline.showObjects': {190type: 'boolean',191default: true,192scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,193markdownDescription: localize('filteredTypes.object', "When enabled, Outline shows `object`-symbols.")194},195'outline.showKeys': {196type: 'boolean',197default: true,198scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,199markdownDescription: localize('filteredTypes.key', "When enabled, Outline shows `key`-symbols.")200},201'outline.showNull': {202type: 'boolean',203default: true,204scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,205markdownDescription: localize('filteredTypes.null', "When enabled, Outline shows `null`-symbols.")206},207'outline.showEnumMembers': {208type: 'boolean',209default: true,210scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,211markdownDescription: localize('filteredTypes.enumMember', "When enabled, Outline shows `enumMember`-symbols.")212},213'outline.showStructs': {214type: 'boolean',215default: true,216scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,217markdownDescription: localize('filteredTypes.struct', "When enabled, Outline shows `struct`-symbols.")218},219'outline.showEvents': {220type: 'boolean',221default: true,222scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,223markdownDescription: localize('filteredTypes.event', "When enabled, Outline shows `event`-symbols.")224},225'outline.showOperators': {226type: 'boolean',227default: true,228scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,229markdownDescription: localize('filteredTypes.operator', "When enabled, Outline shows `operator`-symbols.")230},231'outline.showTypeParameters': {232type: 'boolean',233default: true,234scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,235markdownDescription: localize('filteredTypes.typeParameter', "When enabled, Outline shows `typeParameter`-symbols.")236}237}238});239240241