Skip to content

Commit

Permalink
[2510] [Filtering VP] Transition LC2PC does not work
Browse files Browse the repository at this point in the history
Bug: 2510
Change-Id: I3545bd6732f567315ed33fb30e73c3bc8f0082f6
Signed-off-by: Tu Ton <[email protected]>
  • Loading branch information
minhtutonthat authored and pdulth committed Jun 20, 2019
1 parent aa4dce3 commit adfc57c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
3 changes: 2 additions & 1 deletion plugins/org.polarsys.capella.filtering.transition/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- NOTE that this version must be greater or equal to 3.4 to avoid extension point loading problems -->
<?eclipse version="3.4"?>
<!--
Copyright (c) 2018 THALES GLOBAL SERVICES.
Expand All @@ -16,7 +17,7 @@
point="org.polarsys.capella.core.transition.handlers">
<handlers
id="Filtering extension"
mapping="org.polarsys.capella.core.transition.system.topdown"
mapping="all"
purpose="org.polarsys.capella.core.transition">

<scopeRetriever
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,11 @@

import java.util.Set;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.ecore.EPackage;
import org.polarsys.capella.core.transition.system.domain.CapellaTransitionDomainHelper;
import org.polarsys.capella.filtering.FilteringPackage;
import org.polarsys.kitalpha.transposer.transformation.emf.TransposerEMFPlugin;

public class FilteringDomainHelper extends CapellaTransitionDomainHelper {
@Override
public Class<?> getDomainMetaclass(String name) {
try {
return Class.forName(name);
} catch (ClassNotFoundException e) {
TransposerEMFPlugin.getDefault().getLog()
.log(new Status(IStatus.ERROR, TransposerEMFPlugin.PLUGIN_ID, "No Domain Class called : " + name, e)); //$NON-NLS-1$
}
return null;
}

@Override
protected Set<EPackage> getEPackages() {
// TODO Remove this method if super get the extensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@
</ownedLogicalContext>
<ownedLogicalComponent xsi:type="org.polarsys.capella.core.data.la:LogicalComponent"
id="eb1e8db3-a464-463f-b45d-28b4e0702088" name="Logical System">
<ownedFeatures xsi:type="org.polarsys.capella.core.data.cs:Part" id="9dcc4737-470d-4cb3-93bd-b568eb8f842a"
name="LogicalComponent 1" abstractType="#ccefe212-df01-4926-9d04-dcf1acdcc4bc"/>
<ownedLogicalComponents xsi:type="org.polarsys.capella.core.data.la:LogicalComponent"
id="ccefe212-df01-4926-9d04-dcf1acdcc4bc" name="LogicalComponent 1">
<ownedExtensions xsi:type="filtering:AssociatedFilteringCriterionSet" id="0a4ba05c-bd82-4bb2-98c6-f1736fd20299"
filteringCriteria="#93e1e58d-2b4c-4607-95a1-d759dbcdeaa7"/>
</ownedLogicalComponents>
<ownedSystemRealizations xsi:type="org.polarsys.capella.core.data.la:SystemRealization"
id="7754429f-039a-48c2-a740-a127c7b6bb6a" targetElement="#f5580db0-9fb6-4db6-becc-23f5691268a4"
sourceElement="#eb1e8db3-a464-463f-b45d-28b4e0702088"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
public class FunctionalTransitionTestCase extends TopDownTransitionTestCase {
public static final String SYSTEMFUNCTION_1 = "bc18b8d1-7b7c-4a92-8ee3-85ae431c1593"; //$NON-NLS-1$
public static final String SF1_ASSOCIATED_FILTERING_CRITERION_SET = "e29b9987-09cb-4acb-8070-0a1abaaa7e3a"; //$NON-NLS-1$
public static final String LOGICALCOMPONENT_1 = "ccefe212-df01-4926-9d04-dcf1acdcc4bc"; //$NON-NLS-1$
public static final String LC1_ASSOCIATED_FILTERING_CRITERION_SET = "0a4ba05c-bd82-4bb2-98c6-f1736fd20299"; //$NON-NLS-1$

@Override
public List<String> getRequiredTestModels() {
Expand All @@ -36,6 +38,9 @@ public void performTest() throws Exception {
EObject sf1 = getObject(SYSTEMFUNCTION_1);
performFunctionalTransition(Arrays.asList(sf1));
mustBeTransitioned(SF1_ASSOCIATED_FILTERING_CRITERION_SET);
EObject lc1 = getObject(LOGICALCOMPONENT_1);
performLCtoPCTransition(Arrays.asList(lc1));
mustBeTransitioned(LC1_ASSOCIATED_FILTERING_CRITERION_SET);
}

public static Test suite() {
Expand Down

0 comments on commit adfc57c

Please sign in to comment.