java - Eclipse RCP : don't refresh View when it is minimized

标签 java eclipse-plugin eclipse-rcp minimize

我们有View that shows file from Internet

public class GfmView extends ViewPart implements GfmListener {

如何知道View何时最小化,这样也许就不需要刷新View了。

#8 [optimization] Don't update View when it is minimized

Documentation没有say关于它。

最佳答案

您可以添加一个 org.eclipse.ui.IPartListener2 - 实现来跟踪 View 的状态。如果您的 View 将被最小化(或关闭或隐藏或...),则调用此监听器

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().addPartListener(<myPartListener>)

关于java - Eclipse RCP : don't refresh View when it is minimized,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17572204/

相关文章:

java - 无法使用 android 支持库 - NoClassDefFoundError : android. support.v7.appcompat.R$attr

android - 如何使用 Junit 运行 AndroidDriver 测试?

eclipse - 使用命令行将插件安装到 Eclipse 中

eclipse - P2 headless 更新不起作用

java - Eclipse for RCP 与 Eclipse Classic 有何不同?

Java/Eclipse : switching from JRE . 6 至 .7

java - 循环算法

java - 使用 "try with resources"创建没有任何引用的资源

java - 如何在 eclipse 4.2 中贡献一个新 View ?

python - 选项卡在 Python 中无法正常工作