mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 15:25:47 +01:00
simplify closeExtensionHostWindow via broadcast
This commit is contained in:
@@ -144,25 +144,5 @@ export function findWindowOnWorkspace<W extends ISimpleWindow>(windows: W[], wor
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export function findExtensionDevelopmentWindow<W extends ISimpleWindow>(windows: W[], extensionDevelopmentPath?: string): W {
|
||||
if (windows.length) {
|
||||
const res = windows.filter(w => {
|
||||
|
||||
// match on extension development path
|
||||
if (typeof extensionDevelopmentPath === 'string' && paths.isEqual(w.extensionDevelopmentPath, extensionDevelopmentPath, !platform.isLinux /* ignorecase */)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
if (res && res.length) {
|
||||
return res[0];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user