Community
Participate
Working Groups
Currently, when we want to contribute a specific widget to replace a default one (e.g. RichText editor vs Text Editor, XText-based editor, ...), we have to either: - Replace the widget code directly - Create a new widget and substitute the properties view section These options don't scale. It should be possible to substitute widgets directly (With different scopes: for all properties, e.g. replace all BooleanRadio with a BooleanCheckbox, or for a specific property, e.g. replace TextEditor with RichTextEditor for editing Comment#body). The substitution should work form a separate plug-in, i.e. a plug-in B should be able to contribute the Widget/Model to substitute parts of plug-in A (The goal is to be able to optionally install some advanced editor, for example as part of an extra plug-in)
Substitution should be possible at least for the following elements: - Context: Disable/Replace an entire configuration (Similar to what 'prototype' does) - (View) - (Section) - Widget: Replace an editor with another one (e.g. CommentBodyEditor with EPF RichText Body Editor, MultiReference with Table, ...) - ModelElement/Factory: Replace some parts of the logic used to manipulate the Model (Label Providers, Content Providers, Observables...) without changing/duplicating the View/Section/Layout
Widget substitution might be a little bit complex to implement, since everything is translated to XWT at customization time. The only way to do the substitution at runtime would be to post-process the XML before rendering So maybe Section-level substitution would be sufficient (View substitution is already possible via Constraints overriding, although that's not so intuitive)