Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

resolve workspace.root deprecation warning#72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 1 commit intomasterfromfix/workspace-root-deprecation
Jan 13, 2020
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletionssrc/actions/utils/openFiles.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,21 +8,11 @@ const openFiles = async (files: string[]) => {
}
for (const filePath of files) {
try {
// TODO figure out why this does not work
// try {
// const absoluteFilePath = join(workspaceRoot.uri.path, filePath)
// const doc = await vscode.workspace.openTextDocument(absoluteFilePath)
// await vscode.window.showTextDocument(doc, vscode.ViewColumn.One)
// // there are times when initialization leave the panel behind any files opened
// // ensure the panel is redrawn on the right side first
// // webview.createOrShow()
// } catch (error) {
// console.log(`Failed to open file ${filePath}`, error)
// }
const wr = vscode.workspace.rootPath
if (!wr) {
throw new Error('No workspace root path')
const workspaceFolders: vscode.WorkspaceFolder[] | undefined = vscode.workspace.workspaceFolders
if (!workspaceFolders || !workspaceFolders.length) {
throw new Error('No workspace directory. Open a workspace directory and try again')
}
const wr: string = workspaceFolders[0].uri.path
const absoluteFilePath = join(wr, filePath)
const doc = await vscode.workspace.openTextDocument(absoluteFilePath)
await vscode.window.showTextDocument(doc, vscode.ViewColumn.One)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp