simplify closeExtensionHostWindow via broadcast

This commit is contained in:
Benjamin Pasero
2017-07-18 10:42:08 +02:00
parent 7d42622dab
commit d4ff203d81
7 changed files with 22 additions and 48 deletions
-20
View File
@@ -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;
}