src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts/ProcessExplorer/showContextMenu
class ProcessExplorer:	private showContextMenu(item: ProcessItem, isLocal: boolean) {
		const items: IContextMenuItem[] = [];
		const pid = Number(item.pid);

		if (isLocal) {
			items.push({
				label: localize('killProcess', "Kill Process"),
				click: () => {
					this.nativeHostService.killProcess(pid, 'SIGTERM');
				}
			});

			items.push({
				label: localize('forceKillProcess', "Force Kill Process"),
				click: () => {
					this.nativeHostService.killProcess(pid, 'SIGKILL');
				}
			});

			items.push({
				type: 'separator'
			});
		}

		items.push({
			label: localize('copy', "Copy"),
			click: () => {
				// Collect the selected pids
				const selectionPids = this.tree?.getSelection()?.map(e => {
					if (!e || !('pid' in e)) {
						return undefined;
					}
					return e.pid;
				}).filter(e => !!e) as number[];
				// If the selection does not contain the right clicked item, copy the right clicked
				// item only.
				if (!selectionPids?.includes(pid)) {
					selectionPids.length = 0;
					selectionPids.push(pid);
				}
				const rows = selectionPids?.map(e => document.getElementById(`pid-${e}`)).filter(e => !!e) as HTMLElement[];
				if (rows) {
					const text = rows.map(e => e.innerText).filter(e => !!e) as string[];
					this.nativeHostService.writeClipboardText(text.join('\n'));
				}
			}
		});

		items.push({
			label: localize('copyAll', "Copy All"),
			click: () => {
				const processList = document.getElementById('process-list');
				if (processList) {
					this.nativeHostService.writeClipboardText(processList.innerText);
				}
			}
		});

		if (item && isLocal && this.isDebuggable(item.cmd)) {
			items.push({
				type: 'separator'
			});

			items.push({
				label: localize('debug', "Debug"),
				click: () => {
					this.attachTo(item);
				}
			});
		}

		popup(items);
	}