diff --git a/src/vs/workbench/contrib/remote/browser/remote.contribution.ts b/src/vs/workbench/contrib/remote/browser/remote.contribution.ts new file mode 100644 index 00000000000..6982a033c25 --- /dev/null +++ b/src/vs/workbench/contrib/remote/browser/remote.contribution.ts @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { ShowCandidateContribution } from 'vs/workbench/contrib/remote/browser/showCandidate'; +import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; +import { TunnelFactoryContribution } from 'vs/workbench/contrib/remote/browser/tunnelFactory'; +import { RemoteAgentConnectionStatusListener, RemoteMarkers } from 'vs/workbench/contrib/remote/browser/remote'; +import { RemoteStatusIndicator } from 'vs/workbench/contrib/remote/browser/remoteIndicator'; +import { AutomaticPortForwarding, ForwardedPortsView, PortRestore } from 'vs/workbench/contrib/remote/browser/remoteExplorer'; + +const workbenchContributionsRegistry = Registry.as(WorkbenchExtensions.Workbench); +workbenchContributionsRegistry.registerWorkbenchContribution(ShowCandidateContribution, LifecyclePhase.Ready); +workbenchContributionsRegistry.registerWorkbenchContribution(TunnelFactoryContribution, LifecyclePhase.Ready); +workbenchContributionsRegistry.registerWorkbenchContribution(RemoteAgentConnectionStatusListener, LifecyclePhase.Eventually); +workbenchContributionsRegistry.registerWorkbenchContribution(RemoteStatusIndicator, LifecyclePhase.Starting); +workbenchContributionsRegistry.registerWorkbenchContribution(ForwardedPortsView, LifecyclePhase.Eventually); +workbenchContributionsRegistry.registerWorkbenchContribution(PortRestore, LifecyclePhase.Eventually); +workbenchContributionsRegistry.registerWorkbenchContribution(AutomaticPortForwarding, LifecyclePhase.Eventually); +workbenchContributionsRegistry.registerWorkbenchContribution(RemoteMarkers, LifecyclePhase.Eventually); diff --git a/src/vs/workbench/contrib/remote/browser/remote.ts b/src/vs/workbench/contrib/remote/browser/remote.ts index f0711a50251..4b90e5a49c0 100644 --- a/src/vs/workbench/contrib/remote/browser/remote.ts +++ b/src/vs/workbench/contrib/remote/browser/remote.ts @@ -17,7 +17,7 @@ import { IThemeService, ThemeIcon } from 'vs/platform/theme/common/themeService' import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IExtensionService, isProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions'; import { FilterViewPaneContainer } from 'vs/workbench/browser/parts/views/viewsViewlet'; -import { AutomaticPortForwarding, ForwardedPortsView, PortRestore, VIEWLET_ID } from 'vs/workbench/contrib/remote/browser/remoteExplorer'; +import { VIEWLET_ID } from 'vs/workbench/contrib/remote/browser/remoteExplorer'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IViewDescriptor, IViewsRegistry, Extensions, ViewContainerLocation, IViewContainersRegistry, IViewDescriptorService } from 'vs/workbench/common/views'; import { Registry } from 'vs/platform/registry/common/platform'; @@ -27,14 +27,13 @@ import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { registerAction2 } from 'vs/platform/actions/common/actions'; import { IProgress, IProgressStep, IProgressService, ProgressLocation } from 'vs/platform/progress/common/progress'; -import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; +import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { ReconnectionWaitEvent, PersistentConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection'; import Severity from 'vs/base/common/severity'; import { ReloadWindowAction } from 'vs/workbench/browser/actions/windowActions'; import { Disposable, IDisposable } from 'vs/base/common/lifecycle'; -import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { SwitchRemoteViewItem, SwitchRemoteAction } from 'vs/workbench/contrib/remote/browser/explorerViewItems'; import { Action } from 'vs/base/common/actions'; import { isStringArray } from 'vs/base/common/types'; @@ -48,14 +47,12 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { Event } from 'vs/base/common/event'; import { ExtensionsRegistry, IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { RemoteStatusIndicator } from 'vs/workbench/contrib/remote/browser/remoteIndicator'; import * as icons from 'vs/workbench/contrib/remote/browser/remoteIcons'; import { ILogService } from 'vs/platform/log/common/log'; import { ITimerService } from 'vs/workbench/services/timer/browser/timerService'; import { getRemoteName } from 'vs/platform/remote/common/remoteHosts'; import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar'; - export interface HelpInformation { extensionDescription: IExtensionDescription; getStarted?: string; @@ -582,7 +579,7 @@ Registry.as(Extensions.ViewContainersRegistry).register order: 4 }, ViewContainerLocation.Sidebar); -class RemoteMarkers implements IWorkbenchContribution { +export class RemoteMarkers implements IWorkbenchContribution { constructor( @IRemoteAgentService remoteAgentService: IRemoteAgentService, @@ -701,7 +698,7 @@ class ReconnectionTimer implements IDisposable { */ const DISCONNECT_PROMPT_TIME = 40 * 1000; // 40 seconds -class RemoteAgentConnectionStatusListener extends Disposable implements IWorkbenchContribution { +export class RemoteAgentConnectionStatusListener extends Disposable implements IWorkbenchContribution { private _reloadWindowShown: boolean = false; @@ -963,11 +960,3 @@ class RemoteAgentConnectionStatusListener extends Disposable implements IWorkben } } } - -const workbenchContributionsRegistry = Registry.as(WorkbenchExtensions.Workbench); -workbenchContributionsRegistry.registerWorkbenchContribution(RemoteAgentConnectionStatusListener, LifecyclePhase.Eventually); -workbenchContributionsRegistry.registerWorkbenchContribution(RemoteStatusIndicator, LifecyclePhase.Starting); -workbenchContributionsRegistry.registerWorkbenchContribution(ForwardedPortsView, LifecyclePhase.Eventually); -workbenchContributionsRegistry.registerWorkbenchContribution(PortRestore, LifecyclePhase.Eventually); -workbenchContributionsRegistry.registerWorkbenchContribution(AutomaticPortForwarding, LifecyclePhase.Eventually); -workbenchContributionsRegistry.registerWorkbenchContribution(RemoteMarkers, LifecyclePhase.Eventually); diff --git a/src/vs/workbench/contrib/remote/common/showCandidate.ts b/src/vs/workbench/contrib/remote/browser/showCandidate.ts similarity index 100% rename from src/vs/workbench/contrib/remote/common/showCandidate.ts rename to src/vs/workbench/contrib/remote/browser/showCandidate.ts diff --git a/src/vs/workbench/contrib/remote/common/tunnelFactory.ts b/src/vs/workbench/contrib/remote/browser/tunnelFactory.ts similarity index 100% rename from src/vs/workbench/contrib/remote/common/tunnelFactory.ts rename to src/vs/workbench/contrib/remote/browser/tunnelFactory.ts diff --git a/src/vs/workbench/contrib/remote/common/remote.contribution.ts b/src/vs/workbench/contrib/remote/common/remote.contribution.ts index 83c158dd41b..1761921245e 100644 --- a/src/vs/workbench/contrib/remote/common/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/common/remote.contribution.ts @@ -16,8 +16,6 @@ import { IOutputChannelRegistry, Extensions as OutputExt, } from 'vs/workbench/s import { localize } from 'vs/nls'; import { joinPath } from 'vs/base/common/resources'; import { Disposable } from 'vs/base/common/lifecycle'; -import { TunnelFactoryContribution } from 'vs/workbench/contrib/remote/common/tunnelFactory'; -import { ShowCandidateContribution } from 'vs/workbench/contrib/remote/common/showCandidate'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { IFileService } from 'vs/platform/files/common/files'; @@ -162,8 +160,6 @@ workbenchContributionsRegistry.registerWorkbenchContribution(LabelContribution, workbenchContributionsRegistry.registerWorkbenchContribution(RemoteChannelsContribution, LifecyclePhase.Starting); workbenchContributionsRegistry.registerWorkbenchContribution(RemoteInvalidWorkspaceDetector, LifecyclePhase.Starting); workbenchContributionsRegistry.registerWorkbenchContribution(RemoteLogOutputChannels, LifecyclePhase.Restored); -workbenchContributionsRegistry.registerWorkbenchContribution(TunnelFactoryContribution, LifecyclePhase.Ready); -workbenchContributionsRegistry.registerWorkbenchContribution(ShowCandidateContribution, LifecyclePhase.Ready); const enableDiagnostics = true; diff --git a/src/vs/workbench/services/extensionManagement/common/webExtensionsScannerService.ts b/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts similarity index 100% rename from src/vs/workbench/services/extensionManagement/common/webExtensionsScannerService.ts rename to src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts diff --git a/src/vs/workbench/workbench.common.main.ts b/src/vs/workbench/workbench.common.main.ts index 0830ecfa373..fa0e29f2d2f 100644 --- a/src/vs/workbench/workbench.common.main.ts +++ b/src/vs/workbench/workbench.common.main.ts @@ -76,7 +76,7 @@ import 'vs/workbench/services/commands/common/commandService'; import 'vs/workbench/services/themes/browser/workbenchThemeService'; import 'vs/workbench/services/label/common/labelService'; import 'vs/workbench/services/extensions/common/extensionManifestPropertiesService'; -import 'vs/workbench/services/extensionManagement/common/webExtensionsScannerService'; +import 'vs/workbench/services/extensionManagement/browser/webExtensionsScannerService'; import 'vs/workbench/services/extensionManagement/browser/extensionEnablementService'; import 'vs/workbench/services/extensionManagement/browser/builtinExtensionsScannerService'; import 'vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService'; @@ -246,7 +246,7 @@ import 'vs/workbench/contrib/tasks/browser/task.contribution'; // Remote import 'vs/workbench/contrib/remote/common/remote.contribution'; -import 'vs/workbench/contrib/remote/browser/remote'; +import 'vs/workbench/contrib/remote/browser/remote.contribution'; // Emmet import 'vs/workbench/contrib/emmet/browser/emmet.contribution';