-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from raspberrypi/cmake-tools-compatibility
Add support for cmake-tools extension
- Loading branch information
Showing
8 changed files
with
224 additions
and
65 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
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,43 @@ | ||
import { CommandWithResult } from "./command.mjs"; | ||
import { workspace } from "vscode"; | ||
import { getPythonPath, getPath } from "../utils/cmakeUtil.mjs"; | ||
|
||
export class GetPythonPathCommand | ||
extends CommandWithResult<string> { | ||
constructor() { | ||
super("getPythonPath"); | ||
} | ||
|
||
async execute(): Promise<string> { | ||
if ( | ||
workspace.workspaceFolders === undefined || | ||
workspace.workspaceFolders.length === 0 | ||
) { | ||
return ""; | ||
} | ||
|
||
const pythonPath = await getPythonPath(); | ||
|
||
return pythonPath; | ||
} | ||
} | ||
|
||
export class GetEnvPathCommand | ||
extends CommandWithResult<string> { | ||
constructor() { | ||
super("getEnvPath"); | ||
} | ||
|
||
async execute(): Promise<string> { | ||
if ( | ||
workspace.workspaceFolders === undefined || | ||
workspace.workspaceFolders.length === 0 | ||
) { | ||
return ""; | ||
} | ||
|
||
const path = await getPath(); | ||
|
||
return path; | ||
} | ||
} |
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
Oops, something went wrong.