【问题标题】:How to program the "Restore Defaults" and "Apply" button in PropertyPages如何对 PropertyPages 中的“Restore Defaults”和“Apply”按钮进行编程
【发布时间】:2017-04-24 10:42:43
【问题描述】:

我正在为 Eclipse 插件设计一个属性页。我需要对页面上默认创建的“恢复默认值”和“应用”按钮进行编程。有人可以帮助我如何去做吗?

谢谢!

【问题讨论】:

  • 通常不需要额外的工作来应用和恢复默认工作。你能提供一个你打算做什么的样本吗?

标签: java eclipse eclipse-plugin swt eclipse-rcp


【解决方案1】:

您可以覆盖属性页中的performDefaultsperformApply 方法来处理这些按钮。通常你应该调用super 方法:

@Override
protected void performDefaults() {
    super.performDefaults();

    // TODO your code
}

@Override
protected void performApply() {
    super.performApply();

    // TODO your code
}

【讨论】:

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