| Summary: | Add ability to contribute custom field-editor GUI to the Build Option Settings page | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Baltasar Belyavsky <bbelyavsky> | ||||||||
| Component: | cdt-build-managed | Assignee: | Chris Recoskie <recoskie> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Chris Recoskie <recoskie> | ||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | cdt-build-managed-inbox, jaiswal.123, jamesblackburn+eclipse, marcin.swiezawski, miwako.tokugawa, richard.horbach, yevshif | ||||||||
| Version: | 7.0 | ||||||||||
| Target Milestone: | 8.0 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Baltasar Belyavsky
Created attachment 175261 [details]
Workspace patch - applies to HEAD.
Created attachment 186838 [details]
Updated patch - applies to HEAD
In reply to comment #0) > The managedbuild model (IOption class) stores the field-editor as the > IConfigurationElement in order not to introduce any unnecessary dependencies on > JFace. The field-editor itself is instantiated only from the UI layer. In general I support the idea of adding custom editors for options. I think this aspect of the patch needs to be reworked though. IConfigurationElements are not supposed to be long-lived objects so you shouldn't be using them as handles. Also, since you are contributing UI it doesn't make sense to contribute the editor itself in the core plugin, it really ought to be in the UI plugin. I think a better way to do this would be for there to be an option editor extension point in managedbuilder.ui. Contributions to that point would allow one to specify an option editor and a mandatory string ID. Then the Option element in the buildDefinitions in managedbuilder.core could optionally specify the string ID of the editor it should use. That way there are no UI APIs bleeding through into the core. At the time the UI is generated, the Option's editor ID would be consulted to see if a special editor should be instantiated, and instantiate it as necessary. Created attachment 188093 [details]
Updated patch - applies to HEAD
Chris,
Thanks for looking into this. I've uploaded an updated patch incorporating your feedback.
In summary, I've added a new extension-point - "org.eclipse.cdt.managedbuilder.ui.buildDefinitionsUI". I gave it a generic name, "buildDefinitionsUI", in case if anyone in the future needs to add any other UI contributions with the need to reference them from the core.buildDefinitions extension-point. And also to give this new extension-point a logical connection to the core.buildDefinitions extension-point. Just as before, the custom field-editor still gets instantiated only at the point when the dialog page is rendered on the UI thread.
Let me know if you have any other comments.
Thanks!
Comment on attachment 188093 [details]
Updated patch - applies to HEAD
Applied to HEAD. Thanks.
Marking FIXED. *** cdt cvs genie on behalf of crecoskie *** Bug 320949 - Add ability to contribute custom field-editor GUI to the Build Option Settings page [*] IOption.java 1.31 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IOption.java?root=Tools_Project&r1=1.30&r2=1.31 [*] Option.java 1.52 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java?root=Tools_Project&r1=1.51&r2=1.52 [*] OptionReference.java 1.39 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java?root=Tools_Project&r1=1.38&r2=1.39 [*] buildDefinitions.exsd 1.48 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd?root=Tools_Project&r1=1.47&r2=1.48 [*] plugin.properties 1.70 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui/plugin.properties?root=Tools_Project&r1=1.69&r2=1.70 [*] plugin.xml 1.134 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui/plugin.xml?root=Tools_Project&r1=1.133&r2=1.134 [+] buildDefinitionsUI.exsd http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui/schema/buildDefinitionsUI.exsd?root=Tools_Project&revision=1.1&view=markup [*] BuildOptionSettingsUI.java 1.25 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionSettingsUI.java?root=Tools_Project&r1=1.24&r2=1.25 [+] ICustomBuildOptionEditor.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ICustomBuildOptionEditor.java?root=Tools_Project&revision=1.1&view=markup |