Visual studio code 如何获取用户已从VSCode扩展打开的ViewColumns数?

Visual studio code 如何获取用户已从VSCode扩展打开的ViewColumns数?,visual-studio-code,vscode-extensions,Visual Studio Code,Vscode Extensions,我正在开发VSCode扩展,并使用以下命令打开webview: const panel = vscode.window.createWebviewPanel( 'webviewName', // Identifies the type of the webview. Used internally 'Webview Title', // Title of the panel displayed to the user

我正在开发VSCode扩展,并使用以下命令打开webview:

const panel = vscode.window.createWebviewPanel(
                'webviewName', // Identifies the type of the webview. Used internally
                'Webview Title', // Title of the panel displayed to the user
                vscode.ViewColumn.Two, // Editor column to show the new webview panel in.
                {} // Webview options.
            );
请注意传递给它的
ViewColumn.Two
参数。这会影响webview成为哪个视图列的一部分

我的预期行为是webview始终向侧面打开。这意味着,如果用户打开了一个文件,那么我可以在ViewColumn 2中打开它。但是,如果有两个文件并排打开,我需要在ViewColumn 3中打开它,依此类推

如何从VSCode API获取当前窗口中的ViewColumns数


另请注意:visual studio代码扩展标记不存在。我想创建它,但我没有足够的代表。

也许您正在查找
vscode.ViewColumn。在
旁边:

符号编辑器列,表示活动列侧面的列


上帝,我爱这个网站。花了4个月的时间,但最终我对这个相当深奥的问题有了一个很好的答案。谢谢