提交 95d05f44 编写于 作者: S Sandeep Somavarapu

Show remote explorer always in remote window

上级 9bfa4c1d
...@@ -541,40 +541,47 @@ export class RemoteViewPaneContainer extends FilterViewPaneContainer implements ...@@ -541,40 +541,47 @@ export class RemoteViewPaneContainer extends FilterViewPaneContainer implements
registerAction2(SwitchRemoteAction); registerAction2(SwitchRemoteAction);
Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).registerViewContainer( class RemoteViewPaneContainerContribution implements IWorkbenchContribution {
{
id: VIEWLET_ID,
name: nls.localize('remote.explorer', "Remote Explorer"),
ctorDescriptor: new SyncDescriptor(RemoteViewPaneContainer),
hideIfEmpty: true,
viewOrderDelegate: {
getOrder: (group?: string) => {
if (!group) {
return;
}
let matches = /^targets@(\d+)$/.exec(group); constructor(
if (matches) { @IRemoteAgentService remoteAgentService: IRemoteAgentService
return -1000; ) {
} Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).registerViewContainer(
{
id: VIEWLET_ID,
name: nls.localize('remote.explorer', "Remote Explorer"),
ctorDescriptor: new SyncDescriptor(RemoteViewPaneContainer),
hideIfEmpty: remoteAgentService.getConnection() === null,
viewOrderDelegate: {
getOrder: (group?: string) => {
if (!group) {
return;
}
matches = /^details(@(\d+))?$/.exec(group); let matches = /^targets@(\d+)$/.exec(group);
if (matches) {
return -1000;
}
if (matches) { matches = /^details(@(\d+))?$/.exec(group);
return -500 + Number(matches[2]);
}
matches = /^help(@(\d+))?$/.exec(group); if (matches) {
if (matches) { return -500 + Number(matches[2]);
return -10; }
}
return; matches = /^help(@(\d+))?$/.exec(group);
} if (matches) {
}, return -10;
icon: icons.remoteExplorerViewIcon, }
order: 4
}, ViewContainerLocation.Sidebar); return;
}
},
icon: icons.remoteExplorerViewIcon,
order: 4
}, ViewContainerLocation.Sidebar);
}
}
class OpenRemoteViewletAction extends ShowViewletAction { class OpenRemoteViewletAction extends ShowViewletAction {
...@@ -841,6 +848,7 @@ class RemoteAgentConnectionStatusListener extends Disposable implements IWorkben ...@@ -841,6 +848,7 @@ class RemoteAgentConnectionStatusListener extends Disposable implements IWorkben
} }
const workbenchContributionsRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench); const workbenchContributionsRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
workbenchContributionsRegistry.registerWorkbenchContribution(RemoteViewPaneContainerContribution, LifecyclePhase.Starting);
workbenchContributionsRegistry.registerWorkbenchContribution(RemoteAgentConnectionStatusListener, LifecyclePhase.Eventually); workbenchContributionsRegistry.registerWorkbenchContribution(RemoteAgentConnectionStatusListener, LifecyclePhase.Eventually);
workbenchContributionsRegistry.registerWorkbenchContribution(RemoteStatusIndicator, LifecyclePhase.Starting); workbenchContributionsRegistry.registerWorkbenchContribution(RemoteStatusIndicator, LifecyclePhase.Starting);
workbenchContributionsRegistry.registerWorkbenchContribution(ForwardedPortsView, LifecyclePhase.Eventually); workbenchContributionsRegistry.registerWorkbenchContribution(ForwardedPortsView, LifecyclePhase.Eventually);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册