Can't find the "M2Doc Template Editor"

Hello,
Very new to M2doc here,

  1. As i was following a tutorial, i saw that i had no “M2Doc Template Editor”. And i came here for help, i am using Capella 1.3.3 to practice (i also got the last version 5.0 for other uses than M2Doc for now).

Here are the steps i followed :

  • Opened Capella -> Help -> Install New Software
  • Copy pasted the link found here ( Capella M2Doc tutorial - M2Doc), for 1.3.1 version. And then selected all the files, and i got a warning at about 250MB/2000 or so. I went through.
  • On the Capella Project Explorer, right click -> new -> Other -> Capella - M2 DOC
  • A project opens called “In-Flight Entertainment System With M2Doc”
    It contains templates such as “Template LA Complete.genconf”

First problem, when i DOUBLE CLICK it, it shows the txt content file, whereas is this tutorial ( [Webinar] How to Collaborate and Generate Documents with Capella? (by Obeo) - YouTube), in minute 25:38, when the person double clicks he gets a different interface

Second Problem, later in minute 39:30, the user does the following : right click on a template.docx -> open with -> other -> M2Doc Template Editor.

Well i don’t have that editor ?! Why? Could anyone provide any insight? Thank you.

  1. Whenever i figured this, in order to use this solution with ACTUAL REAL capella projects, i would need to start doing something called " USING M2DOC PROGRAMMATICALLY"? (described at end of the document that i could not link because i can’t link more than 2 links as a new user, it’s called [Reference Documentation - M2Doc] Reference Documentation 1.0.0.).
    There is no other simple “click and generate” method?

  2. I found some web pages talking about M2Doc was with a software called ObeO, is M2Doc supposed to work better on that software somehow? I know nothing about ObeO.

Thank you

If you can’t find any of the menu/wizard referenced bellow, you need to make sure you have installed the GUI part of M2Doc. In the installation dialog where you entered the update site url, make sure all features are installed as shown on this page. More precisely on this screenshot, even if the features might differ on your version.

The M2Doc interfaces changes a bit since this webinar was made. You can right click on the .genconf file and select Edit documentation configuration and have a look at the Generation configuration wizard. It is similar to the editor shown in the webinar.

Same thing with the template editor, you need to use the template properties wizard.

You should have a menu when right clicking on a .genconf file called “Generate documentation”. You can use it to generate a document.
For other needs you can also have a look a the Capella command line, there is one implementation of launching M2Doc generation for Capella and from the command line:

./capella -data runtime-New_configuration -application org.polarsys.capella.core.commandline.core -appid org.obeonetwork.capella.m2doc.commandline -filepath "In-Flight Entertainment System With M2Doc/Template SA Complete.genconf"

You can also run M2Doc generation form maven.

Obeo is the name of the company behind M2Doc. Obeo is also editing Sirius a technology to create diagram editors used by Capella.

1 Like

Hello, thank you for your answer.
I got all the elements of the GUI normally.
I was able to use your instructions to generate a document for a DIFFERENT project than the example (from webinar : flight…). Here is how :

  • When i right click on .genconf and select Edit Documentation. I click on “Next” then “Add Ressource” => then choose one of the files for my own project (i think it was the .capella/.melodymodeller… or was it .aird?)
    Afterwards, i have to select the “self” variable name, and in order to change its value, i click on “edit” which becomes clickable. Then i will find a long list and at its bottom, i can find my own projet which i select.
    “finish”
    Then i right click and select “generate documents”. The document is produced.
  1. Is this the only and supposed method to add your project ? (“Add” then go back to the value and “Edit”…)

  2. Do all of this elements in the menu shown after clicking on the “edit” bouton, have a purpose, what is it ? (screen shot below)

  3. So if i go to my template and add those varibales ( m:var: variable name)
    And follow the method i described. I am good to go with M2Doc? Is there anythmore IMPORTANT i should know? And what about that “optione(expert)” mode in the “edit documentation” menu?

  4. Edit : I just noticed this process worked with (Template LA Complete.genconf) but with (Template SA Complete.genconf) i get just an EMPTY FILE.

I did not check the capella commande line, nor Maven yet. Idk if i must since it seem to be able to generate documents from other projects. Thanks again

( last question : why does it warn me about the validity of this software ? When installing the new software M2Doc )
( Last last question : what is difference between the 1.0.0 version ( Reference Documentation - M2Doc ) and the Nightly version ( Reference Documentation - M2Doc) ? )

In the context of Capella you should set the SiriusSession option in your .genconf file, this will load models from your Capella project. The value of the option is a relative path to the .aird file. This will allow you to use Sirius services. If it’s set correctly, a default value should be defined for your model variables.

What you see in the model value selection dialog, is the list of all resources loaded by Capella (metamodels, the Capella model, …).

You need to use the variable you need in the template for instance by inserting a query:

{m:mySystem.name}

Then you can edit the template properties and set the metamodels you want to work with (all nsURI containing capella and all nsURI containing sirius). And then you can set the type of mySystem. From here you can then initialize your genconf file (see (5) above).

Not sure what to did here, but by default the SA genconf should generate some document.

For the command line and maven it’s only needed if you want to generate documents from continuous integration or external shell scripts.

last answer: M2Doc plugins are not signed, that’s why you get this warning.

last last answer: There is a version of the documentation for each version of M2Doc. The nightly documentation is for the version under development or the nightly build you can find in the download page. At the moment it’s M2Doc 3.2.0. When this version will be released, and entry 3.2.0 will be added to the documentation.

1 Like
Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.