Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Capella/Technical Information

< Capella
Revision as of 10:54, 31 January 2020 by Philippe.dul.thalesgroup.com (Talk | contribs) (Capella code requirements)

A good starting point for reading is PolarSys The_Forge that gives an overview of the process in terms of tooling.

Applicable Document

The instructions in this page follow the rules defined in the PolarSys Software Development Process for Capella and Kitalpha document. Please refer to this document for additional information.

Development Environment

https://github.com/eclipse/capella/wiki/Development-Environment

Contribute to GIT code

https://github.com/eclipse/capella/wiki/Contributing

Capella components

Capella Source Breakdown

Each directory is composed by two sub-directories, features and plugins.
Capella source code is organized as follow:

  • Common: Generic plugins, independent from Capella metamodel. Used by various plugins ;
  • Core: Plugins dependent from Capella metamodel (Regarding charts, transitions, model validation, queries on semantic browser, property views, etc.) ;
  • Legacy : Obsolete dependencies ;
  • Doc: Capella documentation plugins - documentation as Eclipse documentation (e.g. Eclipse help menu) ;
  • M2: Capella metamodel (ecore files) ;
  • Releng : Code generation plugins (Generate Capella EMF code from ecore metamodels) and generation of builds and continuous integration jobs (Maven/Tycho).

Capella Metamodel

Getting the Metamodel

There are two ways to retrieve Capella Metamodel ecore files :

  • From the available builds, open the plugins (with winzip, 7zip, ...) then extract the ecore files from the sub-directories model:
    • org.polarsys.capella.common.data.core.gen
    • org.polarsys.capella.common.data.behavior.gen
    • org.polarsys.capella.common.data.activity.gen
    • org.polarsys.capella.core.data.gen
  • From Capella git repository in the directories:
    • GITROOT/org.polarsys.capella/m2/plugins/org.polarsys.capella.common.data.def/model
    • GITROOT/org.polarsys.capella/m2/plugins/org.polarsys.capella.core.data.def/model

Generating the Metamodel

This step can only be done in a Capella Studio environment

  • Import all releng project, *gen, *.gen.edit from core and common plugins, and m2 folder ;
  • Import in your workspace *emde.model and *emde plugins from Capella Studio.
  • Do your modifications into m2 folder ecore (data.def) ;
  • Run EGF Activity org.polarsys.capella.common.extension.migration.egf / G3&G4, this will copy data.def M2 into data.gen ;
  • Run org.polarsys.capella.core.egf root EGF Activity to generate EMF code.

Release Engineering

Jobs Configuration

Jobs are separated between Capella solution and its add-ons but the underlying building process is the same.

In the source code, identify the releng plugin:

  • org.polarsys.capella.core.releng for Capella

They are based on Maven Tycho.

Documentation

Capella

Documentation is embedded into the workbench or online through help.polarsys.org It is available through Help menu and Capella guide

Capella documentation is stored in Capella Git repository git.polarsys.org/c/capella/capella.git/tree/doc/plugins.

To create/update documentation, Mylyn/Wikitext must be installed in you IDE.

Some characteristics of a documentation plugin for Capella:

  • Contribute to the extension point org.eclipse.help.toc ;
  • Is written using MediaWiki syntax ;
  • Has only one table of contents ; that lists all chapters of this documentation ;
  • Has the ant script that is necessary to produce HTML documentation from *.mediawiki source files ;
  • Is structured as follow:
<plugin_name>
  /html
    /<functionality>
      // Mediawiki and HTML source files
      /Images
        // Place all images in this directory
  build.xml
  plugin.xml
  about.html
  toc.xml
  build.properties
  
with <plugin_name> = org.polarsys.capella.<functionality>.doc

Ensure that:

  • plugin.xml contains the contribution to the org.eclipse.help.toc extension point
    • The contents of the contribution shall include the table of contents of the plugin, i.e. toc.xml
  • The root tag of toc.xml links to the anchor of the main table of contents PLUGINS_ROOT/org.polarsys.capella.doc/toc.xml#<anchor>

Contribute to the documentation modifying a Mediawiki file in the <html>/<functionnality> directory or create a new Mediawiki file in case you would like to add a new chapter. In case of a creation of a new Mediawiki file, do not forget to update the toc.xml in order to create a new Topic accordingly.

Before testing the contribution, the documentation first needs to be transformed into HTML.

To do so, right-click on the build.xml file and select Run as > External Tools Configuration.... Ensure that in JRE tab, the option Run in the same JRE as the workspace is selected otherwise tick it. Then press Run button. The generation starts and in logged in the console window.

When the generation ends with success, you can test it by launching Capella target platform then launching the Help menu.

Back to the top