[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [viatra-dev] Transformation API
|
OK, I think I get it now.
The other idea I had in mind was to provide an API shorthand for "packaging" several simple (pure Xtend) manipulation operations into a single "command". AFAIK this is the main reason why we want to create "convenience methods" in the first place right? What if we turn the whole thing on its head?
--
Istvan RATH, PhDResearch fellow
Budapest University of Technology and Economics
Fault Tolerant Systems Research Group
On Sunday, September 29, 2013 at 9:53 PM, Ujhelyi Zoltán wrote:
Hi,
the state_Name is the EMF Reflective API literal (Xtend shorthand for *Package.getState_Name() ), while basic is the Object we are setting, so the code is not bogus (at least not in an easily understandable way).
However, this code is not the easiest thing to write manually (at least it was not for me), that's why an alternative like Gábor suggested would be nice (but sadly, I believe is not feasible for single-value features).
Zoli
-- Zoltán Ujhelyi
Fault Tolerant Systems Research Group
Budapest University of Technology and Economics
So the line
Why don't we require to use the EMF reflective API in this case? I.e. by passing the appropriate literal from the EPackage?
--
Istvan RATH, PhD
Research fellow
Budapest University of Technology and Economics
Fault Tolerant Systems Research Group
On Sunday, September 29, 2013 at 9:41 PM, Ujhelyi Zoltán wrote:
The problem is that I cannot find any implementation behind the interface, that works, as the method.name (
http://method.name) would return a string without any metainformation, e.g. the corresponding EStructuralFeature. Without knowing the feature (even by knowing the defining object and the Java type) it is not possible to change to original reference.
This issue does not appear in case of lists, as EMF always returns modifiable lists.
Zoli
-- Zoltán Ujhelyi
Fault Tolerant Systems Research Group
Budapest University of Technology and Economics
Gábor suggested to have convenience methods that handle ELists findable from the EMF API, e.g.:
* method.add(method.parameters, newParameter)
This approach works well for multi-valued references (even better than my EMF-reflective implementation), however, for single-value references or attribute I see no way of implementing an API like this, e.g.:
What's wrong with this? I don't think it looks awkward.
--
Istvan RATH, PhD
Research fellow
Budapest University of Technology and Economics
Fault Tolerant Systems Research Group
_______________________________________________
viatra-dev mailing list
_______________________________________________
viatra-dev mailing list
_______________________________________________
viatra-dev mailing list
_______________________________________________
viatra-dev mailing list