-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This option allows to choose whether to diagnose the open files or all files in the workspace. Fixed #149
- Loading branch information
1 parent
056cd7f
commit d73f761
Showing
3 changed files
with
94 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { TabInputText, Uri, window } from "vscode"; | ||
|
||
/** | ||
* Gets the URIs of the tabs opened in the editor whose input is of type TabInputText. | ||
* @returns An array of URIs | ||
*/ | ||
export function getAllOpenTabInputTextUri(): Uri[] { | ||
const uris: Uri[] = []; | ||
const tabGroups = window.tabGroups.all; | ||
const tabs = tabGroups.flatMap((group) => group.tabs.map((tab) => tab)); | ||
tabs.forEach((tab) => { | ||
if (tab.input instanceof TabInputText) { | ||
uris.push(tab.input.uri); | ||
} | ||
}); | ||
return uris; | ||
} |