Skip to content

Commit

Permalink
#2310 Fix RECRPL tests
Browse files Browse the repository at this point in the history
Wrong InstanceNNode property node was used in refactoring
  • Loading branch information
arnauddieumegard committed Jan 26, 2022
1 parent f193700 commit 05e8f79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.eclipse.emf.validation.service.IConstraintDescriptor;
import org.osgi.framework.FrameworkUtil;
import org.polarsys.capella.common.helpers.EObjectExt;
import org.polarsys.capella.common.re.Activator;
import org.polarsys.capella.common.re.CatalogElement;
import org.polarsys.capella.common.re.CatalogElementKind;
import org.polarsys.capella.common.re.RePackage;
Expand All @@ -43,7 +44,7 @@ public IStatus validate(IValidationContext ctx) {
if (catalogElement.getKind() == CatalogElementKind.RPL) {
CatalogElement rec = catalogElement.getOrigin();
if (rec == null || rec.eIsProxy()) {
return new Status(IStatus.ERROR, FrameworkUtil.getBundle(CatalogElement.class).getSymbolicName(), "Your RPL is invalid (no REC), please validate your model.");
return new Status(IStatus.ERROR, FrameworkUtil.getBundle(Activator.class).getSymbolicName(), "Your RPL is invalid (no REC), please validate your model.");
}
// if rec is valid
return validateRPL(ctx, catalogElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.polarsys.capella.common.ef.ExecutionManager;
import org.polarsys.capella.common.ef.ExecutionManagerRegistry;
import org.polarsys.capella.common.helpers.EObjectExt;
import org.polarsys.capella.common.re.Activator;
import org.polarsys.capella.common.re.CatalogElement;
import org.polarsys.capella.common.re.CatalogElementLink;
import org.polarsys.capella.common.re.RePackage;
Expand Down Expand Up @@ -116,7 +117,7 @@ public void setUp() throws Exception {

super.setUp();

InstanceScope.INSTANCE.getNode(FrameworkUtil.getBundle(CatalogElement.class).getSymbolicName()).put(IReConstants.PROPERTY__PARENT_LOCATOR, IReConstants.LOCATOR_OPTION_SPECIFIC_PACKAGES);
InstanceScope.INSTANCE.getNode(FrameworkUtil.getBundle(Activator.class).getSymbolicName()).put(IReConstants.PROPERTY__PARENT_LOCATOR, IReConstants.LOCATOR_OPTION_SPECIFIC_PACKAGES);

manager = ExecutionManagerRegistry.getInstance().addNewManager();
project = new CapellaModelSkeleton.Builder(manager).build();
Expand All @@ -134,7 +135,7 @@ protected Resource getModelResource() {
public void tearDown() throws Exception {
ExecutionManagerRegistry.getInstance().removeManager(manager);

InstanceScope.INSTANCE.getNode(FrameworkUtil.getBundle(CatalogElement.class).getSymbolicName()).put(IReConstants.PROPERTY__PARENT_LOCATOR, IReConstants.LOCATOR_OPTION_DEFAULT);
InstanceScope.INSTANCE.getNode(FrameworkUtil.getBundle(Activator.class).getSymbolicName()).put(IReConstants.PROPERTY__PARENT_LOCATOR, IReConstants.LOCATOR_OPTION_DEFAULT);

super.tearDown();
}
Expand Down

0 comments on commit 05e8f79

Please sign in to comment.