From 3c136df8a2610ed49bb5b535500b028e451f2c2a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 25 Mar 2019 07:56:48 +0100 Subject: [PATCH] move comments to browser (#70319, #69103) (#70939) --- .../mainThreadComments.ts | 6 +++--- .../electron-browser/extensionHost.contribution.ts | 2 +- .../commentGlyphWidget.ts | 0 .../{electron-browser => browser}/commentNode.ts | 4 ++-- .../{electron-browser => browser}/commentService.ts | 2 +- .../commentThreadWidget.ts | 6 +++--- .../comments.contribution.ts | 4 ++-- .../commentsEditorContribution.ts | 11 +++++------ .../{electron-browser => browser}/commentsPanel.ts | 6 +++--- .../commentsTreeViewer.ts | 0 .../{electron-browser => browser}/media/close.svg | 0 .../{electron-browser => browser}/media/comment.svg | 0 .../{electron-browser => browser}/media/panel.css | 0 .../media/reaction-dark.svg | 0 .../media/reaction-hc.svg | 0 .../{electron-browser => browser}/media/reaction.svg | 0 .../{electron-browser => browser}/media/review.css | 0 .../{electron-browser => browser}/reactionsAction.ts | 0 .../simpleCommentEditor.ts | 0 src/vs/workbench/workbench.main.ts | 2 +- src/vs/workbench/workbench.nodeless.main.ts | 2 +- 21 files changed, 22 insertions(+), 23 deletions(-) rename src/vs/workbench/api/{electron-browser => browser}/mainThreadComments.ts (99%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/commentGlyphWidget.ts (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/commentNode.ts (99%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/commentService.ts (99%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/commentThreadWidget.ts (99%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/comments.contribution.ts (91%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/commentsEditorContribution.ts (98%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/commentsPanel.ts (98%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/commentsTreeViewer.ts (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/media/close.svg (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/media/comment.svg (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/media/panel.css (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/media/reaction-dark.svg (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/media/reaction-hc.svg (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/media/reaction.svg (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/media/review.css (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/reactionsAction.ts (100%) rename src/vs/workbench/contrib/comments/{electron-browser => browser}/simpleCommentEditor.ts (100%) diff --git a/src/vs/workbench/api/electron-browser/mainThreadComments.ts b/src/vs/workbench/api/browser/mainThreadComments.ts similarity index 99% rename from src/vs/workbench/api/electron-browser/mainThreadComments.ts rename to src/vs/workbench/api/browser/mainThreadComments.ts index da1861194d3..e6c8308738d 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadComments.ts +++ b/src/vs/workbench/api/browser/mainThreadComments.ts @@ -11,14 +11,14 @@ import { keys } from 'vs/base/common/map'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { ExtHostCommentsShape, ExtHostContext, IExtHostContext, MainContext, MainThreadCommentsShape, CommentProviderFeatures } from '../common/extHost.protocol'; -import { ICommentService, ICommentInfo } from 'vs/workbench/contrib/comments/electron-browser/commentService'; -import { COMMENTS_PANEL_ID, CommentsPanel, COMMENTS_PANEL_TITLE } from 'vs/workbench/contrib/comments/electron-browser/commentsPanel'; +import { ICommentService, ICommentInfo } from 'vs/workbench/contrib/comments/browser/commentService'; +import { COMMENTS_PANEL_ID, CommentsPanel, COMMENTS_PANEL_TITLE } from 'vs/workbench/contrib/comments/browser/commentsPanel'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { URI, UriComponents } from 'vs/base/common/uri'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { generateUuid } from 'vs/base/common/uuid'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ICommentsConfiguration } from 'vs/workbench/contrib/comments/electron-browser/comments.contribution'; +import { ICommentsConfiguration } from 'vs/workbench/contrib/comments/browser/comments.contribution'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { Registry } from 'vs/platform/registry/common/platform'; import { PanelRegistry, Extensions as PanelExtensions, PanelDescriptor } from 'vs/workbench/browser/panel'; diff --git a/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts index 11cc8759d9f..8bf6243507c 100644 --- a/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts +++ b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts @@ -50,7 +50,7 @@ import '../browser/mainThreadTreeViews'; import '../browser/mainThreadUrls'; import '../browser/mainThreadWindow'; import '../browser/mainThreadWorkspace'; -import './mainThreadComments'; +import '../browser/mainThreadComments'; import '../browser/mainThreadTask'; import './mainThreadWebview'; import 'vs/workbench/api/node/apiCommands'; diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentGlyphWidget.ts b/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.ts similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/commentGlyphWidget.ts rename to src/vs/workbench/contrib/comments/browser/commentGlyphWidget.ts diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts b/src/vs/workbench/contrib/comments/browser/commentNode.ts similarity index 99% rename from src/vs/workbench/contrib/comments/electron-browser/commentNode.ts rename to src/vs/workbench/contrib/comments/browser/commentNode.ts index 222c0229959..0b8e2d9ee3e 100644 --- a/src/vs/workbench/contrib/comments/electron-browser/commentNode.ts +++ b/src/vs/workbench/contrib/comments/browser/commentNode.ts @@ -19,8 +19,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { inputValidationErrorBorder } from 'vs/platform/theme/common/colorRegistry'; import { attachButtonStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { ICommentService } from 'vs/workbench/contrib/comments/electron-browser/commentService'; -import { SimpleCommentEditor } from 'vs/workbench/contrib/comments/electron-browser/simpleCommentEditor'; +import { ICommentService } from 'vs/workbench/contrib/comments/browser/commentService'; +import { SimpleCommentEditor } from 'vs/workbench/contrib/comments/browser/simpleCommentEditor'; import { Selection } from 'vs/editor/common/core/selection'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { Emitter, Event } from 'vs/base/common/event'; diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentService.ts b/src/vs/workbench/contrib/comments/browser/commentService.ts similarity index 99% rename from src/vs/workbench/contrib/comments/electron-browser/commentService.ts rename to src/vs/workbench/contrib/comments/browser/commentService.ts index 01d33ebb25a..c2184099a52 100644 --- a/src/vs/workbench/contrib/comments/electron-browser/commentService.ts +++ b/src/vs/workbench/contrib/comments/browser/commentService.ts @@ -13,7 +13,7 @@ import { keys } from 'vs/base/common/map'; import { CancellationToken } from 'vs/base/common/cancellation'; import { assign } from 'vs/base/common/objects'; import { ICommentThreadChangedEvent } from 'vs/workbench/contrib/comments/common/commentModel'; -import { MainThreadCommentController } from 'vs/workbench/api/electron-browser/mainThreadComments'; +import { MainThreadCommentController } from 'vs/workbench/api/browser/mainThreadComments'; export const ICommentService = createDecorator('commentService'); diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts similarity index 99% rename from src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts rename to src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts index 502fb85a5fb..1d7a56402bc 100644 --- a/src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts @@ -19,20 +19,20 @@ import { peekViewBorder } from 'vs/editor/contrib/referenceSearch/referencesWidg import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/zoneWidget'; import { attachButtonStyler } from 'vs/platform/theme/common/styler'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { CommentGlyphWidget } from 'vs/workbench/contrib/comments/electron-browser/commentGlyphWidget'; +import { CommentGlyphWidget } from 'vs/workbench/contrib/comments/browser/commentGlyphWidget'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IModelService } from 'vs/editor/common/services/modelService'; import { SimpleCommentEditor } from './simpleCommentEditor'; import { URI } from 'vs/base/common/uri'; import { transparent, editorForeground, textLinkActiveForeground, textLinkForeground, focusBorder, textBlockQuoteBackground, textBlockQuoteBorder, contrastBorder, inputValidationErrorBorder, inputValidationErrorBackground, inputValidationErrorForeground } from 'vs/platform/theme/common/colorRegistry'; import { IModeService } from 'vs/editor/common/services/modeService'; -import { ICommentService } from 'vs/workbench/contrib/comments/electron-browser/commentService'; +import { ICommentService } from 'vs/workbench/contrib/comments/browser/commentService'; import { Range, IRange } from 'vs/editor/common/core/range'; import { IPosition } from 'vs/editor/common/core/position'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { MarkdownRenderer } from 'vs/editor/contrib/markdown/markdownRenderer'; import { IMarginData } from 'vs/editor/browser/controller/mouseTarget'; -import { CommentNode } from 'vs/workbench/contrib/comments/electron-browser/commentNode'; +import { CommentNode } from 'vs/workbench/contrib/comments/browser/commentNode'; import { ITextModel } from 'vs/editor/common/model'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { generateUuid } from 'vs/base/common/uuid'; diff --git a/src/vs/workbench/contrib/comments/electron-browser/comments.contribution.ts b/src/vs/workbench/contrib/comments/browser/comments.contribution.ts similarity index 91% rename from src/vs/workbench/contrib/comments/electron-browser/comments.contribution.ts rename to src/vs/workbench/contrib/comments/browser/comments.contribution.ts index 4c00b71e1f3..4c04857f026 100644 --- a/src/vs/workbench/contrib/comments/electron-browser/comments.contribution.ts +++ b/src/vs/workbench/contrib/comments/browser/comments.contribution.ts @@ -6,8 +6,8 @@ import * as nls from 'vs/nls'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { Registry } from 'vs/platform/registry/common/platform'; -import 'vs/workbench/contrib/comments/electron-browser/commentsEditorContribution'; -import { ICommentService, CommentService } from 'vs/workbench/contrib/comments/electron-browser/commentService'; +import 'vs/workbench/contrib/comments/browser/commentsEditorContribution'; +import { ICommentService, CommentService } from 'vs/workbench/contrib/comments/browser/commentService'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; export interface ICommentsConfiguration { diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentsEditorContribution.ts b/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts similarity index 98% rename from src/vs/workbench/contrib/comments/electron-browser/commentsEditorContribution.ts rename to src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts index c02a51777b0..d2c98dc731e 100644 --- a/src/vs/workbench/contrib/comments/electron-browser/commentsEditorContribution.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts @@ -21,20 +21,19 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { editorForeground } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { CommentThreadCollapsibleState } from 'vs/workbench/api/node/extHostTypes'; -import { ReviewZoneWidget, COMMENTEDITOR_DECORATION_KEY } from 'vs/workbench/contrib/comments/electron-browser/commentThreadWidget'; -import { ICommentService, ICommentInfo } from 'vs/workbench/contrib/comments/electron-browser/commentService'; +import { ReviewZoneWidget, COMMENTEDITOR_DECORATION_KEY } from 'vs/workbench/contrib/comments/browser/commentThreadWidget'; +import { ICommentService, ICommentInfo } from 'vs/workbench/contrib/comments/browser/commentService'; import { ModelDecorationOptions } from 'vs/editor/common/model/textModel'; import { IModelDecorationOptions } from 'vs/editor/common/model'; import { IMarginData } from 'vs/editor/browser/controller/mouseTarget'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { CancelablePromise, createCancelablePromise, Delayer } from 'vs/base/common/async'; -import { overviewRulerCommentingRangeForeground } from 'vs/workbench/contrib/comments/electron-browser/commentGlyphWidget'; +import { overviewRulerCommentingRangeForeground } from 'vs/workbench/contrib/comments/browser/commentGlyphWidget'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND } from 'vs/workbench/common/theme'; import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { ctxCommentEditorFocused, SimpleCommentEditor } from 'vs/workbench/contrib/comments/electron-browser/simpleCommentEditor'; +import { ctxCommentEditorFocused, SimpleCommentEditor } from 'vs/workbench/contrib/comments/browser/simpleCommentEditor'; import { onUnexpectedError } from 'vs/base/common/errors'; export const ctxCommentThreadVisible = new RawContextKey('commentThreadVisible', false); @@ -472,7 +471,7 @@ export class ReviewController implements IEditorContribution { endColumn: 0 }, reply: replyCommand, - collapsibleState: CommentThreadCollapsibleState.Expanded, + collapsibleState: modes.CommentThreadCollapsibleState.Expanded, }, pendingComment, draftMode); this.localToDispose.push(this._newCommentWidget!.onDidClose(e => { diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentsPanel.ts b/src/vs/workbench/contrib/comments/browser/commentsPanel.ts similarity index 98% rename from src/vs/workbench/contrib/comments/electron-browser/commentsPanel.ts rename to src/vs/workbench/contrib/comments/browser/commentsPanel.ts index e011cd536aa..4e6add6e0f0 100644 --- a/src/vs/workbench/contrib/comments/electron-browser/commentsPanel.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsPanel.ts @@ -15,9 +15,9 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Panel } from 'vs/workbench/browser/panel'; import { CommentNode, CommentsModel, ResourceWithCommentThreads, ICommentThreadChangedEvent } from 'vs/workbench/contrib/comments/common/commentModel'; -import { ReviewController } from 'vs/workbench/contrib/comments/electron-browser/commentsEditorContribution'; -import { CommentsDataFilter, CommentsDataSource, CommentsModelRenderer } from 'vs/workbench/contrib/comments/electron-browser/commentsTreeViewer'; -import { ICommentService, IWorkspaceCommentThreadsEvent } from 'vs/workbench/contrib/comments/electron-browser/commentService'; +import { ReviewController } from 'vs/workbench/contrib/comments/browser/commentsEditorContribution'; +import { CommentsDataFilter, CommentsDataSource, CommentsModelRenderer } from 'vs/workbench/contrib/comments/browser/commentsTreeViewer'; +import { ICommentService, IWorkspaceCommentThreadsEvent } from 'vs/workbench/contrib/comments/browser/commentService'; import { IEditorService, ACTIVE_GROUP, SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { textLinkForeground, textLinkActiveForeground, focusBorder, textPreformatForeground } from 'vs/platform/theme/common/colorRegistry'; diff --git a/src/vs/workbench/contrib/comments/electron-browser/commentsTreeViewer.ts b/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/commentsTreeViewer.ts rename to src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts diff --git a/src/vs/workbench/contrib/comments/electron-browser/media/close.svg b/src/vs/workbench/contrib/comments/browser/media/close.svg similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/media/close.svg rename to src/vs/workbench/contrib/comments/browser/media/close.svg diff --git a/src/vs/workbench/contrib/comments/electron-browser/media/comment.svg b/src/vs/workbench/contrib/comments/browser/media/comment.svg similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/media/comment.svg rename to src/vs/workbench/contrib/comments/browser/media/comment.svg diff --git a/src/vs/workbench/contrib/comments/electron-browser/media/panel.css b/src/vs/workbench/contrib/comments/browser/media/panel.css similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/media/panel.css rename to src/vs/workbench/contrib/comments/browser/media/panel.css diff --git a/src/vs/workbench/contrib/comments/electron-browser/media/reaction-dark.svg b/src/vs/workbench/contrib/comments/browser/media/reaction-dark.svg similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/media/reaction-dark.svg rename to src/vs/workbench/contrib/comments/browser/media/reaction-dark.svg diff --git a/src/vs/workbench/contrib/comments/electron-browser/media/reaction-hc.svg b/src/vs/workbench/contrib/comments/browser/media/reaction-hc.svg similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/media/reaction-hc.svg rename to src/vs/workbench/contrib/comments/browser/media/reaction-hc.svg diff --git a/src/vs/workbench/contrib/comments/electron-browser/media/reaction.svg b/src/vs/workbench/contrib/comments/browser/media/reaction.svg similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/media/reaction.svg rename to src/vs/workbench/contrib/comments/browser/media/reaction.svg diff --git a/src/vs/workbench/contrib/comments/electron-browser/media/review.css b/src/vs/workbench/contrib/comments/browser/media/review.css similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/media/review.css rename to src/vs/workbench/contrib/comments/browser/media/review.css diff --git a/src/vs/workbench/contrib/comments/electron-browser/reactionsAction.ts b/src/vs/workbench/contrib/comments/browser/reactionsAction.ts similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/reactionsAction.ts rename to src/vs/workbench/contrib/comments/browser/reactionsAction.ts diff --git a/src/vs/workbench/contrib/comments/electron-browser/simpleCommentEditor.ts b/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.ts similarity index 100% rename from src/vs/workbench/contrib/comments/electron-browser/simpleCommentEditor.ts rename to src/vs/workbench/contrib/comments/browser/simpleCommentEditor.ts diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index 06fdac8e79d..9f470dd545c 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -227,7 +227,7 @@ import 'vs/workbench/contrib/debug/browser/debugViewlet'; import 'vs/workbench/contrib/markers/browser/markers.contribution'; // Comments -import 'vs/workbench/contrib/comments/electron-browser/comments.contribution'; +import 'vs/workbench/contrib/comments/browser/comments.contribution'; // URL Support import 'vs/workbench/contrib/url/common/url.contribution'; diff --git a/src/vs/workbench/workbench.nodeless.main.ts b/src/vs/workbench/workbench.nodeless.main.ts index 2d428598538..c714cd6dd93 100644 --- a/src/vs/workbench/workbench.nodeless.main.ts +++ b/src/vs/workbench/workbench.nodeless.main.ts @@ -241,7 +241,7 @@ import 'vs/workbench/contrib/scm/browser/scmViewlet'; import 'vs/workbench/contrib/markers/browser/markers.contribution'; // Comments -// import 'vs/workbench/contrib/comments/electron-browser/comments.contribution'; +// import 'vs/workbench/contrib/comments/browser/comments.contribution'; // URL Support import 'vs/workbench/contrib/url/common/url.contribution';