|
Re: [Xcore] Proposed way of adding adapters to new instances [message #1736005 is a reply to message #1735978] |
Fri, 24 June 2016 10:40 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Alexander,
The generated editor supports live validation. It's simply triggered by
listening to the command stack. Just set the GenModel's Decoration
property to Live in the Properties view (in the Xcore editor, with the
package selected) to enable this.
On 24.06.2016 03:53, Alexander Aumann wrote:
> Hey there,
>
> for the following simplified model:
>
>
> class Property {
> boolean required
> refers PropertyAssignment[*] assignments opposite propType
> }
> class PropertyAssignment {
> refers Property propType opposite assignments
> String assignedValue
> }
>
>
> I would like to add an adapter such that a change to the references
> property's required-attribute triggers re-validation of a
> PropertyAssignment object.
>
> Is there any way to add an adapter (e.g. at construction time) to
> every Property object in the xcore model? Or is the only way, as I
> expect from the sources I found, to adapt the generated code. I would
> like to avoid that as one of the benefits of xcore is, imho, that I
> can keep the generated code completely clean of customizations.
>
> Kind regards,
> Alexander
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03110 seconds