Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Exported Packages in org.eclipse.emf.henshin.model [SOLVED]

Dear Christian,

thank you for your hints.

But accidentally I found a solution which I was not considering in
modelling with EMF.

I inherited from the Henshin model and a really lightweight class from
my software. And within the ESuper Types attribute I set my new class on
first position which led to that I only implemented the Henshin classes
interfaces instead of extending the implementations.

But then I set the Henshin classes on first position and I automatically
extended the Henshin - impl classes.

And that is, what I had in mind by inheriting from Henshin.


Again thank you very much,
Jürgen


Dipl.-Ing. Jürgen Freund
Arbeitsgruppe Ähnlichkeitsmechanik

Telefon: +49 (0)711 685 69530
E-Mail:  freund@xxxxxxxxxxxxxxxxxxxx

Postadresse:
Universität Stuttgart
Institut für Statik und Dynamik der Luft- und Raumfahrtkonstruktionen
Pfaffenwaldring 27 - Zimmer 01.002
70569 Stuttgart

On 16.08.2015 10:17, Christian Krause wrote:
> Hi Jürgen,
> 
> one more comment: for lightweight extensions of the Henshin metamodel,
> you could also use annotations (see the ModelElement and Annotation
> classes). For more complex extensions, it is better though to extend the
> metamodel as you did.
> 
> Cheers,
> Christian
> 
> 2015-08-14 12:52 GMT+02:00 Christian Krause <henshin.ck@xxxxxxxxx
> <mailto:henshin.ck@xxxxxxxxx>>:
> 
>     Hi Jürgen,
> 
>     instead of reimplementing the methods again, ideally the generated
>     implementation classes should inherit from Henshin's NodeImpl class.
>     If EMF does not do this automatically, you can try to use the
>     @extends tag in the user doc section of your generated
>     implementation classes. Usually this is used for adding interfaces,
>     but maybe it works also for superclasses. I did not find much
>     information about it, you can take a look
>     at https://www.faktorzehn.org/de/en/dokumentation/manuelle-anpassungen-des-generieten-codes/
>     or the EMF book.
> 
>     If the extends tag does not work, you could use a custom EMF
>     template to generate it in this way.
> 
>     If this also doesn't work, you need to reimplement the methods I
>     guess, as you are doing it now. I added the actions package to the
>     exports. You can pull the latest sources from git or fetch a nightly
>     build. For reference, here is the corresponding Gerrit change:
>     https://git.eclipse.org/r/#/c/53760/
> 
>     Cheers,
>     Christian
> 
> 
>     2015-08-14 11:34 GMT+02:00 Juergen Freund
>     <freund@xxxxxxxxxxxxxxxxxxxx <mailto:freund@xxxxxxxxxxxxxxxxxxxx>>:
> 
>         Hi Christian,
> 
>         so I made a model which has some classes that inherit from a
>         Henshin node.
> 
>         When I generate the model into Java then I have some
>         unimplemented methods.
>         e.g.: public Action getAction()
> 
>         My first implementation of these methods is just a copy from the
>         implemented methods within the henshin model.
> 
>         The above mentioned method uses
>         NodeActionHelper.INSTANCE.getAction(this); for the body. This
>         class is
>         within the org.eclipse.emf.henshin.model.actions package which
>         is not
>         exported from the Henshin manifest file.
> 
>         So I get the following error:
>         Access restriction: The method
>         'GenericActionHelper<Node,Rule>.getAction(Node)' is not API
>         (restriction
>         on required project 'org.eclipse.emf.henshin.model')
> 
> 
>         Greets,
>         Jürgen
> 
> 
> 
>         Dipl.-Ing. Jürgen Freund
>         Arbeitsgruppe Ähnlichkeitsmechanik
> 
>         Telefon: +49 (0)711 685 69530 <tel:%2B49%20%280%29711%20685%2069530>
>         E-Mail:  freund@xxxxxxxxxxxxxxxxxxxx
>         <mailto:freund@xxxxxxxxxxxxxxxxxxxx>
> 
>         Postadresse:
>         Universität Stuttgart
>         Institut für Statik und Dynamik der Luft- und
>         Raumfahrtkonstruktionen
>         Pfaffenwaldring 27 - Zimmer 01.002
>         70569 Stuttgart
> 
>         On 14.08.2015 11:22, Christian Krause wrote:
>         > Hi Juergen,
>         >
>         > Could you let us know the exact dependency problem / error
>         message?
>         >
>         > Cheers,
>         > Christian
>         >
>         >
>         > Sent from my mobile
>         >
>         > -------- Original message --------
>         > From: Juergen Freund
>         > Date:14/08/2015 10:23 (GMT+01:00)
>         > To: henshin-dev@xxxxxxxxxxx <mailto:henshin-dev@xxxxxxxxxxx>
>         > Subject: [henshin-dev] Exported Packages in
>         org.eclipse.emf.henshin.model
>         >
>         > Dear all,
>         >
>         > I try to use Henshin within a software I write and therefore I
>         inherit
>         > from parts of the Henshin model.
>         >
>         > But it will not compile since the package
>         > org.eclipse.emf.henshin.model.actions is not in the exported
>         list of the
>         > manifest file.
>         > Every package within the model plugin gets exported except
>         this one. Is
>         > there a specific reason for that?
>         >
>         >
>         > Thanks in advance and best regards,
>         > Jürgen
>         >
>         >
>         > --
>         > Dipl.-Ing. Jürgen Freund
>         > Arbeitsgruppe Ähnlichkeitsmechanik
>         >
>         > Telefon: +49 (0)711 685 69530
>         <tel:%2B49%20%280%29711%20685%2069530>
>         > E-Mail:  freund@xxxxxxxxxxxxxxxxxxxx
>         <mailto:freund@xxxxxxxxxxxxxxxxxxxx>
>         >
>         > Postadresse:
>         > Universität Stuttgart
>         > Institut für Statik und Dynamik der Luft- und
>         Raumfahrtkonstruktionen
>         > Pfaffenwaldring 27 - Zimmer 01.002
>         > 70569 Stuttgart
>         > _______________________________________________
>         > henshin-dev mailing list
>         > henshin-dev@xxxxxxxxxxx <mailto:henshin-dev@xxxxxxxxxxx>
>         > To change your delivery options, retrieve your password, or
>         unsubscribe
>         > from this list, visit
>         > https://dev.eclipse.org/mailman/listinfo/henshin-dev
>         >
>         >
>         > _______________________________________________
>         > henshin-dev mailing list
>         > henshin-dev@xxxxxxxxxxx <mailto:henshin-dev@xxxxxxxxxxx>
>         > To change your delivery options, retrieve your password, or
>         unsubscribe from this list, visit
>         > https://dev.eclipse.org/mailman/listinfo/henshin-dev
>         >
>         _______________________________________________
>         henshin-dev mailing list
>         henshin-dev@xxxxxxxxxxx <mailto:henshin-dev@xxxxxxxxxxx>
>         To change your delivery options, retrieve your password, or
>         unsubscribe from this list, visit
>         https://dev.eclipse.org/mailman/listinfo/henshin-dev
> 
> 
> 
> 
> 
> _______________________________________________
> henshin-dev mailing list
> henshin-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/henshin-dev
> 


Back to the top