@codingame/monaco-vscode-views-service-override 1.83.4 → 1.83.6
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/index.d.ts +8 -3
- package/index.js +7 -1
- package/l10n.js +8 -0
- package/missing-services.js +2141 -0
- package/package.json +2 -2
- package/services.js +95 -0
- package/views.d.ts +51 -15
- package/views.js +124 -96
- package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +1 -1
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +262 -49
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarActions.js +57 -42
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +51 -11
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +14 -2
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +18 -3
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +52 -20
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +6 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +23 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +60 -12
- package/vscode/src/vs/workbench/browser/parts/editor/editorPane.d.ts +112 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +11 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +12 -2
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +5 -4
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +27 -15
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +32 -19
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -18
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +29 -5
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +17 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +55 -10
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.js +5 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.js +22 -3
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +5 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +40 -8
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +5 -1
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +36 -10
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +111 -16
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +153 -97
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +28 -6
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution2.js +11 -463
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +16 -4
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +10 -4
- package/vscode/src/vs/workbench/contrib/languageDetection/browser/languageDetection.contribution.js +27 -5
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +53 -28
- package/vscode/src/vs/workbench/contrib/outline/browser/outline.contribution.js +180 -36
- package/vscode/src/vs/workbench/contrib/outline/browser/outlinePane.js +17 -3
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +29 -5
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +85 -17
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +301 -62
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +48 -16
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +29 -5
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +17 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +6 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +25 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +5 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +49 -9
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +36 -36
- package/vscode/src/vs/workbench/services/hover/browser/hoverWidget.js +6 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +5 -1
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +14 -5
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +5 -1
|
@@ -84,8 +84,16 @@ class IconColumn {
|
|
|
84
84
|
}
|
|
85
85
|
class PortColumn {
|
|
86
86
|
constructor() {
|
|
87
|
-
this.label = nls.localizeWithPath(
|
|
88
|
-
|
|
87
|
+
this.label = ( nls.localizeWithPath(
|
|
88
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
89
|
+
'tunnel.portColumn.label',
|
|
90
|
+
"Port"
|
|
91
|
+
));
|
|
92
|
+
this.tooltip = ( nls.localizeWithPath(
|
|
93
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
94
|
+
'tunnel.portColumn.tooltip',
|
|
95
|
+
"The label and remote port number of the forwarded port."
|
|
96
|
+
));
|
|
89
97
|
this.weight = 1;
|
|
90
98
|
this.templateId = 'actionbar';
|
|
91
99
|
}
|
|
@@ -107,8 +115,16 @@ class PortColumn {
|
|
|
107
115
|
}
|
|
108
116
|
class LocalAddressColumn {
|
|
109
117
|
constructor() {
|
|
110
|
-
this.label = nls.localizeWithPath(
|
|
111
|
-
|
|
118
|
+
this.label = ( nls.localizeWithPath(
|
|
119
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
120
|
+
'tunnel.addressColumn.label',
|
|
121
|
+
"Forwarded Address"
|
|
122
|
+
));
|
|
123
|
+
this.tooltip = ( nls.localizeWithPath(
|
|
124
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
125
|
+
'tunnel.addressColumn.tooltip',
|
|
126
|
+
"The address that the forwarded port is available at."
|
|
127
|
+
));
|
|
112
128
|
this.weight = 1;
|
|
113
129
|
this.templateId = 'actionbar';
|
|
114
130
|
}
|
|
@@ -136,18 +152,34 @@ class LocalAddressColumn {
|
|
|
136
152
|
let clickLabel = '';
|
|
137
153
|
if (editorConf.multiCursorModifier === 'ctrlCmd') {
|
|
138
154
|
if (isMacintosh) {
|
|
139
|
-
clickLabel = nls.localizeWithPath(
|
|
155
|
+
clickLabel = ( nls.localizeWithPath(
|
|
156
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
157
|
+
'portsLink.followLinkAlt.mac',
|
|
158
|
+
"option + click"
|
|
159
|
+
));
|
|
140
160
|
}
|
|
141
161
|
else {
|
|
142
|
-
clickLabel = nls.localizeWithPath(
|
|
162
|
+
clickLabel = ( nls.localizeWithPath(
|
|
163
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
164
|
+
'portsLink.followLinkAlt',
|
|
165
|
+
"alt + click"
|
|
166
|
+
));
|
|
143
167
|
}
|
|
144
168
|
}
|
|
145
169
|
else {
|
|
146
170
|
if (isMacintosh) {
|
|
147
|
-
clickLabel = nls.localizeWithPath(
|
|
171
|
+
clickLabel = ( nls.localizeWithPath(
|
|
172
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
173
|
+
'portsLink.followLinkCmd',
|
|
174
|
+
"cmd + click"
|
|
175
|
+
));
|
|
148
176
|
}
|
|
149
177
|
else {
|
|
150
|
-
clickLabel = nls.localizeWithPath(
|
|
178
|
+
clickLabel = ( nls.localizeWithPath(
|
|
179
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
180
|
+
'portsLink.followLinkCtrl',
|
|
181
|
+
"ctrl + click"
|
|
182
|
+
));
|
|
151
183
|
}
|
|
152
184
|
}
|
|
153
185
|
const markdown = ( new MarkdownString('', true));
|
|
@@ -158,8 +190,16 @@ class LocalAddressColumn {
|
|
|
158
190
|
}
|
|
159
191
|
class RunningProcessColumn {
|
|
160
192
|
constructor() {
|
|
161
|
-
this.label = nls.localizeWithPath(
|
|
162
|
-
|
|
193
|
+
this.label = ( nls.localizeWithPath(
|
|
194
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
195
|
+
'tunnel.processColumn.label',
|
|
196
|
+
"Running Process"
|
|
197
|
+
));
|
|
198
|
+
this.tooltip = ( nls.localizeWithPath(
|
|
199
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
200
|
+
'tunnel.processColumn.tooltip',
|
|
201
|
+
"The command line of the process that is using the port."
|
|
202
|
+
));
|
|
163
203
|
this.weight = 2;
|
|
164
204
|
this.templateId = 'actionbar';
|
|
165
205
|
}
|
|
@@ -173,8 +213,16 @@ class RunningProcessColumn {
|
|
|
173
213
|
}
|
|
174
214
|
class OriginColumn {
|
|
175
215
|
constructor() {
|
|
176
|
-
this.label = nls.localizeWithPath(
|
|
177
|
-
|
|
216
|
+
this.label = ( nls.localizeWithPath(
|
|
217
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
218
|
+
'tunnel.originColumn.label',
|
|
219
|
+
"Origin"
|
|
220
|
+
));
|
|
221
|
+
this.tooltip = ( nls.localizeWithPath(
|
|
222
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
223
|
+
'tunnel.originColumn.tooltip',
|
|
224
|
+
"The source that a forwarded port originates from. Can be an extension, user forwarded, statically forwarded, or automatically forwarded."
|
|
225
|
+
));
|
|
178
226
|
this.weight = 1;
|
|
179
227
|
this.templateId = 'actionbar';
|
|
180
228
|
}
|
|
@@ -189,8 +237,16 @@ class OriginColumn {
|
|
|
189
237
|
}
|
|
190
238
|
class PrivacyColumn {
|
|
191
239
|
constructor() {
|
|
192
|
-
this.label = nls.localizeWithPath(
|
|
193
|
-
|
|
240
|
+
this.label = ( nls.localizeWithPath(
|
|
241
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
242
|
+
'tunnel.privacyColumn.label',
|
|
243
|
+
"Visibility"
|
|
244
|
+
));
|
|
245
|
+
this.tooltip = ( nls.localizeWithPath(
|
|
246
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
247
|
+
'tunnel.privacyColumn.tooltip',
|
|
248
|
+
"The availability of the forwarded port."
|
|
249
|
+
));
|
|
194
250
|
this.weight = 1;
|
|
195
251
|
this.templateId = 'actionbar';
|
|
196
252
|
}
|
|
@@ -353,7 +409,11 @@ let ActionBarRenderer = class ActionBarRenderer extends Disposable {
|
|
|
353
409
|
container.style.paddingLeft = '5px';
|
|
354
410
|
const value = editableData.startingValue || '';
|
|
355
411
|
const inputBox = ( new InputBox(container, this.contextViewService, {
|
|
356
|
-
ariaLabel: nls.localizeWithPath(
|
|
412
|
+
ariaLabel: ( nls.localizeWithPath(
|
|
413
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
414
|
+
'remote.tunnelsView.input',
|
|
415
|
+
"Press Enter to confirm or Escape to cancel."
|
|
416
|
+
)),
|
|
357
417
|
validationOptions: {
|
|
358
418
|
validation: (value) => {
|
|
359
419
|
const message = editableData.validationMessage(value);
|
|
@@ -519,25 +579,50 @@ class TunnelItem {
|
|
|
519
579
|
}
|
|
520
580
|
}
|
|
521
581
|
else if (this.hasRunningProcess) {
|
|
522
|
-
description = nls.localizeWithPath(
|
|
582
|
+
description = ( nls.localizeWithPath(
|
|
583
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
584
|
+
'tunnelView.runningProcess.inacessable',
|
|
585
|
+
"Process information unavailable"
|
|
586
|
+
));
|
|
523
587
|
}
|
|
524
588
|
return description;
|
|
525
589
|
}
|
|
526
590
|
get tooltipPostfix() {
|
|
527
591
|
let information;
|
|
528
592
|
if (this.localAddress) {
|
|
529
|
-
information = nls.localizeWithPath(
|
|
593
|
+
information = ( nls.localizeWithPath(
|
|
594
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
595
|
+
'remote.tunnel.tooltipForwarded',
|
|
596
|
+
"Remote port {0}:{1} forwarded to local address {2}. ",
|
|
597
|
+
this.remoteHost,
|
|
598
|
+
this.remotePort,
|
|
599
|
+
this.localAddress
|
|
600
|
+
));
|
|
530
601
|
}
|
|
531
602
|
else {
|
|
532
|
-
information = nls.localizeWithPath(
|
|
603
|
+
information = ( nls.localizeWithPath(
|
|
604
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
605
|
+
'remote.tunnel.tooltipCandidate',
|
|
606
|
+
"Remote port {0}:{1} not forwarded. ",
|
|
607
|
+
this.remoteHost,
|
|
608
|
+
this.remotePort
|
|
609
|
+
));
|
|
533
610
|
}
|
|
534
611
|
return information;
|
|
535
612
|
}
|
|
536
613
|
get iconTooltip() {
|
|
537
614
|
const isAdd = this.tunnelType === TunnelType.Add;
|
|
538
615
|
if (!isAdd) {
|
|
539
|
-
return `${this.processDescription ? nls.localizeWithPath(
|
|
540
|
-
|
|
616
|
+
return `${this.processDescription ? ( nls.localizeWithPath(
|
|
617
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
618
|
+
'tunnel.iconColumn.running',
|
|
619
|
+
"Port has running process."
|
|
620
|
+
)) :
|
|
621
|
+
( nls.localizeWithPath(
|
|
622
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
623
|
+
'tunnel.iconColumn.notRunning',
|
|
624
|
+
"No running process."
|
|
625
|
+
))}`;
|
|
541
626
|
}
|
|
542
627
|
else {
|
|
543
628
|
return this.label;
|
|
@@ -546,7 +631,12 @@ class TunnelItem {
|
|
|
546
631
|
get portTooltip() {
|
|
547
632
|
const isAdd = this.tunnelType === TunnelType.Add;
|
|
548
633
|
if (!isAdd) {
|
|
549
|
-
return `${this.name ? nls.localizeWithPath(
|
|
634
|
+
return `${this.name ? ( nls.localizeWithPath(
|
|
635
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
636
|
+
'remote.tunnel.tooltipName',
|
|
637
|
+
"Port labeled {0}. ",
|
|
638
|
+
this.name
|
|
639
|
+
)) : ''}`;
|
|
550
640
|
}
|
|
551
641
|
else {
|
|
552
642
|
return '';
|
|
@@ -564,14 +654,22 @@ class TunnelItem {
|
|
|
564
654
|
{
|
|
565
655
|
id: '',
|
|
566
656
|
themeIcon: Codicon.question.id,
|
|
567
|
-
label: nls.localizeWithPath(
|
|
657
|
+
label: ( nls.localizeWithPath(
|
|
658
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
659
|
+
'tunnelPrivacy.unknown',
|
|
660
|
+
"Unknown"
|
|
661
|
+
))
|
|
568
662
|
};
|
|
569
663
|
}
|
|
570
664
|
else {
|
|
571
665
|
return {
|
|
572
666
|
id: TunnelPrivacyId.Private,
|
|
573
667
|
themeIcon: privatePortIcon.id,
|
|
574
|
-
label: nls.localizeWithPath(
|
|
668
|
+
label: ( nls.localizeWithPath(
|
|
669
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
670
|
+
'tunnelPrivacy.private',
|
|
671
|
+
"Private"
|
|
672
|
+
))
|
|
575
673
|
};
|
|
576
674
|
}
|
|
577
675
|
}
|
|
@@ -581,11 +679,11 @@ const TunnelCloseableContextKey = ( new RawContextKey('tunnelCloseable', false,
|
|
|
581
679
|
const TunnelPrivacyContextKey = ( new RawContextKey('tunnelPrivacy', undefined, true));
|
|
582
680
|
const TunnelPrivacyEnabledContextKey = ( new RawContextKey('tunnelPrivacyEnabled', false, true));
|
|
583
681
|
const TunnelProtocolContextKey = ( new RawContextKey('tunnelProtocol', TunnelProtocol.Http, true));
|
|
584
|
-
const TunnelViewFocusContextKey = ( new RawContextKey(
|
|
585
|
-
'
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
));
|
|
682
|
+
const TunnelViewFocusContextKey = ( new RawContextKey('tunnelViewFocus', false, ( nls.localizeWithPath(
|
|
683
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
684
|
+
'tunnel.focusContext',
|
|
685
|
+
"Whether the Ports view has focus."
|
|
686
|
+
))));
|
|
589
687
|
const TunnelViewSelectionKeyName = 'tunnelViewSelection';
|
|
590
688
|
const TunnelViewSelectionContextKey = ( new RawContextKey(TunnelViewSelectionKeyName, undefined, true));
|
|
591
689
|
const TunnelViewMultiSelectionKeyName = 'tunnelViewMultiSelection';
|
|
@@ -594,7 +692,7 @@ const PortChangableContextKey = ( new RawContextKey('portChangable', false, true
|
|
|
594
692
|
let TunnelPanel = class TunnelPanel extends ViewPane {
|
|
595
693
|
static { TunnelPanel_1 = this; }
|
|
596
694
|
static { this.ID = TUNNEL_VIEW_ID; }
|
|
597
|
-
static { this.TITLE = nls.localizeWithPath('vs/workbench/contrib/remote/browser/tunnelView', 'remote.tunnel', "Ports"); }
|
|
695
|
+
static { this.TITLE = ( nls.localizeWithPath('vs/workbench/contrib/remote/browser/tunnelView', 'remote.tunnel', "Ports")); }
|
|
598
696
|
constructor(viewModel, options, keybindingService, contextMenuService, contextKeyService, configurationService, instantiationService, viewDescriptorService, openerService, quickInputService, commandService, menuService, themeService, remoteExplorerService, telemetryService, tunnelService, contextViewService, hoverService) {
|
|
599
697
|
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
|
600
698
|
this.viewModel = viewModel;
|
|
@@ -701,7 +799,11 @@ let TunnelPanel = class TunnelPanel extends ViewPane {
|
|
|
701
799
|
return item.label;
|
|
702
800
|
}
|
|
703
801
|
},
|
|
704
|
-
getWidgetAriaLabel: () => nls.localizeWithPath(
|
|
802
|
+
getWidgetAriaLabel: () => ( nls.localizeWithPath(
|
|
803
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
804
|
+
'tunnelView',
|
|
805
|
+
"Tunnel View"
|
|
806
|
+
))
|
|
705
807
|
},
|
|
706
808
|
openOnSingleClick: true
|
|
707
809
|
});
|
|
@@ -902,7 +1004,11 @@ function isITunnelItem(item) {
|
|
|
902
1004
|
var LabelTunnelAction;
|
|
903
1005
|
( (function(LabelTunnelAction) {
|
|
904
1006
|
LabelTunnelAction.ID = 'remote.tunnel.label';
|
|
905
|
-
LabelTunnelAction.LABEL = nls.localizeWithPath(
|
|
1007
|
+
LabelTunnelAction.LABEL = ( nls.localizeWithPath(
|
|
1008
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1009
|
+
'remote.tunnel.label',
|
|
1010
|
+
"Set Port Label"
|
|
1011
|
+
));
|
|
906
1012
|
LabelTunnelAction.COMMAND_ID_KEYWORD = 'label';
|
|
907
1013
|
function handler() {
|
|
908
1014
|
return async (accessor, arg) => {
|
|
@@ -934,7 +1040,11 @@ var LabelTunnelAction;
|
|
|
934
1040
|
resolve(changed ? { port: tunnelItem.remotePort, label: value } : undefined);
|
|
935
1041
|
},
|
|
936
1042
|
validationMessage: () => null,
|
|
937
|
-
placeholder: nls.localizeWithPath(
|
|
1043
|
+
placeholder: ( nls.localizeWithPath(
|
|
1044
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1045
|
+
'remote.tunnelsView.labelPlaceholder',
|
|
1046
|
+
"Port label"
|
|
1047
|
+
)),
|
|
938
1048
|
startingValue
|
|
939
1049
|
});
|
|
940
1050
|
}));
|
|
@@ -944,18 +1054,47 @@ var LabelTunnelAction;
|
|
|
944
1054
|
}
|
|
945
1055
|
LabelTunnelAction.handler = handler;
|
|
946
1056
|
})(LabelTunnelAction || (LabelTunnelAction = {})));
|
|
947
|
-
const invalidPortString = nls.localizeWithPath(
|
|
1057
|
+
const invalidPortString = ( nls.localizeWithPath(
|
|
1058
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1059
|
+
'remote.tunnelsView.portNumberValid',
|
|
1060
|
+
"Forwarded port should be a number or a host:port."
|
|
1061
|
+
));
|
|
948
1062
|
const maxPortNumber = 65536;
|
|
949
|
-
const invalidPortNumberString = nls.localizeWithPath(
|
|
950
|
-
|
|
951
|
-
|
|
1063
|
+
const invalidPortNumberString = ( nls.localizeWithPath(
|
|
1064
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1065
|
+
'remote.tunnelsView.portNumberToHigh',
|
|
1066
|
+
"Port number must be \u2265 0 and < {0}.",
|
|
1067
|
+
maxPortNumber
|
|
1068
|
+
));
|
|
1069
|
+
const requiresSudoString = ( nls.localizeWithPath(
|
|
1070
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1071
|
+
'remote.tunnelView.inlineElevationMessage',
|
|
1072
|
+
"May Require Sudo"
|
|
1073
|
+
));
|
|
1074
|
+
const alreadyForwarded = ( nls.localizeWithPath(
|
|
1075
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1076
|
+
'remote.tunnelView.alreadyForwarded',
|
|
1077
|
+
"Port is already forwarded"
|
|
1078
|
+
));
|
|
952
1079
|
var ForwardPortAction;
|
|
953
1080
|
( (function(ForwardPortAction) {
|
|
954
1081
|
ForwardPortAction.INLINE_ID = 'remote.tunnel.forwardInline';
|
|
955
1082
|
ForwardPortAction.COMMANDPALETTE_ID = 'remote.tunnel.forwardCommandPalette';
|
|
956
|
-
ForwardPortAction.LABEL = { value: nls.localizeWithPath(
|
|
957
|
-
|
|
958
|
-
|
|
1083
|
+
ForwardPortAction.LABEL = { value: ( nls.localizeWithPath(
|
|
1084
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1085
|
+
'remote.tunnel.forward',
|
|
1086
|
+
"Forward a Port"
|
|
1087
|
+
)), original: 'Forward a Port' };
|
|
1088
|
+
ForwardPortAction.TREEITEM_LABEL = ( nls.localizeWithPath(
|
|
1089
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1090
|
+
'remote.tunnel.forwardItem',
|
|
1091
|
+
"Forward Port"
|
|
1092
|
+
));
|
|
1093
|
+
const forwardPrompt = ( nls.localizeWithPath(
|
|
1094
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1095
|
+
'remote.tunnel.forwardPrompt',
|
|
1096
|
+
"Port number or address (eg. 3000 or 10.10.10.10:2000)."
|
|
1097
|
+
));
|
|
959
1098
|
function validateInput(remoteExplorerService, tunnelService, value, canElevate) {
|
|
960
1099
|
const parsed = parseAddress(value);
|
|
961
1100
|
if (!parsed) {
|
|
@@ -974,10 +1113,23 @@ var ForwardPortAction;
|
|
|
974
1113
|
}
|
|
975
1114
|
function error(notificationService, tunnelOrError, host, port) {
|
|
976
1115
|
if (!tunnelOrError) {
|
|
977
|
-
notificationService.warn(nls.localizeWithPath(
|
|
1116
|
+
notificationService.warn(( nls.localizeWithPath(
|
|
1117
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1118
|
+
'remote.tunnel.forwardError',
|
|
1119
|
+
"Unable to forward {0}:{1}. The host may not be available or that remote port may already be forwarded",
|
|
1120
|
+
host,
|
|
1121
|
+
port
|
|
1122
|
+
)));
|
|
978
1123
|
}
|
|
979
1124
|
else if (typeof tunnelOrError === 'string') {
|
|
980
|
-
notificationService.warn(nls.localizeWithPath(
|
|
1125
|
+
notificationService.warn(( nls.localizeWithPath(
|
|
1126
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1127
|
+
'remote.tunnel.forwardErrorProvided',
|
|
1128
|
+
"Unable to forward {0}:{1}. {2}",
|
|
1129
|
+
host,
|
|
1130
|
+
port,
|
|
1131
|
+
tunnelOrError
|
|
1132
|
+
)));
|
|
981
1133
|
}
|
|
982
1134
|
}
|
|
983
1135
|
function inlineHandler() {
|
|
@@ -1036,7 +1188,12 @@ function makeTunnelPicks(tunnels, remoteExplorerService, tunnelService) {
|
|
|
1036
1188
|
}));
|
|
1037
1189
|
if (picks.length === 0) {
|
|
1038
1190
|
picks.push({
|
|
1039
|
-
label: nls.localizeWithPath(
|
|
1191
|
+
label: ( nls.localizeWithPath(
|
|
1192
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1193
|
+
'remote.tunnel.closeNoPorts',
|
|
1194
|
+
"No ports currently forwarded. Try running the {0} command",
|
|
1195
|
+
ForwardPortAction.LABEL.value
|
|
1196
|
+
))
|
|
1040
1197
|
});
|
|
1041
1198
|
}
|
|
1042
1199
|
return picks;
|
|
@@ -1045,7 +1202,11 @@ var ClosePortAction;
|
|
|
1045
1202
|
( (function(ClosePortAction) {
|
|
1046
1203
|
ClosePortAction.INLINE_ID = 'remote.tunnel.closeInline';
|
|
1047
1204
|
ClosePortAction.COMMANDPALETTE_ID = 'remote.tunnel.closeCommandPalette';
|
|
1048
|
-
ClosePortAction.LABEL = { value: nls.localizeWithPath(
|
|
1205
|
+
ClosePortAction.LABEL = { value: ( nls.localizeWithPath(
|
|
1206
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1207
|
+
'remote.tunnel.close',
|
|
1208
|
+
"Stop Forwarding Port"
|
|
1209
|
+
)), original: 'Stop Forwarding Port' };
|
|
1049
1210
|
function inlineHandler() {
|
|
1050
1211
|
return async (accessor, arg) => {
|
|
1051
1212
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
@@ -1086,7 +1247,11 @@ var ClosePortAction;
|
|
|
1086
1247
|
const tunnelService = accessor.get(ITunnelService);
|
|
1087
1248
|
const commandService = accessor.get(ICommandService);
|
|
1088
1249
|
const picks = makeTunnelPicks(Array.from(( remoteExplorerService.tunnelModel.forwarded.values())).filter(tunnel => tunnel.closeable), remoteExplorerService, tunnelService);
|
|
1089
|
-
const result = await quickInputService.pick(picks, { placeHolder: nls.localizeWithPath(
|
|
1250
|
+
const result = await quickInputService.pick(picks, { placeHolder: ( nls.localizeWithPath(
|
|
1251
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1252
|
+
'remote.tunnel.closePlaceholder',
|
|
1253
|
+
"Choose a port to stop forwarding"
|
|
1254
|
+
)) });
|
|
1090
1255
|
if (result && result.tunnel) {
|
|
1091
1256
|
await remoteExplorerService.close({ host: result.tunnel.remoteHost, port: result.tunnel.remotePort }, TunnelCloseReason.User);
|
|
1092
1257
|
}
|
|
@@ -1100,7 +1265,11 @@ var ClosePortAction;
|
|
|
1100
1265
|
var OpenPortInBrowserAction;
|
|
1101
1266
|
( (function(OpenPortInBrowserAction) {
|
|
1102
1267
|
OpenPortInBrowserAction.ID = 'remote.tunnel.open';
|
|
1103
|
-
OpenPortInBrowserAction.LABEL = nls.localizeWithPath(
|
|
1268
|
+
OpenPortInBrowserAction.LABEL = ( nls.localizeWithPath(
|
|
1269
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1270
|
+
'remote.tunnel.open',
|
|
1271
|
+
"Open in Browser"
|
|
1272
|
+
));
|
|
1104
1273
|
function handler() {
|
|
1105
1274
|
return async (accessor, arg) => {
|
|
1106
1275
|
let key;
|
|
@@ -1130,7 +1299,11 @@ var OpenPortInBrowserAction;
|
|
|
1130
1299
|
var OpenPortInPreviewAction;
|
|
1131
1300
|
( (function(OpenPortInPreviewAction) {
|
|
1132
1301
|
OpenPortInPreviewAction.ID = 'remote.tunnel.openPreview';
|
|
1133
|
-
OpenPortInPreviewAction.LABEL = nls.localizeWithPath(
|
|
1302
|
+
OpenPortInPreviewAction.LABEL = ( nls.localizeWithPath(
|
|
1303
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1304
|
+
'remote.tunnel.openPreview',
|
|
1305
|
+
"Preview in Editor"
|
|
1306
|
+
));
|
|
1134
1307
|
function handler() {
|
|
1135
1308
|
return async (accessor, arg) => {
|
|
1136
1309
|
let key;
|
|
@@ -1167,7 +1340,11 @@ var OpenPortInPreviewAction;
|
|
|
1167
1340
|
var OpenPortInBrowserCommandPaletteAction;
|
|
1168
1341
|
( (function(OpenPortInBrowserCommandPaletteAction) {
|
|
1169
1342
|
OpenPortInBrowserCommandPaletteAction.ID = 'remote.tunnel.openCommandPalette';
|
|
1170
|
-
OpenPortInBrowserCommandPaletteAction.LABEL = nls.localizeWithPath(
|
|
1343
|
+
OpenPortInBrowserCommandPaletteAction.LABEL = ( nls.localizeWithPath(
|
|
1344
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1345
|
+
'remote.tunnel.openCommandPalette',
|
|
1346
|
+
"Open Port in Browser"
|
|
1347
|
+
));
|
|
1171
1348
|
function handler() {
|
|
1172
1349
|
return async (accessor, arg) => {
|
|
1173
1350
|
const remoteExplorerService = accessor.get(IRemoteExplorerService);
|
|
@@ -1186,15 +1363,27 @@ var OpenPortInBrowserCommandPaletteAction;
|
|
|
1186
1363
|
}));
|
|
1187
1364
|
if (options.length === 0) {
|
|
1188
1365
|
options.push({
|
|
1189
|
-
label: nls.localizeWithPath(
|
|
1366
|
+
label: ( nls.localizeWithPath(
|
|
1367
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1368
|
+
'remote.tunnel.openCommandPaletteNone',
|
|
1369
|
+
"No ports currently forwarded. Open the Ports view to get started."
|
|
1370
|
+
))
|
|
1190
1371
|
});
|
|
1191
1372
|
}
|
|
1192
1373
|
else {
|
|
1193
1374
|
options.push({
|
|
1194
|
-
label: nls.localizeWithPath(
|
|
1375
|
+
label: ( nls.localizeWithPath(
|
|
1376
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1377
|
+
'remote.tunnel.openCommandPaletteView',
|
|
1378
|
+
"Open the Ports view..."
|
|
1379
|
+
))
|
|
1195
1380
|
});
|
|
1196
1381
|
}
|
|
1197
|
-
const picked = await quickPickService.pick(options, { placeHolder: nls.localizeWithPath(
|
|
1382
|
+
const picked = await quickPickService.pick(options, { placeHolder: ( nls.localizeWithPath(
|
|
1383
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1384
|
+
'remote.tunnel.openCommandPalettePick',
|
|
1385
|
+
"Choose the port to open"
|
|
1386
|
+
)) });
|
|
1198
1387
|
if (picked && picked.tunnel) {
|
|
1199
1388
|
return OpenPortInBrowserAction.run(model, openerService, makeAddress(picked.tunnel.remoteHost, picked.tunnel.remotePort));
|
|
1200
1389
|
}
|
|
@@ -1211,8 +1400,16 @@ var CopyAddressAction;
|
|
|
1211
1400
|
( (function(CopyAddressAction) {
|
|
1212
1401
|
CopyAddressAction.INLINE_ID = 'remote.tunnel.copyAddressInline';
|
|
1213
1402
|
CopyAddressAction.COMMANDPALETTE_ID = 'remote.tunnel.copyAddressCommandPalette';
|
|
1214
|
-
CopyAddressAction.INLINE_LABEL = nls.localizeWithPath(
|
|
1215
|
-
|
|
1403
|
+
CopyAddressAction.INLINE_LABEL = ( nls.localizeWithPath(
|
|
1404
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1405
|
+
'remote.tunnel.copyAddressInline',
|
|
1406
|
+
"Copy Local Address"
|
|
1407
|
+
));
|
|
1408
|
+
CopyAddressAction.COMMANDPALETTE_LABEL = ( nls.localizeWithPath(
|
|
1409
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1410
|
+
'remote.tunnel.copyAddressCommandPalette',
|
|
1411
|
+
"Copy Forwarded Port Address"
|
|
1412
|
+
));
|
|
1216
1413
|
async function copyAddress(remoteExplorerService, clipboardService, tunnelItem) {
|
|
1217
1414
|
const address = remoteExplorerService.tunnelModel.address(tunnelItem.remoteHost, tunnelItem.remotePort);
|
|
1218
1415
|
if (address) {
|
|
@@ -1244,7 +1441,11 @@ var CopyAddressAction;
|
|
|
1244
1441
|
const commandService = accessor.get(ICommandService);
|
|
1245
1442
|
const clipboardService = accessor.get(IClipboardService);
|
|
1246
1443
|
const tunnels = Array.from(( remoteExplorerService.tunnelModel.forwarded.values())).concat(Array.from(( remoteExplorerService.tunnelModel.detected.values())));
|
|
1247
|
-
const result = await quickInputService.pick(makeTunnelPicks(tunnels, remoteExplorerService, tunnelService), { placeHolder: nls.localizeWithPath(
|
|
1444
|
+
const result = await quickInputService.pick(makeTunnelPicks(tunnels, remoteExplorerService, tunnelService), { placeHolder: ( nls.localizeWithPath(
|
|
1445
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1446
|
+
'remote.tunnel.copyAddressPlaceholdter',
|
|
1447
|
+
"Choose a forwarded port"
|
|
1448
|
+
)) });
|
|
1248
1449
|
if (result && result.tunnel) {
|
|
1249
1450
|
await copyAddress(remoteExplorerService, clipboardService, result.tunnel);
|
|
1250
1451
|
}
|
|
@@ -1258,10 +1459,18 @@ var CopyAddressAction;
|
|
|
1258
1459
|
var ChangeLocalPortAction;
|
|
1259
1460
|
( (function(ChangeLocalPortAction) {
|
|
1260
1461
|
ChangeLocalPortAction.ID = 'remote.tunnel.changeLocalPort';
|
|
1261
|
-
ChangeLocalPortAction.LABEL = nls.localizeWithPath(
|
|
1462
|
+
ChangeLocalPortAction.LABEL = ( nls.localizeWithPath(
|
|
1463
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1464
|
+
'remote.tunnel.changeLocalPort',
|
|
1465
|
+
"Change Local Address Port"
|
|
1466
|
+
));
|
|
1262
1467
|
function validateInput(tunnelService, value, canElevate) {
|
|
1263
1468
|
if (!value.match(/^[0-9]+$/)) {
|
|
1264
|
-
return { content: nls.localizeWithPath(
|
|
1469
|
+
return { content: ( nls.localizeWithPath(
|
|
1470
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1471
|
+
'remote.tunnelsView.portShouldBeNumber',
|
|
1472
|
+
"Local port should be a number."
|
|
1473
|
+
)), severity: Severity.Error };
|
|
1265
1474
|
}
|
|
1266
1475
|
else if (Number(value) >= maxPortNumber) {
|
|
1267
1476
|
return { content: invalidPortNumberString, severity: Severity.Error };
|
|
@@ -1304,12 +1513,22 @@ var ChangeLocalPortAction;
|
|
|
1304
1513
|
source: tunnelItem.source
|
|
1305
1514
|
});
|
|
1306
1515
|
if (newForward && (typeof newForward !== 'string') && newForward.tunnelLocalPort !== numberValue) {
|
|
1307
|
-
notificationService.warn(nls.localizeWithPath(
|
|
1516
|
+
notificationService.warn(( nls.localizeWithPath(
|
|
1517
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1518
|
+
'remote.tunnel.changeLocalPortNumber',
|
|
1519
|
+
"The local port {0} is not available. Port number {1} has been used instead",
|
|
1520
|
+
value,
|
|
1521
|
+
newForward.tunnelLocalPort ?? newForward.localAddress
|
|
1522
|
+
)));
|
|
1308
1523
|
}
|
|
1309
1524
|
}
|
|
1310
1525
|
},
|
|
1311
1526
|
validationMessage: (value) => validateInput(tunnelService, value, tunnelService.canElevate),
|
|
1312
|
-
placeholder: nls.localizeWithPath(
|
|
1527
|
+
placeholder: ( nls.localizeWithPath(
|
|
1528
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1529
|
+
'remote.tunnelsView.changePort',
|
|
1530
|
+
"New local port"
|
|
1531
|
+
))
|
|
1313
1532
|
});
|
|
1314
1533
|
}
|
|
1315
1534
|
};
|
|
@@ -1341,8 +1560,16 @@ var SetTunnelProtocolAction;
|
|
|
1341
1560
|
( (function(SetTunnelProtocolAction) {
|
|
1342
1561
|
SetTunnelProtocolAction.ID_HTTP = 'remote.tunnel.setProtocolHttp';
|
|
1343
1562
|
SetTunnelProtocolAction.ID_HTTPS = 'remote.tunnel.setProtocolHttps';
|
|
1344
|
-
SetTunnelProtocolAction.LABEL_HTTP = nls.localizeWithPath(
|
|
1345
|
-
|
|
1563
|
+
SetTunnelProtocolAction.LABEL_HTTP = ( nls.localizeWithPath(
|
|
1564
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1565
|
+
'remote.tunnel.protocolHttp',
|
|
1566
|
+
"HTTP"
|
|
1567
|
+
));
|
|
1568
|
+
SetTunnelProtocolAction.LABEL_HTTPS = ( nls.localizeWithPath(
|
|
1569
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1570
|
+
'remote.tunnel.protocolHttps',
|
|
1571
|
+
"HTTPS"
|
|
1572
|
+
));
|
|
1346
1573
|
async function handler(arg, protocol, remoteExplorerService) {
|
|
1347
1574
|
if (isITunnelItem(arg)) {
|
|
1348
1575
|
const attributes = {
|
|
@@ -1488,14 +1715,22 @@ MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({
|
|
|
1488
1715
|
group: '2_localaddress',
|
|
1489
1716
|
order: 2,
|
|
1490
1717
|
submenu: MenuId.TunnelPrivacy,
|
|
1491
|
-
title: nls.localizeWithPath(
|
|
1718
|
+
title: ( nls.localizeWithPath(
|
|
1719
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1720
|
+
'tunnelContext.privacyMenu',
|
|
1721
|
+
"Port Visibility"
|
|
1722
|
+
)),
|
|
1492
1723
|
when: ( ContextKeyExpr.and(isForwardedExpr, TunnelPrivacyEnabledContextKey))
|
|
1493
1724
|
}));
|
|
1494
1725
|
MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({
|
|
1495
1726
|
group: '2_localaddress',
|
|
1496
1727
|
order: 3,
|
|
1497
1728
|
submenu: MenuId.TunnelProtocol,
|
|
1498
|
-
title: nls.localizeWithPath(
|
|
1729
|
+
title: ( nls.localizeWithPath(
|
|
1730
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1731
|
+
'tunnelContext.protocolMenu',
|
|
1732
|
+
"Change Port Protocol"
|
|
1733
|
+
)),
|
|
1499
1734
|
when: ( ContextKeyExpr.and(isForwardedExpr, isNotMultiSelectionExpr))
|
|
1500
1735
|
}));
|
|
1501
1736
|
MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({
|
|
@@ -1593,6 +1828,10 @@ registerColor('ports.iconRunningProcessForeground', {
|
|
|
1593
1828
|
dark: STATUS_BAR_REMOTE_ITEM_BACKGROUND,
|
|
1594
1829
|
hcDark: STATUS_BAR_REMOTE_ITEM_BACKGROUND,
|
|
1595
1830
|
hcLight: STATUS_BAR_REMOTE_ITEM_BACKGROUND
|
|
1596
|
-
}, nls.localizeWithPath(
|
|
1831
|
+
}, ( nls.localizeWithPath(
|
|
1832
|
+
'vs/workbench/contrib/remote/browser/tunnelView',
|
|
1833
|
+
'portWithRunningProcess.foreground',
|
|
1834
|
+
"The color of the icon for a port that has an associated running process."
|
|
1835
|
+
)));
|
|
1597
1836
|
|
|
1598
1837
|
export { ForwardPortAction, OpenPortInBrowserAction, OpenPortInPreviewAction, TunnelPanel, openPreviewEnabledContext };
|