Child pages
  • Migration20
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 25 Next »

After installing 2.0, the following should be done to migrate old code to new format:
Warning!!! It is not possible to revert migrated models back to old format!

Automatic migration

Just execute Main Menu -> Tools -> Start Migration to MPS 2.0 and follow the instructions.

Non-automatic migration

If you want full control on what MPS will do, you can use this way of performing migration. In the next part we'll consider all the refactorings separately.

Do the following:

  1. Main Menu -> Tools -> Migrations 2.0 -> Upgrade Persistence
  2. Main Menu -> Tools -> Migrations 2.0 -> Fix Module Dependencies
  3. Main Menu -> Tools -> Migrations 2.0 -> Migrate Stub Models
  4. Open logical view, right-click project, select "Optimize Imports"
  5. Main Menu -> Tools -> Scripts -> All Scripts..., check all scripts with type "Migration (MPS 2.0)", click "Run Checked"
  6. Go to Main Menu -> File -> Settings. Select Model Checker properties and uncheck all checkboxes except "Check for unresolved references" and press "Ok". Right-click project node in logical view and select "Check Project". The Model Checker tool will show you all the broken references you have. Correct them by hand.
  7. Right-click project, select "Rebuild Project"
  8. (Recommended, but not necessary) Restart MPS.

What the migration will do with my code?

Upgrade Persistence
Fix Module Dependencies
Migrate Stub Models
Optimize Imports
Model Checker and manual references resolution
    1. If you have your own attribute descriptions (AnnotationLinkDeclaration instances) it will require manual migration for each attribute:
      1. Ensure attribute concept described in AnnotationLinkDeclaration (target) is subconcept of one of NodeAttribute, LinkAttribute or PropertyAttribute depending on the attribute stereotype
      2. Define role concept property in attribute concept as attribute role in AnnotationLinkDeclaration
      3. If sourceCardinality was * define multiple concept property in attribute concept
      4. Define attributed concept link from source in AnnotationLinkDeclaration
      5. Perform actions from steps 1 and 2 for migrated attributes
      6. For simple attributes (when they are direct subconcepts of BaseConcept) migration script is available
  • No labels