开发者

only one editor at a time? RCP

开发者 https://www.devze.com 2023-03-28 05:03 出处:网络
I was wondering if there is a manner to make it impossible to open more than 1 editor at a time? what I have now is a button that each time it is pressed gives a new edi开发者_StackOverflow中文版tor.

I was wondering if there is a manner to make it impossible to open more than 1 editor at a time? what I have now is a button that each time it is pressed gives a new edi开发者_StackOverflow中文版tor. I am using eclipse RCP

thanks


You could add an IPartListener on the IPartService of the IWorkbenchWindow that close all other editors when a new editor is opened. You find the current set of editors via IWorkbenchPage.getEditorReferences().

0

精彩评论

暂无评论...
验证码 换一张
取 消