Skip to content

Commit

Permalink
[releng] UID must be migrated to XMI:ID
Browse files Browse the repository at this point in the history
Change-Id: I7177553acf977a8f6a145e78d00c7d7ccab4a0dc
Signed-off-by: Philippe DUL <philippe.dul@thalesgroup.com>
  • Loading branch information
pdulth committed May 15, 2018
1 parent 317dfd0 commit 41810fd
Show file tree
Hide file tree
Showing 19 changed files with 826 additions and 601 deletions.
Expand Up @@ -26,6 +26,8 @@ public class FeatureHelper {

/**
* Get the Capella feature version.
* This method doesn't work on Debug mode.
*
* @param fullVersionNumber
* @return a not <code>null</code> string.
*/
Expand Down
41 changes: 21 additions & 20 deletions core/plugins/org.polarsys.capella.core.data.migration/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<!--
Copyright (c) 2006, 2017 THALES GLOBAL SERVICES.
Copyright (c) 2006, 2018 THALES GLOBAL SERVICES.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -141,6 +141,9 @@
<migrationContribution
class="org.polarsys.capella.core.data.migration.aird.SiriusMigrationContribution">
</migrationContribution>
<migrationContribution
class="org.polarsys.capella.core.data.migration.af.ViewpointMigrationContribution">
</migrationContribution>
<migrationContribution
class="org.polarsys.capella.core.data.migration.contribution.BackupResourceContribution">
</migrationContribution>
Expand All @@ -166,6 +169,12 @@
<migrationContributor
class="org.polarsys.capella.core.data.migration.aird.AirdMigrationContributor">
</migrationContributor>
<migrationContributor
class="org.polarsys.capella.core.data.migration.af.MetadataUpdateContributor">
</migrationContributor>
<migrationContributor
class="org.polarsys.capella.core.data.migration.af.ViewpointMigrationContributor">
</migrationContributor>

</extension>

Expand All @@ -178,32 +187,24 @@



<extension
point="org.polarsys.capella.core.data.migration.migrationContributions">
<migrationContribution
class="org.polarsys.capella.core.data.migration.af.ViewpointMigrationContribution"/>
</extension>


<extension
point="org.polarsys.capella.core.data.migration.migrationContributors">
<migrationContributor
class="org.polarsys.capella.core.data.migration.af.MetadataUpdateContributor"/>
<migrationContributor
class="org.polarsys.capella.core.data.migration.af.ViewpointMigrationContributor"/>
</extension>



<!-- Contributions that should be removed between versions -->

<extension
point="org.polarsys.capella.core.data.migration.migrationContributions">

<migrationContribution
class="org.polarsys.capella.core.data.migration.contribution.FixDAnnotationsContribution">
</migrationContribution>

<migrationContribution
class="org.polarsys.capella.core.data.migration.contribution.FixDAnnotationsContribution"/>
<migrationContribution
class="org.polarsys.capella.core.data.migration.contribution.ActivateDiagramFiltersContribution">
</migrationContribution>
</migrationContribution>

<migrationContribution
class="org.polarsys.capella.core.data.migration.contribution.UidFromXmiIdContribution">
</migrationContribution>

</extension>


Expand Down
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2017 THALES GLOBAL SERVICES.
* Copyright (c) 2006, 2018 THALES GLOBAL SERVICES.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -37,6 +37,7 @@
import org.polarsys.capella.common.ef.ExecutionManager;
import org.polarsys.capella.common.mdsofa.common.helper.ExtensionPointHelper;
import org.polarsys.capella.core.data.migration.context.MigrationContext;
import org.polarsys.capella.core.data.migration.contribution.BackupResourceContribution;
import org.polarsys.capella.core.data.migration.contribution.IMigrationContribution;
import org.polarsys.capella.core.data.migration.contributor.AbstractMigrationContributor;
import org.xml.sax.Attributes;
Expand All @@ -53,6 +54,7 @@ public class MigrationHelpers implements IMigrationContribution {
private ArrayList<IMigrationContribution> migrations = null;

static final String MIGRATION_CONTRIBUTIONS_ID = "org.polarsys.capella.core.data.migration.contributions"; //$NON-NLS-1$

static final String MIGRATION_CONTRIBUTORS_ID = "org.polarsys.capella.core.data.migration.contributors"; //$NON-NLS-1$

public MigrationHelpers() {
Expand Down Expand Up @@ -146,6 +148,11 @@ public void dispose(MigrationContext context) {
}
}

public void dispose() {
//We shall call all contributors but it create an API break
BackupResourceContribution.dispose();
}

@Override
public String getFeatureName(String prefix, String name, boolean isElement, EObject peekObject, String value, Resource resource, MigrationContext context) {
for (IMigrationContribution migration : migrations) {
Expand Down

0 comments on commit 41810fd

Please sign in to comment.