Skip to content

Migration

Philippe DUL edited this page Dec 8, 2021 · 2 revisions

Migration

Capella offers a migration mechanism. This migration is available through a contextual menu command and is launched between version.

Specific migration contributions can be contributed through an extension point.

The extension points provide two possibilities migrationContributions and migrationContributors:

  • the plug-in org.polarsys.capella.core.data.migration
  • and its identifier constraintProviders.

The contribution to the extension point is done in the plugin.xml file of the plugin. Open this file and focus on the plugin.xml tab:

MigrationContributions

This allows to contribute to the migration of the common files .capella, .aird, and all migrated files.

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
   <extension
         point="org.polarsys.capella.core.data.migration.migrationContributions">
      <migrationContribution
            class="xxx">
      </migrationContribution>
   </extension>
</plugin>

Detail of the different fields

MigrationContributors

This allows to contribute to the migration of additional files while the migration process.

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
   <extension
         point="org.polarsys.capella.core.data.migration.migrationContributors">
      <migrationContributor
            class="xxx">
      </migrationContributor>

Detail of the different fields

Migration contribution

In the major cases, you will contribute to the exiting Capella migration by adding a Migration Contribution.

Sample

The addon filtering had contributed to migration

  • The Java class defining the contribution. In this case, it says that when we migrate a model refering to the previous version of Filtering, we retrieve the current one. (This has for effect to allow upgrade of nsUri of the Filtering viewpoint)

  • Its registration within plugin.xml

  • In MANIFEST/MANIFEST.MF file we need to depends on org.polarsys.capella.core.data.migration

Clone this wiki locally