如何通过自定义按钮打开完整的首选项对话框?

huangapple go评论70阅读模式
英文:

How to open a complete preferences dialog via custom button?

问题

我正在为自定义的IWorkingSets实现一个配置对话框。这些集合包括所选项目,还有两个额外的配置,它们有各自的属性页面。我已经成功实现了这些工作集的属性对话框,可以在Project Explorer中右键单击它们,然后选择Properties,但现在我想通过我的自定义配置对话框中的一个按钮打开那个PropertyDialog

我尝试使用了PropertyDialog,但该对话框不是API。是否有其他方法以编程方式打开属性对话框呢?

英文:

I'm implementing a configuration dialog for custom IWorkingSets. These sets consist of selected projects but also two additional configurations, which have their own properties pages. I've already managed to implement a functioning properties dialog for these working sets, which can be found by right-clicking them and selecting Properties in the Project Explorer, but now I'd like to open that PropertyDialog via a button in my custom configuration dialog.

I've tried to use PropertyDialog, but that dialog is not API. Is there another way to open the properties dialog programmatically?

答案1

得分: 2

org.eclipse.ui.dialogs.PreferencesUtil 提供了三个 createPropertyDialogOn 方法的属性对话框的官方API。

英文:

org.eclipse.ui.dialogs.PreferencesUtil provides an official API for the property dialog with three createPropertyDialogOn methods.

huangapple
  • 本文由 发表于 2020年7月21日 19:41:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/63013767.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定