[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [gemoc-dev] link between aspects and eObjects
|
Hi all,
As Fabien mentionned, we already started to think of how to provide a
set of services in GEMOC to be able to access the dynamic data in all
circumstances, if possible independently to K3/ALE/Xmof/Melange/etc.
This could include :
- a gemoc sirius interpreter
- a generic interface ("get me the value of the mutable field token
associated with object o" or "get me all token objects")
- an Ecore interface (such as the one generated by Melange)
- etc.
I had started an (slightly outdated) issue here on this topic:
https://github.com/eclipse/gemoc-studio/issues/41
Cheers,
Erwan
Le mercredi 20 juin 2018 à 14:32 +0200, Julien DeAntoni a écrit :
> That's it.
> Thanks everyone I succeeded in accessing the runtime date from a
> sirius
> service.
>
> I wrote a generic method "public String getAspectProperty(EObject
> eObject, String languageName, String aspectName, String
> propertyName)"
> that is used to write dedicated getters.
> It works fine.
> It will be committed in the SigPML example, which is working fine
> with
> the last "concurrency build" of the gemoc studio.
> At some points, we may want to provide a K3 dedicated Sirius
> interpreter, like Fabien did for ALE.
>
> Thanks again.
> j
>
> On 06/20/2018 11:59 AM, fcoulon wrote:
> > It is also related to this PR:
> > https://github.com/eclipse/gemoc-studio-modeldebugging/pull/42
> > We started to think about a clear & simple API to access dynamic
> > data.
> >
> > We have a default implementation to access to dynamic data when
> > they
> > are in the EObjects:
> > https://github.com/eclipse/gemoc-studio-modeldebugging/blob/master/
> > framework/execution_framework/plugins/org.eclipse.gemoc.executionfr
> > amework.debugger/src/org/eclipse/gemoc/executionframework/debugger/
> > DefaultDynamicPartAccessor.java
> >
> >
> > I guess Julien need an implementation of IDynamicPartAccessor based
> > on
> > K3 Aspects
> >
> > Fabien
> >
> > Le 2018-06-20 10:42, Didier Vojtisek a écrit :
> > > Hi
> > >
> > > in K3 aspect instances are hidden, everything is available
> > > throught
> > > the static methods applied to the EObject itself. The static
> > > method
> > > takes care to retreive or create the "companion" object and call
> > > the
> > > code using its data.
> > >
> > > the link set by Fabien works using java invoke but you can can
> > > directly the aspects in pure java
> > >
> > > if you look at
> > > http://diverse-project.github.io/k3/publish/user_documentation/ht
> > > ml_single/user_documentation.html#_k3_active_annotations_compilat
> > > ion_example
> > >
> > > it creates an aspect on java class "File" (but in GEMOC we use it
> > > to
> > > add aspects on java classes generated from the ecore mm; but it
> > > works
> > > the same)
> > >
> > > in the example the line :
> > >
> > > val f = new File("toto.txt")
> > > f.contentType = "txt"
> > >
> > > is possible thanks to the import static extension ....*
> > > but actually means(in xtend)
> > >
> > > val f = new File("toto.txt")
> > > SampleXMLFileAspect.contentType(f, "txt")
> > > which is exactly the same in java (just add ; and correct
> > > variable
> > > declaration ;-) )
> > >
> > > this also works for methods defined in the aspect using a form
> > > similar
> > > to :
> > >
> > > MyClassAsspect.myMethod(aspectizedObject,
> > > optionalothermethoparameters);
> > >
> > > I think this would be safer to use since it adds static typing to
> > > your
> > > code :-)
> > >
> > > cheers
> > > Didier
> > >
> > > Le 20/06/2018 à 10:13, Julien DeAntoni a écrit :
> > >
> > > > Thanks Fabien. I already tried with this helper, from which I
> > > > can
> > > > retrieve the Aspect classes, however I'm not able to retrieve
> > > > the
> > > > instances of these aspects classes, that are used by the (one
> > > > of)
> > > > execution engine...
> > > > I tried to check the debugger perspective but it does not work
> > > > for
> > > > the concurrent engine, yet.
> > > >
> > > > any other pointers ?
> > > >
> > > > On 06/20/2018 09:50 AM, fcoulon wrote:
> > > > Very quick answer:
> > > >
> > > >
> > >
> > > https://github.com/eclipse/gemoc-studio-modeldebugging/blob/maste
> > > r/framework/execution_framework/plugins/org.eclipse.gemoc.executi
> > > onframework.engine/src/org/eclipse/gemoc/executionframework/engin
> > > e/commons/K3DslHelper.java
> > >
> > > >
> > > >
> > > > Another lead is to look at the Variable view in the debugger
> > > > perspective (it should be filled with attributes from Aspects)
> > > >
> > > > Fabien
> > > >
> > > > Le 2018-06-20 08:54, Julien DeAntoni a écrit :
> > > > Hello,
> > > >
> > > > I'm developing a concurrent language (actually working on the
> > > > gemoc
> > > > sigpml language). I'm using pure k3 to define the rewriting
> > > > rules
> > > > (no
> > > > Melange).
> > > >
> > > > The execution worked fine. Now I want to customize the sirius
> > > > odesign
> > > > to add an animation layer where runtime data (data defined in
> > > > k3)
> > > > can
> > > > be displayed.
> > > >
> > > > I plan to use a java service to retrieve the data.
> > > >
> > > > What is the entry point for that ? What class is supposed to
> > > > provide
> > > >
> > > > access to aspects from eObjects ?
> > > >
> > > > thanks
> > > >
> > > > julien
> > > >
> > > > --
> > > > Julien Deantoni
> > > > Associate Professor
> > > > I3S Lab - UMR 7271 -KAIROS
> > > > INRIA Sophia Antipolis Méditerranée
> > > > 2004 rte des Lucioles (Lagrange L-041)
> > > > BP93, F-06902 Sophia Antipolis Cedex, France
> > > > tel: +334 92 38 77 66
> > > > http://www.i3s.unice.fr/~deantoni/
> > > >
> > > > _______________________________________________
> > > > gemoc-dev mailing list
> > > > gemoc-dev@xxxxxxxxxxx
> > > > To change your delivery options, retrieve your password, or
> > > > unsubscribe from this list, visit
> > > > https://dev.eclipse.org/mailman/listinfo/gemoc-dev
> > > > _______________________________________________
> > > > gemoc-dev mailing list
> > > > gemoc-dev@xxxxxxxxxxx
> > > > To change your delivery options, retrieve your password, or
> > > > unsubscribe from this list, visit
> > > > https://dev.eclipse.org/mailman/listinfo/gemoc-dev
> > >
> > > --
> > > Didier Vojtisek
> > > SED Rennes - DiverSE Team
> > > Univ Rennes, Inria, CNRS, IRISA
> > > Campus de beaulieu
> > > 35042 Rennes
> > > 02 99 84 75 07
> > >
> > > _______________________________________________
> > > gemoc-dev mailing list
> > > gemoc-dev@xxxxxxxxxxx
> > > To change your delivery options, retrieve your password, or
> > > unsubscribe from this list, visit
> > > https://dev.eclipse.org/mailman/listinfo/gemoc-dev
> >
> > _______________________________________________
> > gemoc-dev mailing list
> > gemoc-dev@xxxxxxxxxxx
> > To change your delivery options, retrieve your password, or
> > unsubscribe from this list, visit
> > https://dev.eclipse.org/mailman/listinfo/gemoc-dev
>
>