随风逐叶 随风逐叶
首页
  • Quick Reference (opens new window)
  • EgretEngine开发者文档 (opens new window)
  • TinaX框架
  • SSH教程
  • VSCode插件开发
关于
  • 分类
  • 标签
  • 归档

rontian

从事游戏开发10多年的老菜鸟一枚!
首页
  • Quick Reference (opens new window)
  • EgretEngine开发者文档 (opens new window)
  • TinaX框架
  • SSH教程
  • VSCode插件开发
关于
  • 分类
  • 标签
  • 归档
  • 环境配置
  • 脚手架
  • 启动与调试插件

  • Command配置

  • 发布

  • snippets
  • 插件配置

  • 常见编辑器API

    • 常见编辑器API
    • message
    • input box
    • quick pick
    • output channel
    • file selector
    • hover
    • selection
    • FileSystemWatcher
  • 参考文章

message

# message

用于展示提示性消息,出现在编辑器右下角,而不是顶部或右上角。

和console类似,提供了普通消息、警告消息、错误消息。

vscode.window.showInformationMessage('普通消息');
vscode.window.showWarningMessage('警告消息');
vscode.window.showErrorMessage('错误消息');
1
2
3

消息也支持交互按钮,当选中按钮时返回的是按钮本身:

vscode.window.showErrorMessage(`与starling的远程交互依赖vscode-starling.sid配置项`, '打开配置项').then(selection => {
  if (selection === '打开配置项') {
    vscode.commands.executeCommand('workbench.action.openSettings');
  }
});
1
2
3
4
5

上次更新: 2023/10/17, 16:50:29 访问次数: 0
常见编辑器API
input box

← 常见编辑器API input box→

最近更新
01
一些Shell常用的功能写法整理
10-20
02
删除git仓库submodule的步骤
10-20
03
django基本命令
10-16
更多文章>
Copyright © 2017-2025 随风逐叶
沪ICP备18008791号-1 | 沪公网安备31011502401077号

网站访问总次数: 0次
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式