Eclipse插件:对视图的关闭做出反应? [英] Eclipse plugin: react on closure of view?
问题描述
如何获取关闭我的视图的通知?
p>使用 IPartService.addPartListener(IPartListener)
。
编辑:关闭会话(Eclipse关闭时) org.eclipse.ui.part.ViewPart.saveState(IMemento)
将被调用以允许您保存可恢复的状态在你的下一次激活。但如果用户关闭了零件,则不会被调用。
I have an Eclipse pluging view that extends ViewPart (if that means something). I want to be notified when my view is closed or eclipse is closed entirely to perform some final operations.
How can I get a notification of my view being closed?
Use IPartService.addPartListener(IPartListener)
.
EDIT: Also, for session close (when Eclipse is shut down) org.eclipse.ui.part.ViewPart.saveState(IMemento)
will be called to allow you to save state that can be restored on your next activation. But it will not be called if the user closes the part.
这篇关于Eclipse插件:对视图的关闭做出反应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!