Skip to content

如何监控文件的打开与关闭? #2695

Closed Answered by erha19
hanbingzi asked this question in Q&A
Discussion options

You must be logged in to vote

@hanbingzi 可以用下面这种方式:

@Autowired(WorkbenchEditorService)
private readonly editorService: WorkbenchEditorServiceImpl;

this.editorService.onActiveResourceChange((resource) => {
...
})

额外的方法可以自己看一下 TS 声明信息

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@hanbingzi
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by hanbingzi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants