commit | edf948bfa9001596d5aac01f6ebee3b2d300517c | [log] [tgz] |
---|---|---|
author | Ed Willink <ed@willink.me.uk> | Sun Jan 12 21:03:32 2020 +0000 |
committer | Ed Willink <ed@willink.me.uk> | Sun Jan 12 21:04:57 2020 +0000 |
tree | 3cb2fe53e7e18058d23df63fa04e5978edf59b2d | |
parent | aa7ce904beb344769da2caf3fe510f9816a5757f [diff] |
[unrelated] Use symbolic name for eContainer
diff --git a/examples/org.eclipse.ocl.examples.codegen/src/org/eclipse/ocl/examples/codegen/java/CG2JavaVisitor.java b/examples/org.eclipse.ocl.examples.codegen/src/org/eclipse/ocl/examples/codegen/java/CG2JavaVisitor.java index 3772b03..208bb00 100644 --- a/examples/org.eclipse.ocl.examples.codegen/src/org/eclipse/ocl/examples/codegen/java/CG2JavaVisitor.java +++ b/examples/org.eclipse.ocl.examples.codegen/src/org/eclipse/ocl/examples/codegen/java/CG2JavaVisitor.java
@@ -244,7 +244,7 @@ EStructuralFeature eStructuralFeature = ClassUtil.nonNullState(getESObject(asProperty)); String getAccessor; if (eStructuralFeature == OCLstdlibPackage.Literals.OCL_ELEMENT__OCL_CONTAINER) { - getAccessor = "eContainer"; + getAccessor = JavaConstants.E_CONTAINER_NAME; } else { getAccessor = genModelHelper.getGetAccessor(eStructuralFeature);
diff --git a/examples/org.eclipse.ocl.examples.codegen/src/org/eclipse/ocl/examples/codegen/java/JavaConstants.java b/examples/org.eclipse.ocl.examples.codegen/src/org/eclipse/ocl/examples/codegen/java/JavaConstants.java index a1cc961..95e89c4 100644 --- a/examples/org.eclipse.ocl.examples.codegen/src/org/eclipse/ocl/examples/codegen/java/JavaConstants.java +++ b/examples/org.eclipse.ocl.examples.codegen/src/org/eclipse/ocl/examples/codegen/java/JavaConstants.java
@@ -37,6 +37,7 @@ }; public static final @NonNull String CONSTRAINT_NAME_NAME = "constraintName"; + public static final @NonNull String E_CONTAINER_NAME = "eContainer"; public static final @NonNull String E_NAME = "e"; public static final @NonNull String EVALUATE_NAME = "evaluate"; public static final @NonNull String EVALUATION_CACHE_NAME = "evaluationCache";