VSCODE问题选项卡:如何在一个特定问题上订阅OnClick事件

发布于 2025-01-28 10:46:19 字数 585 浏览 1 评论 0原文

我正在开发VSCODE扩展程序(图形建模器,而不是基于文本的图形建模器)。在验证时,某些错误/问题可以在“ VSCODE问题”选项卡中显示。 (诊断收集)。如何在“问题”选项卡中列出的特定问题上拦截单击事件?我需要在自定义建模器中突出显示相关对象。 Vscode中似乎只有标准的内置行为可以滚动到文本行。我找不到API可以订阅“ VSCODE问题”选项卡中的有关问题的单击事件。

方案:

  • 我们有一个用于BPM的图形自定义编辑器,作为在WebView中运行的VSCODE扩展程序(非基于文本的编辑器:请参见ScreenShot),
  • 有一个验证器,可以在VS代码问题选项卡中显示一些问题(作为诊断集合) 。
  • 当用户单击特定问题(例如第三消息)时,我们现在如何单击问题列表中的第三个问题?我们希望使用该用户事件在图形建模器中显示一些(问题文本或解决方案)。因此,我们无法利用用于基于文本语言的VSCODE内置功能。

screenshot vscode vscode vscode图形自定义编辑器

I am developing a VSCode extension (a graphical modeler, not text based). On validate some errors/problems can show up in the VSCode problems tab. (Diagnostics Collection). How can I intercept a click event on a specific problem listed in the problems tab? I need to highlight the related object in my custom modeler. It seems there is only a standard built-in behavior in VSCode to scroll to a text-line. I can't find an API to subscribe to click events on problems in the VSCode problems tab.

Scenario:

  • We have a graphical custom editor for BPM as VSCode extension running in a Webview (A non text-based editor: See screenshot)
  • There is a validator and several problems can be show up in VS Code problems tab (As a diagnostic collection).
  • When user clicks on specific problem (e.g. the 3rd message) How can we now the user clicked on the 3rd problem in the list of problems? We want to use that user-event to show some (problem text or solution) in the graphical modeler. So we can't make use of the VSCode built-in features for text based languages.

Screenshot VSCode Graphical Custom Editor

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文