notifications.ts ×25

Frontier kind: Code frontier

unlabeled · c_372f74ea8c3b

2 tests · 8579 LOC · 40 files · introduces 0 tests · 82 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
27 ranges82 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1215 ranges8579 lines · 40 files · Browse complete extent
All tests (intent)
2 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationnotifications.ts ×23 · 137 introduced LOCnotifications.ts ×23notifications.ts ×17 · 59 introduced LOCnotifications.ts ×17notifications.ts ×58 · 436 introduced LOCnotifications.ts ×58errors.ts ×2 · 3 introduced LOCerrors.ts ×2async.ts ×202 · 1247 introduced LOCasync.ts ×202notification.ts ×1 · 5 introduced LOCnotification.ts ×1notification.ts ×3 · 464 introduced LOCnotification.ts ×3actions.ts ×25 · 151 introduced LOCactions.ts ×25resources.ts ×23 · 253 introduced LOCresources.ts ×23severity.ts ×3 · 32 introduced LOCseverity.ts ×3arrays.ts ×1 · 3 introduced LOCarrays.ts ×1arrays.ts ×1 · 2 introduced LOCarrays.ts ×1network.ts ×20 · 292 introduced LOCnetwork.ts ×20strings.test|title=Strings trimWhitespace|occurrence=1 · 0 introduced LOCstrings.test|title=Strin…extpath.ts ×17 · 91 introduced LOCextpath.ts ×17strings.ts ×101 · 542 introduced LOCstrings.ts ×101event.ts ×1 · 2 introduced LOCevent.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1event.ts ×4 · 20 introduced LOCevent.ts ×4event.ts ×2 · 5 introduced LOCevent.ts ×2linkedText.ts ×3 · 39 introduced LOClinkedText.ts ×3decorators.ts ×1 · 4 introduced LOCdecorators.ts ×1event.ts ×2 · 15 introduced LOCevent.ts ×2event.ts ×1 · 1 introduced LOCevent.ts ×1arrays.ts ×2 · 3 introduced LOCarrays.ts ×2event.ts ×5 · 10 introduced LOCevent.ts ×5arrays.ts ×1 · 2 introduced LOCarrays.ts ×1arrays.ts ×2 · 2 introduced LOCarrays.ts ×2cancellation.test|title=CancellationToken None|occurrence=1 · 0 introduced LOCcancellation.test|title=…event.ts ×3 · 6 introduced LOCevent.ts ×3decorators.ts ×5 · 11 introduced LOCdecorators.ts ×5lifecycle.test|title=No Leakage Utilities ensureNoDisposablesAreLeakedInTest Basic Test|occurrence=1 · 0 introduced LOClifecycle.test|title=No …decorators.ts ×5 · 17 introduced LOCdecorators.ts ×5event.ts ×8 · 30 introduced LOCevent.ts ×8event.ts ×3 · 19 introduced LOCevent.ts ×3cancelPreviousCalls.ts ×1 · 87 introduced LOCcancelPreviousCalls.ts ×…cancellation.ts ×18 · 90 introduced LOCcancellation.ts ×18lifecycle.ts ×2 · 3 introduced LOClifecycle.ts ×2lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1, lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1 · 0 introduced LOClifecycle.test|title=Lif…event.ts ×3 · 4 introduced LOCevent.ts ×3event.ts ×1 · 1 introduced LOCevent.ts ×1lifecycle.ts ×3 · 6 introduced LOClifecycle.ts ×3event.ts ×4 · 9 introduced LOCevent.ts ×4event.ts ×2 · 4 introduced LOCevent.ts ×2lifecycle.ts ×2 · 6 introduced LOClifecycle.ts ×2event.ts ×2 · 6 introduced LOCevent.ts ×2event.ts ×93 · 864 introduced LOCevent.ts ×93lifecycle.ts ×1 · 6 introduced LOClifecycle.ts ×1languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication disposes entries no longer in model|occurrence=1 · 0 introduced LOClanguageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication mixed unique and duplicate IDs|occurrence=1, languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication creates new entry when none exists|occurrence=1, +4 · 0 introduced LOClanguageStatusDedupe.tes…uri.test|title=URI URI#file, win-speciale|occurrence=1, charCode.test|title=CharCode has good values|occurrence=1, +2 · 0 introduced LOCuri.test|title=URI URI#f…utils.ts ×3 · 9 introduced LOCutils.ts ×3errorMessage.ts ×6 · 29 introduced LOCerrorMessage.ts ×6lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1linkedList.ts ×13 · 44 introduced LOClinkedList.ts ×13instantiation.ts ×5 · 111 introduced LOCinstantiation.ts ×5lifecycle.ts ×1 · 4 introduced LOClifecycle.ts ×1lifecycle.ts ×2 · 6 introduced LOClifecycle.ts ×2lifecycle.ts ×2 · 4 introduced LOClifecycle.ts ×2lifecycle.ts ×1 · 6 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 1 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1lifecycle.ts ×3 · 9 introduced LOClifecycle.ts ×3lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 7 introduced LOClifecycle.ts ×1lifecycle.ts ×4 · 7 introduced LOClifecycle.ts ×4lifecycle.ts ×4 · 8 introduced LOClifecycle.ts ×4lifecycle.ts ×6 · 16 introduced LOClifecycle.ts ×6lifecycle.ts ×2 · 2 introduced LOClifecycle.ts ×2lazy.ts ×1 · 2 introduced LOClazy.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1lifecycle.ts ×3 · 3 introduced LOClifecycle.ts ×3lazy.ts ×3 · 37 introduced LOClazy.ts ×3lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1uint.ts ×2 · 43 introduced LOCuint.ts ×2iterator.ts ×1 · 2 introduced LOCiterator.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1map.ts ×97 · 3334 introduced LOCmap.ts ×97src/vs/base/common/actions.ts · 294 LOCcommon/actions.tssrc/vs/base/common/arrays.ts · 949 LOCcommon/arrays.tssrc/vs/base/common/arraysFind.ts · 226 LOCcommon/arraysFind.tssrc/vs/base/common/assert.ts · 91 LOCcommon/assert.tssrc/vs/base/common/async.ts · 2749 LOCcommon/async.tssrc/vs/base/common/cache.ts · 153 LOCcommon/cache.tssrc/vs/base/common/cancellation.ts · 206 LOCcommon/cancellation.tssrc/vs/base/common/charCode.ts · 450 LOCcommon/charCode.tssrc/vs/base/common/collections.ts · 176 LOCcommon/collections.tssrc/vs/base/common/decorators.ts · 131 LOCcommon/decorators.tssrc/vs/base/common/decorators/cancelPreviousCalls.ts · 168 LOCdecorators/cancelPreviou…src/vs/base/common/errorMessage.ts · 113 LOCcommon/errorMessage.tssrc/vs/base/common/errors.ts · 357 LOCcommon/errors.tssrc/vs/base/common/event.ts · 1964 LOCcommon/event.tssrc/vs/base/common/extpath.ts · 433 LOCcommon/extpath.tssrc/vs/base/common/functional.ts · 32 LOCcommon/functional.tssrc/vs/base/common/iterator.ts · 194 LOCcommon/iterator.tssrc/vs/base/common/lazy.ts · 57 LOCcommon/lazy.tssrc/vs/base/common/lifecycle.ts · 974 LOCcommon/lifecycle.tssrc/vs/base/common/linkedList.ts · 151 LOCcommon/linkedList.tssrc/vs/base/common/linkedText.ts · 55 LOCcommon/linkedText.tssrc/vs/base/common/map.ts · 1016 LOCcommon/map.tssrc/vs/base/common/marshallingIds.ts · 33 LOCcommon/marshallingIds.tssrc/vs/base/common/network.ts · 440 LOCcommon/network.tssrc/vs/base/common/path.ts · 1589 LOCcommon/path.tssrc/vs/base/common/platform.ts · 281 LOCcommon/platform.tssrc/vs/base/common/process.ts · 76 LOCcommon/process.tssrc/vs/base/common/resources.ts · 444 LOCcommon/resources.tssrc/vs/base/common/severity.ts · 56 LOCcommon/severity.tssrc/vs/base/common/stopwatch.ts · 41 LOCcommon/stopwatch.tssrc/vs/base/common/strings.ts · 1413 LOCcommon/strings.tssrc/vs/base/common/symbols.ts · 9 LOCcommon/symbols.tssrc/vs/base/common/types.ts · 410 LOCcommon/types.tssrc/vs/base/common/uint.ts · 59 LOCcommon/uint.tssrc/vs/base/common/uri.ts · 754 LOCcommon/uri.tssrc/vs/base/test/common/utils.ts · 107 LOCcommon/utils.tssrc/vs/nls.ts · 244 LOCvs/nls.tssrc/vs/platform/instantiation/common/instantiation.ts · 130 LOCcommon/instantiation.tssrc/vs/platform/notification/common/notification.ts · 491 LOCcommon/notification.tssrc/vs/workbench/common/notifications.ts · 818 LOCcommon/notifications.tscancellation.test|title=CancellationToken None|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/cancellation.test|title=CancellationToken None|occurrence=1cancellation.test|title=…charCode.test|title=CharCode has good values|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1charCode.test|title=Char…lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1lifecycle.test|title=Lif…lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1lifecycle.test|title=Lif…lifecycle.test|title=No Leakage Utilities ensureNoDisposablesAreLeakedInTest Basic Test|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/lifecycle.test|title=No Leakage Utilities ensureNoDisposablesAreLeakedInTest Basic Test|occurrence=1lifecycle.test|title=No …path.test|title=Paths (Node Implementation) path|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1path.test|title=Paths (N…strings.test|title=Strings trimWhitespace|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/strings.test|title=Strings trimWhitespace|occurrence=1strings.test|title=Strin…uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1uri.test|title=URI File …uri.test|title=URI URI#file, win-speciale|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1uri.test|title=URI URI#f…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication creates new entry when none exists|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication creates new entry when none exists|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication disposes entries no longer in model|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication disposes entries no longer in model|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate IDs with existing entry - fixed version reuses existing|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate IDs with existing entry - fixed version reuses existing|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - buggy version leaks entry|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - buggy version leaks entry|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - fixed version reuses entry from current update|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - fixed version reuses entry from current update|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication mixed unique and duplicate IDs|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication mixed unique and duplicate IDs|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication reuses existing entry from previous update|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication reuses existing entry from previous update|occurrence=1languageStatusDedupe.tes…notifications.test|title=Notifications Items|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/test/common/notifications.test|title=Notifications Items|occurrence=1notifications.test|title…notifications.test|title=Notifications Model|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/test/common/notifications.test|title=Notifications Model|occurrence=1notifications.test|title…Focused concept · notifications.ts ×25 · 82 introduced LOCnotifications.ts ×25

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

3 files ranked by introduced lines: 82 introduced LOC across 27 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/common/notifications.ts 67 introduced LOC · 25 ranges

Open complete file

368
369 constructor() {
370 > super(); notifications.ts
371 >
372 > this._state = Object.create(null);
373 > }
374
375 get state(): INotificationViewItemProgressState {
378
379 infinite(): void {
380 > if (this._state.infinite) { notifications.ts
381 return;
382 }
384 > this._state.infinite = true;
385 >
386 > this._state.total = undefined;
387 > this._state.worked = undefined;
388 > this._state.done = undefined;
389 >
390 > this._onDidChange.fire();
391 > }
392
393 done(): void {
487 let actions: INotificationActions | undefined;
488 if (notification.actions) {
489 > actions = notification.actions; notifications.ts
490 } else if (isErrorWithActions(notification.message)) {
491 actions = { primary: notification.message.actions };
494 let priority = notification.priority ?? NotificationPriority.DEFAULT;
495 if ((priority === NotificationPriority.DEFAULT || priority === NotificationPriority.OPTIONAL) && severity !== Severity.Error) {
496 > if (filter.global === NotificationsFilter.ERROR) { notifications.ts
497 priority = NotificationPriority.SILENT; // filtered globally
498 > } else if (isNotificationSource(notification.source) && filter.sources.get(notification.source.id) === NotificationsFilter.ERROR) { notifications.ts
499 priority = NotificationPriority.SILENT; // filtered by source
500 }
502
503 return new NotificationViewItem(notification.id, severity, notification.sticky, priority, message, notification.source, notification.progress, actions);
573
574 get canCollapse(): boolean {
575 > return !this.hasActions; notifications.ts
576 > }
577
578 get expanded(): boolean {
606
607 private get hasActions(): boolean {
608 > if (!this._actions) { notifications.ts
609 return false;
610 }
612 > if (!this._actions.primary) {
613 return false;
614 }
616 > return this._actions.primary.length > 0;
617 > }
618
619 get hasProgress(): boolean {
620 > return !!this._progress; notifications.ts
621 > }
622
623 get progress(): INotificationViewItemProgress {
624 > if (!this._progress) { notifications.ts
625 > this._progress = this._register(new NotificationViewItemProgress());
626 > this._register(this._progress.onDidChange(() => this._onDidChangeContent.fire({ kind: NotificationViewItemContentChangeKind.PROGRESS })));
627 > }
628 >
629 > return this._progress;
630 > }
631
632 get message(): INotificationMessage {
633 > return this._message; notifications.ts
634 > }
635
636 get source(): string | undefined {
637 > return typeof this._source === 'string' ? this._source : (this._source ? this._source.label : undefined); notifications.ts
638 > }
639
640 get sourceId(): string | undefined {
643
644 get actions(): INotificationActions | undefined {
645 > return this._actions; notifications.ts
646 > }
647
648 get visible(): boolean {
664 return;
665 }
667 > this._message = message;
668 > this._onDidChangeContent.fire({ kind: NotificationViewItemContentChangeKind.MESSAGE });
669 }
670
671 updateActions(actions?: INotificationActions): void {
672 > this.setActions(actions); notifications.ts
673 > this._onDidChangeContent.fire({ kind: NotificationViewItemContentChangeKind.ACTIONS });
674 > }
675
676 updateVisibility(visible: boolean): void {
683
684 expand(): void {
685 > if (this._expanded || !this.canCollapse) { notifications.ts
686 return;
687 }
689 > this._expanded = true;
690 > this._onDidChangeExpansion.fire();
691 > }
692
693 collapse(skipEvents?: boolean): void {
718
719 equals(other: INotificationViewItem): boolean {
720 > if (this.hasProgress || other.hasProgress) { notifications.ts
721 return false;
722 }
724 > if (typeof this.id === 'string' || typeof other.id === 'string') {
725 return this.id === other.id;
726 }
728 > if (typeof this._source === 'object') {
729 if (this._source.label !== other.source || this._source.id !== other.sourceId) {
730 return false;
731 }
732 > } else if (this._source !== other.source) { notifications.ts
733 > return false;
734 > }
735 >
736 > if (this._message.raw !== other.message.raw) {
737 return false;
738 }
740 > const primaryActions = this._actions?.primary || [];
741 > const otherPrimaryActions = other.actions?.primary || [];
742 > return equals(primaryActions, otherPrimaryActions, (action, otherAction) => (action.id + action.label) === (otherAction.id + otherAction.label));
743 > }
744 }
745
src/vs/platform/notification/common/notification.ts 8 introduced LOC · 1 range

Open complete file

117
118 export function isNotificationSource(thing: unknown): thing is INotificationSource {
119 > if (thing) { notification.ts
120 > const candidate = thing as INotificationSource;
121 >
122 > return typeof candidate.id === 'string' && typeof candidate.label === 'string';
123 > }
124 >
125 > return false;
126 > }
127
128 export interface INotification extends INotificationProperties {
src/vs/base/common/actions.ts 7 introduced LOC · 1 range

Open complete file

72
73 constructor(id: string, label: string = '', cssClass: string = '', enabled: boolean = true, actionCallback?: (event?: unknown) => unknown) {
74 > super(); actions.ts
75 > this._id = id;
76 > this._label = label;
77 > this._cssClass = cssClass;
78 > this._enabled = enabled;
79 > this._actionCallback = actionCallback;
80 > }
81
82 get id(): string {