@codingame/monaco-vscode-extensions-service-override 1.83.8 → 1.83.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/webWorkerExtensionHostIframe.html +123 -0
- package/extensions.d.ts +12 -13
- package/extensions.js +456 -0
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/override/vs/platform/dialogs/common/dialogs.js +8 -0
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +8 -0
- package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +3 -0
- package/package.json +5 -3
- package/tools/url.js +10 -0
- package/tools.js +5 -0
- package/vscode/src/vs/base/common/console.js +59 -0
- package/vscode/src/vs/base/common/prefixTree.js +131 -0
- package/vscode/src/vs/platform/files/common/watcher.js +71 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +27 -0
- package/vscode/src/vs/platform/log/browser/log.js +26 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +98 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +31 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +330 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +174 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents.js +52 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +61 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSlashCommands.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +31 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +107 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +94 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +541 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +80 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +578 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +387 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +102 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +69 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +75 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +249 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +370 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +41 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +411 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +475 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +227 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +317 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +280 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +283 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +33 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +947 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +93 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +118 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +158 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +123 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +188 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +129 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +131 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +341 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +48 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +76 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProfilContentHandlers.js +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +185 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +30 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +463 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +148 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +70 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +50 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +72 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +731 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +412 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +182 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +55 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +313 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +223 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +110 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +61 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +283 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +100 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +135 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +273 -0
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHost.api.impl.d.ts +2 -2
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostConfiguration.d.ts +3 -3
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostExtensionService.d.ts +3 -4
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostManagedSockets.d.ts +2 -2
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTerminalService.d.ts +19 -20
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTunnelService.d.ts +7 -8
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostWorkspace.d.ts +25 -26
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +217 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +57 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +51 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +92 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +648 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +297 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +62 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +109 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadRangeDecorator.js +109 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +331 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +380 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.js +5 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +1196 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsFilterOptions.js +19 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +334 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +543 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +178 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +101 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +57 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +145 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +3 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +73 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +83 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +179 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +5 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +144 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +482 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +6 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +85 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +56 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +110 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +260 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +616 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +309 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +38 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +167 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +80 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +70 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +108 -0
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +506 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +132 -0
- package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +103 -0
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +28 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +25 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +336 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +46 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +283 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +273 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +52 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +1093 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +41 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +25 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +643 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +274 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +58 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +80 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +64 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +49 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +220 -0
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +5 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +79 -0
- package/vscode-proposed.d.ts +0 -3872
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHost.protocol.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostExtensionActivator.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostFileSystemInfo.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostInitDataService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostLocalizationService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostRpcService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostStoragePaths.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTypes.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostUriTransformerService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/worker/extHostExtensionService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/services/search/common/queryBuilder.d.ts +0 -0
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import './media/panel.css.js';
|
|
3
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
4
|
+
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
5
|
+
import { basename } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
6
|
+
import { isDiffEditor, isCodeEditor } from 'monaco-editor/esm/vs/editor/browser/editorBrowser.js';
|
|
7
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
8
|
+
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
9
|
+
import { CommentsModel, ResourceWithCommentThreads, CommentNode } from '../common/commentModel.js';
|
|
10
|
+
import { ICommentService } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentService';
|
|
11
|
+
import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
12
|
+
import { CommandsRegistry } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
13
|
+
import { textLinkForeground, textLinkActiveForeground, focusBorder, textPreformatForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
14
|
+
import { ResourceLabels } from 'vscode/vscode/vs/workbench/browser/labels';
|
|
15
|
+
import { COMMENTS_VIEW_ID, Filter, CommentsList, COMMENTS_VIEW_TITLE } from './commentsTreeViewer.js';
|
|
16
|
+
import { ViewAction, FilterViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
17
|
+
import { IViewsService, IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
18
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
19
|
+
import { RawContextKey, ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
20
|
+
import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
|
|
21
|
+
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
22
|
+
import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
23
|
+
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
24
|
+
import { IUriIdentityService } from 'monaco-editor/esm/vs/platform/uriIdentity/common/uriIdentity.js';
|
|
25
|
+
import { registerAction2, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
26
|
+
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
27
|
+
import { TextModel } from 'monaco-editor/esm/vs/editor/common/model/textModel.js';
|
|
28
|
+
import { CommentsViewFilterFocusContextKey } from './comments.js';
|
|
29
|
+
import { CommentsFilters } from './commentsViewActions.js';
|
|
30
|
+
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
31
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
32
|
+
import { FilterOptions } from './commentsFilterOptions.js';
|
|
33
|
+
import { IActivityService, NumberBadge } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
|
|
34
|
+
import { CommentThreadState } from 'monaco-editor/esm/vs/editor/common/languages.js';
|
|
35
|
+
import { MutableDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
36
|
+
import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
|
|
37
|
+
import { CommentController } from './commentsController.js';
|
|
38
|
+
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
39
|
+
import { registerNavigableContainer } from 'vscode/vscode/vs/workbench/browser/actions/widgetNavigationCommands';
|
|
40
|
+
|
|
41
|
+
const CONTEXT_KEY_HAS_COMMENTS = ( new RawContextKey('commentsView.hasComments', false));
|
|
42
|
+
const CONTEXT_KEY_SOME_COMMENTS_EXPANDED = ( new RawContextKey('commentsView.someCommentsExpanded', false));
|
|
43
|
+
const VIEW_STORAGE_ID = 'commentsViewState';
|
|
44
|
+
function createResourceCommentsIterator(model) {
|
|
45
|
+
return ( Iterable.map(model.resourceCommentThreads, m => {
|
|
46
|
+
const CommentNodeIt = Iterable.from(m.commentThreads);
|
|
47
|
+
const children = ( Iterable.map(CommentNodeIt, r => ({ element: r })));
|
|
48
|
+
return { element: m, children };
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
let CommentsPanel = class CommentsPanel extends FilterViewPane {
|
|
52
|
+
constructor(options, instantiationService, viewDescriptorService, editorService, configurationService, contextKeyService, contextMenuService, keybindingService, openerService, themeService, commentService, telemetryService, uriIdentityService, activityService, storageService) {
|
|
53
|
+
const stateMemento = ( new Memento(VIEW_STORAGE_ID, storageService));
|
|
54
|
+
const viewState = stateMemento.getMemento(1 , 1 );
|
|
55
|
+
super({
|
|
56
|
+
...options,
|
|
57
|
+
filterOptions: {
|
|
58
|
+
placeholder: ( nls.localizeWithPath(
|
|
59
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
60
|
+
'comments.filter.placeholder',
|
|
61
|
+
"Filter (e.g. text, author)"
|
|
62
|
+
)),
|
|
63
|
+
ariaLabel: ( nls.localizeWithPath(
|
|
64
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
65
|
+
'comments.filter.ariaLabel',
|
|
66
|
+
"Filter comments"
|
|
67
|
+
)),
|
|
68
|
+
history: viewState['filterHistory'] || [],
|
|
69
|
+
text: viewState['filter'] || '',
|
|
70
|
+
focusContextKey: CommentsViewFilterFocusContextKey.key
|
|
71
|
+
}
|
|
72
|
+
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
|
73
|
+
this.editorService = editorService;
|
|
74
|
+
this.commentService = commentService;
|
|
75
|
+
this.uriIdentityService = uriIdentityService;
|
|
76
|
+
this.activityService = activityService;
|
|
77
|
+
this.totalComments = 0;
|
|
78
|
+
this.totalUnresolved = 0;
|
|
79
|
+
this.activity = this._register(( new MutableDisposable()));
|
|
80
|
+
this.currentHeight = 0;
|
|
81
|
+
this.currentWidth = 0;
|
|
82
|
+
this.cachedFilterStats = undefined;
|
|
83
|
+
this.onDidChangeVisibility = this.onDidChangeBodyVisibility;
|
|
84
|
+
this.hasCommentsContextKey = CONTEXT_KEY_HAS_COMMENTS.bindTo(contextKeyService);
|
|
85
|
+
this.someCommentsExpandedContextKey = CONTEXT_KEY_SOME_COMMENTS_EXPANDED.bindTo(contextKeyService);
|
|
86
|
+
this.stateMemento = stateMemento;
|
|
87
|
+
this.viewState = viewState;
|
|
88
|
+
this.filters = this._register(( new CommentsFilters({
|
|
89
|
+
showResolved: this.viewState['showResolved'] !== false,
|
|
90
|
+
showUnresolved: this.viewState['showUnresolved'] !== false,
|
|
91
|
+
}, this.contextKeyService)));
|
|
92
|
+
this.filter = ( new Filter(( new FilterOptions(
|
|
93
|
+
this.filterWidget.getFilterText(),
|
|
94
|
+
this.filters.showResolved,
|
|
95
|
+
this.filters.showUnresolved
|
|
96
|
+
))));
|
|
97
|
+
this._register(this.filters.onDidChange((event) => {
|
|
98
|
+
if (event.showResolved || event.showUnresolved) {
|
|
99
|
+
this.updateFilter();
|
|
100
|
+
}
|
|
101
|
+
}));
|
|
102
|
+
this._register(this.filterWidget.onDidChangeFilterText(() => this.updateFilter()));
|
|
103
|
+
}
|
|
104
|
+
updateBadge(unresolved) {
|
|
105
|
+
if (unresolved === this.totalUnresolved) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
this.totalUnresolved = unresolved;
|
|
109
|
+
const message = ( nls.localizeWithPath(
|
|
110
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
111
|
+
'totalUnresolvedComments',
|
|
112
|
+
'{0} Unresolved Comments',
|
|
113
|
+
this.totalUnresolved
|
|
114
|
+
));
|
|
115
|
+
this.activity.value = this.activityService.showViewActivity(this.id, { badge: ( new NumberBadge(this.totalUnresolved, () => message)) });
|
|
116
|
+
}
|
|
117
|
+
saveState() {
|
|
118
|
+
this.viewState['filter'] = this.filterWidget.getFilterText();
|
|
119
|
+
this.viewState['filterHistory'] = this.filterWidget.getHistory();
|
|
120
|
+
this.viewState['showResolved'] = this.filters.showResolved;
|
|
121
|
+
this.viewState['showUnresolved'] = this.filters.showUnresolved;
|
|
122
|
+
this.stateMemento.saveMemento();
|
|
123
|
+
super.saveState();
|
|
124
|
+
}
|
|
125
|
+
render() {
|
|
126
|
+
super.render();
|
|
127
|
+
this._register(registerNavigableContainer({
|
|
128
|
+
focusNotifiers: [this, this.filterWidget],
|
|
129
|
+
focusNextWidget: () => {
|
|
130
|
+
if (this.filterWidget.hasFocus()) {
|
|
131
|
+
this.focus();
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
focusPreviousWidget: () => {
|
|
135
|
+
if (!this.filterWidget.hasFocus()) {
|
|
136
|
+
this.focusFilter();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
focusFilter() {
|
|
142
|
+
this.filterWidget.focus();
|
|
143
|
+
}
|
|
144
|
+
clearFilterText() {
|
|
145
|
+
this.filterWidget.setFilterText('');
|
|
146
|
+
}
|
|
147
|
+
getFilterStats() {
|
|
148
|
+
if (!this.cachedFilterStats) {
|
|
149
|
+
this.cachedFilterStats = {
|
|
150
|
+
total: this.totalComments,
|
|
151
|
+
filtered: this.tree?.getVisibleItemCount() ?? 0
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
return this.cachedFilterStats;
|
|
155
|
+
}
|
|
156
|
+
updateFilter() {
|
|
157
|
+
this.filter.options = ( new FilterOptions(
|
|
158
|
+
this.filterWidget.getFilterText(),
|
|
159
|
+
this.filters.showResolved,
|
|
160
|
+
this.filters.showUnresolved
|
|
161
|
+
));
|
|
162
|
+
this.tree?.filterComments();
|
|
163
|
+
this.cachedFilterStats = undefined;
|
|
164
|
+
const { total, filtered } = this.getFilterStats();
|
|
165
|
+
this.filterWidget.updateBadge(total === filtered || total === 0 ? undefined : ( nls.localizeWithPath(
|
|
166
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
167
|
+
'showing filtered results',
|
|
168
|
+
"Showing {0} of {1}",
|
|
169
|
+
filtered,
|
|
170
|
+
total
|
|
171
|
+
)));
|
|
172
|
+
this.filterWidget.checkMoreFilters(!this.filters.showResolved || !this.filters.showUnresolved);
|
|
173
|
+
}
|
|
174
|
+
renderBody(container) {
|
|
175
|
+
super.renderBody(container);
|
|
176
|
+
container.classList.add('comments-panel');
|
|
177
|
+
const domContainer = dom.append(container, dom.$('.comments-panel-container'));
|
|
178
|
+
this.treeContainer = dom.append(domContainer, dom.$('.tree-container'));
|
|
179
|
+
this.treeContainer.classList.add('file-icon-themable-tree', 'show-file-icons');
|
|
180
|
+
this.commentsModel = ( new CommentsModel());
|
|
181
|
+
this.cachedFilterStats = undefined;
|
|
182
|
+
this.createTree();
|
|
183
|
+
this.createMessageBox(domContainer);
|
|
184
|
+
this._register(this.commentService.onDidSetAllCommentThreads(this.onAllCommentsChanged, this));
|
|
185
|
+
this._register(this.commentService.onDidUpdateCommentThreads(this.onCommentsUpdated, this));
|
|
186
|
+
this._register(this.commentService.onDidDeleteDataProvider(this.onDataProviderDeleted, this));
|
|
187
|
+
const styleElement = dom.createStyleSheet(container);
|
|
188
|
+
this.applyStyles(styleElement);
|
|
189
|
+
this._register(this.themeService.onDidColorThemeChange(_ => this.applyStyles(styleElement)));
|
|
190
|
+
this._register(this.onDidChangeBodyVisibility(visible => {
|
|
191
|
+
if (visible) {
|
|
192
|
+
this.refresh();
|
|
193
|
+
}
|
|
194
|
+
}));
|
|
195
|
+
this.renderComments();
|
|
196
|
+
}
|
|
197
|
+
focus() {
|
|
198
|
+
if (this.tree && this.tree.getHTMLElement() === document.activeElement) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (!this.commentsModel.hasCommentThreads() && this.messageBoxContainer) {
|
|
202
|
+
this.messageBoxContainer.focus();
|
|
203
|
+
}
|
|
204
|
+
else if (this.tree) {
|
|
205
|
+
this.tree.domFocus();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
applyStyles(styleElement) {
|
|
209
|
+
const content = [];
|
|
210
|
+
const theme = this.themeService.getColorTheme();
|
|
211
|
+
const linkColor = theme.getColor(textLinkForeground);
|
|
212
|
+
if (linkColor) {
|
|
213
|
+
content.push(`.comments-panel .comments-panel-container a { color: ${linkColor}; }`);
|
|
214
|
+
}
|
|
215
|
+
const linkActiveColor = theme.getColor(textLinkActiveForeground);
|
|
216
|
+
if (linkActiveColor) {
|
|
217
|
+
content.push(`.comments-panel .comments-panel-container a:hover, a:active { color: ${linkActiveColor}; }`);
|
|
218
|
+
}
|
|
219
|
+
const focusColor = theme.getColor(focusBorder);
|
|
220
|
+
if (focusColor) {
|
|
221
|
+
content.push(`.comments-panel .comments-panel-container a:focus { outline-color: ${focusColor}; }`);
|
|
222
|
+
}
|
|
223
|
+
const codeTextForegroundColor = theme.getColor(textPreformatForeground);
|
|
224
|
+
if (codeTextForegroundColor) {
|
|
225
|
+
content.push(`.comments-panel .comments-panel-container .text code { color: ${codeTextForegroundColor}; }`);
|
|
226
|
+
}
|
|
227
|
+
styleElement.textContent = content.join('\n');
|
|
228
|
+
}
|
|
229
|
+
async renderComments() {
|
|
230
|
+
this.treeContainer.classList.toggle('hidden', !this.commentsModel.hasCommentThreads());
|
|
231
|
+
this.renderMessage();
|
|
232
|
+
await this.tree?.setChildren(null, createResourceCommentsIterator(this.commentsModel));
|
|
233
|
+
}
|
|
234
|
+
collapseAll() {
|
|
235
|
+
if (this.tree) {
|
|
236
|
+
this.tree.collapseAll();
|
|
237
|
+
this.tree.setSelection([]);
|
|
238
|
+
this.tree.setFocus([]);
|
|
239
|
+
this.tree.domFocus();
|
|
240
|
+
this.tree.focusFirst();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
expandAll() {
|
|
244
|
+
if (this.tree) {
|
|
245
|
+
this.tree.expandAll();
|
|
246
|
+
this.tree.setSelection([]);
|
|
247
|
+
this.tree.setFocus([]);
|
|
248
|
+
this.tree.domFocus();
|
|
249
|
+
this.tree.focusFirst();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
get hasRendered() {
|
|
253
|
+
return !!this.tree;
|
|
254
|
+
}
|
|
255
|
+
layoutBodyContent(height = this.currentHeight, width = this.currentWidth) {
|
|
256
|
+
if (this.messageBoxContainer) {
|
|
257
|
+
this.messageBoxContainer.style.height = `${height}px`;
|
|
258
|
+
}
|
|
259
|
+
this.tree?.layout(height, width);
|
|
260
|
+
this.currentHeight = height;
|
|
261
|
+
this.currentWidth = width;
|
|
262
|
+
}
|
|
263
|
+
createMessageBox(parent) {
|
|
264
|
+
this.messageBoxContainer = dom.append(parent, dom.$('.message-box-container'));
|
|
265
|
+
this.messageBoxContainer.setAttribute('tabIndex', '0');
|
|
266
|
+
}
|
|
267
|
+
renderMessage() {
|
|
268
|
+
this.messageBoxContainer.textContent = this.commentsModel.getMessage();
|
|
269
|
+
this.messageBoxContainer.classList.toggle('hidden', this.commentsModel.hasCommentThreads());
|
|
270
|
+
}
|
|
271
|
+
createTree() {
|
|
272
|
+
this.treeLabels = this._register(this.instantiationService.createInstance(ResourceLabels, this));
|
|
273
|
+
this.tree = this._register(this.instantiationService.createInstance(CommentsList, this.treeLabels, this.treeContainer, {
|
|
274
|
+
overrideStyles: { listBackground: this.getBackgroundColor() },
|
|
275
|
+
selectionNavigation: true,
|
|
276
|
+
filter: this.filter,
|
|
277
|
+
keyboardNavigationLabelProvider: {
|
|
278
|
+
getKeyboardNavigationLabel: (item) => {
|
|
279
|
+
return undefined;
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
accessibilityProvider: {
|
|
283
|
+
getAriaLabel(element) {
|
|
284
|
+
if (element instanceof CommentsModel) {
|
|
285
|
+
return ( nls.localizeWithPath(
|
|
286
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
287
|
+
'rootCommentsLabel',
|
|
288
|
+
"Comments for current workspace"
|
|
289
|
+
));
|
|
290
|
+
}
|
|
291
|
+
if (element instanceof ResourceWithCommentThreads) {
|
|
292
|
+
return ( nls.localizeWithPath(
|
|
293
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
294
|
+
'resourceWithCommentThreadsLabel',
|
|
295
|
+
"Comments in {0}, full path {1}",
|
|
296
|
+
basename(element.resource),
|
|
297
|
+
element.resource.fsPath
|
|
298
|
+
));
|
|
299
|
+
}
|
|
300
|
+
if (element instanceof CommentNode) {
|
|
301
|
+
if (element.range) {
|
|
302
|
+
return ( nls.localizeWithPath(
|
|
303
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
304
|
+
'resourceWithCommentLabel',
|
|
305
|
+
"Comment from ${0} at line {1} column {2} in {3}, source: {4}",
|
|
306
|
+
element.comment.userName,
|
|
307
|
+
element.range.startLineNumber,
|
|
308
|
+
element.range.startColumn,
|
|
309
|
+
basename(element.resource),
|
|
310
|
+
(typeof element.comment.body === 'string') ? element.comment.body : element.comment.body.value
|
|
311
|
+
));
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
return ( nls.localizeWithPath(
|
|
315
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
316
|
+
'resourceWithCommentLabelFile',
|
|
317
|
+
"Comment from ${0} in {1}, source: {2}",
|
|
318
|
+
element.comment.userName,
|
|
319
|
+
basename(element.resource),
|
|
320
|
+
(typeof element.comment.body === 'string') ? element.comment.body : element.comment.body.value
|
|
321
|
+
));
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return '';
|
|
325
|
+
},
|
|
326
|
+
getWidgetAriaLabel() {
|
|
327
|
+
return COMMENTS_VIEW_TITLE;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}));
|
|
331
|
+
this._register(this.tree.onDidOpen(e => {
|
|
332
|
+
this.openFile(e.element, e.editorOptions.pinned, e.editorOptions.preserveFocus, e.sideBySide);
|
|
333
|
+
}));
|
|
334
|
+
this._register(this.tree.onDidChangeModel(() => {
|
|
335
|
+
this.updateSomeCommentsExpanded();
|
|
336
|
+
}));
|
|
337
|
+
this._register(this.tree.onDidChangeCollapseState(() => {
|
|
338
|
+
this.updateSomeCommentsExpanded();
|
|
339
|
+
}));
|
|
340
|
+
}
|
|
341
|
+
openFile(element, pinned, preserveFocus, sideBySide) {
|
|
342
|
+
if (!element) {
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
if (!(element instanceof ResourceWithCommentThreads || element instanceof CommentNode)) {
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
if (!this.commentService.isCommentingEnabled) {
|
|
349
|
+
this.commentService.enableCommenting(true);
|
|
350
|
+
}
|
|
351
|
+
const range = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].range : element.range;
|
|
352
|
+
const activeEditor = this.editorService.activeTextEditorControl;
|
|
353
|
+
const currentActiveResources = isDiffEditor(activeEditor) ? [activeEditor.getOriginalEditor(), activeEditor.getModifiedEditor()]
|
|
354
|
+
: (activeEditor ? [activeEditor] : []);
|
|
355
|
+
for (const editor of currentActiveResources) {
|
|
356
|
+
const model = editor.getModel();
|
|
357
|
+
if ((model instanceof TextModel) && this.uriIdentityService.extUri.isEqual(element.resource, model.uri)) {
|
|
358
|
+
const threadToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].threadId : element.threadId;
|
|
359
|
+
const commentToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].comment.uniqueIdInThread : element.comment.uniqueIdInThread;
|
|
360
|
+
if (threadToReveal && isCodeEditor(editor)) {
|
|
361
|
+
const controller = CommentController.get(editor);
|
|
362
|
+
controller?.revealCommentThread(threadToReveal, commentToReveal, true, !preserveFocus);
|
|
363
|
+
}
|
|
364
|
+
return true;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
const threadToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].threadId : element.threadId;
|
|
368
|
+
const commentToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].comment : element.comment;
|
|
369
|
+
this.editorService.openEditor({
|
|
370
|
+
resource: element.resource,
|
|
371
|
+
options: {
|
|
372
|
+
pinned: pinned,
|
|
373
|
+
preserveFocus: preserveFocus,
|
|
374
|
+
selection: range ?? ( new Range(1, 1, 1, 1))
|
|
375
|
+
}
|
|
376
|
+
}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP).then(editor => {
|
|
377
|
+
if (editor) {
|
|
378
|
+
const control = editor.getControl();
|
|
379
|
+
if (threadToReveal && isCodeEditor(control)) {
|
|
380
|
+
const controller = CommentController.get(control);
|
|
381
|
+
controller?.revealCommentThread(threadToReveal, commentToReveal.uniqueIdInThread, true, !preserveFocus);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
387
|
+
async refresh() {
|
|
388
|
+
if (!this.tree) {
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
if (this.isVisible()) {
|
|
392
|
+
this.hasCommentsContextKey.set(this.commentsModel.hasCommentThreads());
|
|
393
|
+
this.treeContainer.classList.toggle('hidden', !this.commentsModel.hasCommentThreads());
|
|
394
|
+
this.cachedFilterStats = undefined;
|
|
395
|
+
this.renderMessage();
|
|
396
|
+
this.tree?.setChildren(null, createResourceCommentsIterator(this.commentsModel));
|
|
397
|
+
if (this.tree.getSelection().length === 0 && this.commentsModel.hasCommentThreads()) {
|
|
398
|
+
const firstComment = this.commentsModel.resourceCommentThreads[0].commentThreads[0];
|
|
399
|
+
if (firstComment) {
|
|
400
|
+
this.tree.setFocus([firstComment]);
|
|
401
|
+
this.tree.setSelection([firstComment]);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
onAllCommentsChanged(e) {
|
|
407
|
+
this.cachedFilterStats = undefined;
|
|
408
|
+
this.commentsModel.setCommentThreads(e.ownerId, e.commentThreads);
|
|
409
|
+
this.totalComments += e.commentThreads.length;
|
|
410
|
+
let unresolved = 0;
|
|
411
|
+
for (const thread of e.commentThreads) {
|
|
412
|
+
if (thread.state === CommentThreadState.Unresolved) {
|
|
413
|
+
unresolved++;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
this.updateBadge(unresolved);
|
|
417
|
+
this.refresh();
|
|
418
|
+
}
|
|
419
|
+
onCommentsUpdated(e) {
|
|
420
|
+
this.cachedFilterStats = undefined;
|
|
421
|
+
const didUpdate = this.commentsModel.updateCommentThreads(e);
|
|
422
|
+
this.totalComments += e.added.length;
|
|
423
|
+
this.totalComments -= e.removed.length;
|
|
424
|
+
let unresolved = 0;
|
|
425
|
+
for (const resource of this.commentsModel.resourceCommentThreads) {
|
|
426
|
+
for (const thread of resource.commentThreads) {
|
|
427
|
+
if (thread.threadState === CommentThreadState.Unresolved) {
|
|
428
|
+
unresolved++;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
this.updateBadge(unresolved);
|
|
433
|
+
if (didUpdate) {
|
|
434
|
+
this.refresh();
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
onDataProviderDeleted(owner) {
|
|
438
|
+
this.cachedFilterStats = undefined;
|
|
439
|
+
this.commentsModel.deleteCommentsByOwner(owner);
|
|
440
|
+
this.totalComments = 0;
|
|
441
|
+
this.refresh();
|
|
442
|
+
}
|
|
443
|
+
updateSomeCommentsExpanded() {
|
|
444
|
+
this.someCommentsExpandedContextKey.set(this.isSomeCommentsExpanded());
|
|
445
|
+
}
|
|
446
|
+
areAllCommentsExpanded() {
|
|
447
|
+
if (!this.tree) {
|
|
448
|
+
return false;
|
|
449
|
+
}
|
|
450
|
+
const navigator = this.tree.navigate();
|
|
451
|
+
while (navigator.next()) {
|
|
452
|
+
if (this.tree.isCollapsed(navigator.current())) {
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return true;
|
|
457
|
+
}
|
|
458
|
+
isSomeCommentsExpanded() {
|
|
459
|
+
if (!this.tree) {
|
|
460
|
+
return false;
|
|
461
|
+
}
|
|
462
|
+
const navigator = this.tree.navigate();
|
|
463
|
+
while (navigator.next()) {
|
|
464
|
+
if (!this.tree.isCollapsed(navigator.current())) {
|
|
465
|
+
return true;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
return false;
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
CommentsPanel = ( __decorate([
|
|
472
|
+
( __param(1, IInstantiationService)),
|
|
473
|
+
( __param(2, IViewDescriptorService)),
|
|
474
|
+
( __param(3, IEditorService)),
|
|
475
|
+
( __param(4, IConfigurationService)),
|
|
476
|
+
( __param(5, IContextKeyService)),
|
|
477
|
+
( __param(6, IContextMenuService)),
|
|
478
|
+
( __param(7, IKeybindingService)),
|
|
479
|
+
( __param(8, IOpenerService)),
|
|
480
|
+
( __param(9, IThemeService)),
|
|
481
|
+
( __param(10, ICommentService)),
|
|
482
|
+
( __param(11, ITelemetryService)),
|
|
483
|
+
( __param(12, IUriIdentityService)),
|
|
484
|
+
( __param(13, IActivityService)),
|
|
485
|
+
( __param(14, IStorageService))
|
|
486
|
+
], CommentsPanel));
|
|
487
|
+
CommandsRegistry.registerCommand({
|
|
488
|
+
id: 'workbench.action.focusCommentsPanel',
|
|
489
|
+
handler: async (accessor) => {
|
|
490
|
+
const viewsService = accessor.get(IViewsService);
|
|
491
|
+
viewsService.openView(COMMENTS_VIEW_ID, true);
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
registerAction2(class Collapse extends ViewAction {
|
|
495
|
+
constructor() {
|
|
496
|
+
super({
|
|
497
|
+
viewId: COMMENTS_VIEW_ID,
|
|
498
|
+
id: 'comments.collapse',
|
|
499
|
+
title: ( nls.localizeWithPath(
|
|
500
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
501
|
+
'collapseAll',
|
|
502
|
+
"Collapse All"
|
|
503
|
+
)),
|
|
504
|
+
f1: false,
|
|
505
|
+
icon: Codicon.collapseAll,
|
|
506
|
+
menu: {
|
|
507
|
+
id: MenuId.ViewTitle,
|
|
508
|
+
group: 'navigation',
|
|
509
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.and(( ContextKeyExpr.equals('view', COMMENTS_VIEW_ID)), CONTEXT_KEY_HAS_COMMENTS)), CONTEXT_KEY_SOME_COMMENTS_EXPANDED)),
|
|
510
|
+
order: 100
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
runInView(_accessor, view) {
|
|
515
|
+
view.collapseAll();
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
registerAction2(class Expand extends ViewAction {
|
|
519
|
+
constructor() {
|
|
520
|
+
super({
|
|
521
|
+
viewId: COMMENTS_VIEW_ID,
|
|
522
|
+
id: 'comments.expand',
|
|
523
|
+
title: ( nls.localizeWithPath(
|
|
524
|
+
'vs/workbench/contrib/comments/browser/commentsView',
|
|
525
|
+
'expandAll',
|
|
526
|
+
"Expand All"
|
|
527
|
+
)),
|
|
528
|
+
f1: false,
|
|
529
|
+
icon: Codicon.expandAll,
|
|
530
|
+
menu: {
|
|
531
|
+
id: MenuId.ViewTitle,
|
|
532
|
+
group: 'navigation',
|
|
533
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.and(( ContextKeyExpr.equals('view', COMMENTS_VIEW_ID)), CONTEXT_KEY_HAS_COMMENTS)), ContextKeyExpr.not(CONTEXT_KEY_SOME_COMMENTS_EXPANDED.key))),
|
|
534
|
+
order: 100
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
runInView(_accessor, view) {
|
|
539
|
+
view.expandAll();
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
export { CommentsPanel };
|