【问题标题】:How can I change the button that is in the view如何更改视图中的按钮
【发布时间】:2011-03-23 18:02:22
【问题描述】:

我在查看器上有一个切换按钮![alt text][1]

问题是,开机后,如何恢复上次的状态。 就像即使默认值为 false ,如何以编程方式将其设置为 true 。

在 plugin.xml 中,默认状态为 true。

【问题讨论】:

    标签: eclipse swt rcp jface


    【解决方案1】:

    如果通过命令贡献了它,你需要切换命令的状态(参见 HandlerUtil.toggleCommandState() 方法),然后调用 ICommandService.refreshElements() 来更新该命令的所有贡献

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多