Acceleo and Capella

Hello,
are there anywhere some examples how to work programmatically on a Capella-Model with Acceleo?
(e.g. for gathering and exporting information, documentation purposes etc.)
The UML example from the Acceleo page is not that easy to understand or transfer to Capella usage.
Kind regards

Hello,
There are no example that I know of using a Capella model as input of a generation. What you will need to know is the Capella metamodel in order to determine how to follow the references toward the information you need. You can follow the wiki page on
how to do just that.
I don’t really know about that metamodel in-depth myself, so I can’t help more than that. If you have more detailed questions, you might want to create a simple capella model and generator stub reproducing what you’re trying to achieve, or try to explain which information you’re trying to retrieve from the model, some of the capella people could try and help from there.
Laurent Goubet
Obeo

Hello,
I created some acceleo template to output from the capella metamodel. Here are some advice to help you to start.
first, your acceleo plugin must reference Capella Metamodel plugins, org.polarsys.capella.core.data.gen.
Then, in your module declaration, you shall declare all used metamodels. There are 14 of them in the 1.2 capella release. I also add the sirius metamodel, because I manipulates graphical representations, but it’s not mandatory.
Then you can now create your own template, and navigate using the metamodel, using capella references and attributes. Code completion, interpreter view can really help to understand theses concepts.
Best Regards,
J.Pe

Hello J.Pe, hello Laurent,
thank you very much - things become more clear now.
I will start with a simple model and generate an Acceleo-Template to generate some output.
Kind regands

Hello again,
I got things running now:

  • a simple Acceleo Template with an
  • Acceleo UI-Launcher Project
    I can run the UI-Project as “Eclipse Application” and I get a runtime-Capella-Studio with the Acceleo-Menue-item available on the .mymelodymodeller file of the Capella model.
    So, how can I get this Application deployed and installed in my “normal” Capella as dropin?
    Kind regards

Hi Richard,
In case you’re still experiencing the issue, an easy way which worked for me is to create update sites.
https://wiki.eclipse.org/FAQ_How_do_I_create_an_update_site_(site.xml)%3F
Worked for me, hope to work for you too.
Regards,
Parsa