[furcas-discussion] Element re-use strategy for foreach
Thomas Goldschmidt
thomas.goldschmidt at de.abb.com
Fri Feb 18 15:59:57 CET 2011
Sounds like a good solution for me.
Could your add this to
http://www.furcas.org/wiki/index.php/Foreach-usecases `?
Thomas Goldschmidt
ABB AG
Forschungszentrum
Wallstadter Straße 59
68526 Ladenburg
Office Phone: +49 6203 716134
Office Fax: +49 6203 716253
e-mail: thomas.goldschmidt at de.abb.com
ABB AG
Sitz/Head Office: Mannheim
Registergericht/Registry Court: Mannheim
Handelsregisternummer/Commercial Register No.: HRB 4664
Geschäftsführung/Managing Board: Peter Smits (Vorsitzender), Joachim
Schneider, Markus Ochsner, Hans-Georg Krabbe
Vorsitzender des Aufsichtsrats/Chairman of Supervisory Board: Bernhard
Jucker
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
"Uhl, Axel" <axel.uhl at sap.com>
Sent by: furcas-discussion-bounces at lists.furcas.org
18.02.2011 15:41
To
furcas-discussion <furcas-discussion at lists.furcas.org>
cc
Subject
[furcas-discussion] Element re-use strategy for foreach
Hi,
the existing foreach code, if I understand it correctly, is trying to
re-use elements based on a comparison of the used Template's metaReference
(an EClass) and the eClass() of the object already in the target feature.
If these classes match up, the existing element is re-used and entered
into the ModelElementProxy instead of creating a new one.
But what if there are multiple when-clauses using different templates for
the same class, distinguished by different modes? Then the target elements
would need to be produced by different rules in different ways.
Wouldn't re-using an element produced by a differently-moded template for
the same class lead to also re-using a potentially wrong object state?
We also seem to be missing information about which template was used to
produce the target element as there is no separate
TextBlock/correspondingModelElement combination for the foreach target
elements. Instead, we only have the ForEachContext elements, but they
currently don't document the template that was used to create the target
element.
Suggestion: let's add a reference to ForEachContext which points to the
Template used to produce the element held in the resultModelElement
reference.
What do you say?
-- Axel
_______________________________________________
Furcas-discussion mailing list
Furcas-discussion at lists.furcas.org
http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110218/b2c66aa9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 454 bytes
Desc: not available
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110218/b2c66aa9/attachment.gif>
More information about the Furcas-discussion
mailing list