Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2019-04-20 07:20:34 +0000
committerEd Willink2019-06-05 09:27:43 +0000
commit243c68d7f5b21dd3d1c5abc65ebbeb695d78d4d2 (patch)
treea84f16088a4aa7cc6f1a149a6dcc5931a06d6702
parentd5e02590eb70ca2a20ee8ff593de57d4c983ff38 (diff)
downloadorg.eclipse.qvtd-ewillink/530937.tar.gz
org.eclipse.qvtd-ewillink/530937.tar.xz
org.eclipse.qvtd-ewillink/530937.zip
[530937] Reassignment diagnostic experimentewillink/530937
-rw-r--r--plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/IncrementalObjectManager.java7
-rw-r--r--plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/LazyObjectManager.java7
2 files changed, 11 insertions, 3 deletions
diff --git a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/IncrementalObjectManager.java b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/IncrementalObjectManager.java
index 80175b019..15a47898e 100644
--- a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/IncrementalObjectManager.java
+++ b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/IncrementalObjectManager.java
@@ -37,7 +37,6 @@ import org.eclipse.qvtd.runtime.evaluation.Invocation;
import org.eclipse.qvtd.runtime.evaluation.InvocationFailedException;
import org.eclipse.qvtd.runtime.evaluation.ObjectManager;
import org.eclipse.qvtd.runtime.evaluation.SlotState;
-import org.eclipse.qvtd.runtime.utilities.QVTruntimeUtil;
public class IncrementalObjectManager extends AbstractObjectManager
{
@@ -80,7 +79,7 @@ public class IncrementalObjectManager extends AbstractObjectManager
this.value = ecoreValue;
break;
case ASSIGNED:
- QVTruntimeUtil.errPrintln("Re-assignment of " + eFeature.getEContainingClass().getName() + "::" + eFeature.getName() + " for " + eObject + " with " + ecoreValue);
+ objectManager.reassigned(eObject, eFeature, this.value, ecoreValue);
break;
case REASSIGNABLE:
mode = SlotMode.ASSIGNED;
@@ -948,4 +947,8 @@ public class IncrementalObjectManager extends AbstractObjectManager
}
}
}
+
+ public void reassigned(@NonNull Object eObject, @NonNull EStructuralFeature eFeature, @Nullable Object oldValue, @Nullable Object newValue) {
+ System.err.println("Re-assignment of " + eFeature.getEContainingClass().getName() + "::" + eFeature.getName() + " for " + eObject + " with " + newValue);
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/LazyObjectManager.java b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/LazyObjectManager.java
index 1f74dbd11..aae4c3121 100644
--- a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/LazyObjectManager.java
+++ b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/LazyObjectManager.java
@@ -198,7 +198,8 @@ public class LazyObjectManager extends AbstractObjectManager
break;
case ASSIGNED:
if (!(eFeature instanceof EOppositeReferenceImpl)) {
- QVTruntimeUtil.errPrintln("Re-assignment of \"" + toDebugString(eObject) + "\"." + eFeature.getEContainingClass().getName() + "::" + eFeature.getName() + " with \"" + ecoreValue + "\"");
+ objectManager.reassigned(eObject, eFeature, this.value, ecoreValue);
+ System.err.println("Re-assignment of \"" + toDebugString(eObject) + "\"." + eFeature.getEContainingClass().getName() + "::" + eFeature.getName() + " with \"" + ecoreValue + "\"");
}
break;
}
@@ -1132,4 +1133,8 @@ public class LazyObjectManager extends AbstractObjectManager
public void got(Execution.@NonNull Incremental computation, @NonNull Object eObject, EStructuralFeature eFeature, @Nullable Object ecoreValue) {
// Ignore incremental API
}
+
+ public void reassigned(@NonNull Object eObject, @NonNull EStructuralFeature eFeature, @Nullable Object oldValue, @Nullable Object newValue) {
+ System.err.println("Re-assignment of " + eFeature.getEContainingClass().getName() + "::" + eFeature.getName() + " for " + eObject + " with " + newValue);
+ }
} \ No newline at end of file

Back to the top