Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2019-12-03 12:28:16 +0000
committerEd Willink2019-12-03 12:28:16 +0000
commit8933e27e9d57586f4317a7772f696abb8eb4366e (patch)
tree3f7f92ea356ca5aa056ae9612b1c91b9ccea6296
parent2940e59f2562c306aa362882560f4e43a19a65f5 (diff)
downloadorg.eclipse.qvtd-8933e27e9d57586f4317a7772f696abb8eb4366e.tar.gz
org.eclipse.qvtd-8933e27e9d57586f4317a7772f696abb8eb4366e.tar.xz
org.eclipse.qvtd-8933e27e9d57586f4317a7772f696abb8eb4366e.zip
all ok losing isMatched
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java6
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/OperationRegionHelper.java3
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java12
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Node.java3
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java17
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/NodeImpl.java3
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/PatternTypedNodeImpl.java10
7 files changed, 6 insertions, 48 deletions
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java
index 6f019a93a..5d882b95f 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java
@@ -78,7 +78,6 @@ import org.eclipse.qvtd.pivot.qvtschedule.Edge;
import org.eclipse.qvtd.pivot.qvtschedule.EnumLiteralNode;
import org.eclipse.qvtd.pivot.qvtschedule.IfNode;
import org.eclipse.qvtd.pivot.qvtschedule.MapLiteralNode;
-import org.eclipse.qvtd.pivot.qvtschedule.MappingNode;
import org.eclipse.qvtd.pivot.qvtschedule.NavigableEdge;
import org.eclipse.qvtd.pivot.qvtschedule.NavigationEdge;
import org.eclipse.qvtd.pivot.qvtschedule.Node;
@@ -1115,11 +1114,6 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
String name = "a" + castType.getName();
// assert name != null;
Node castNode = createStepNode(name, operationCallExp, sourceNode);
- if (castIsRequired) {
- if ((castNode instanceof MappingNode) && !castNode.getInitUtility().isConditional()) { // sourceNode.isMatchedCtor()) {
- /**/ ((MappingNode)castNode).setMatched(true);
- }
- }
createCastEdge(sourceNode, castClassDatum, castNode);
OCLExpression argument = operationCallExp.getOwnedArguments().get(0);
if (!(argument instanceof TypeExp)) {
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/OperationRegionHelper.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/OperationRegionHelper.java
index 0071e902e..be7942825 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/OperationRegionHelper.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/OperationRegionHelper.java
@@ -29,7 +29,6 @@ public class OperationRegionHelper extends RegionHelper<@NonNull OperationRegion
Role nodeRole = getNodeRole(sourceNode);
PatternTypedNode node = QVTscheduleFactory.eINSTANCE.createPatternTypedNode();
node.initialize(nodeRole, region, initUtility, name, classDatum);
- node.setMatched(true);
return node;
}
@@ -37,7 +36,6 @@ public class OperationRegionHelper extends RegionHelper<@NonNull OperationRegion
Role nodeRole = Role.PREDICATED;
PatternTypedNode node = QVTscheduleFactory.eINSTANCE.createPatternTypedNode();
node.initialize(nodeRole, region, initUtility, name, classDatum);
- node.setMatched(true);
node.setHead();
return node;
}
@@ -46,7 +44,6 @@ public class OperationRegionHelper extends RegionHelper<@NonNull OperationRegion
Role nodeRole = getNodeRole(sourceNode);
PatternTypedNode node = QVTscheduleFactory.eINSTANCE.createPatternTypedNode();
node.initialize(nodeRole, region, initUtility, name, classDatum);
- node.setMatched(false);
return node;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java
index 80d07ed0d..eb82d5e4f 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java
@@ -141,7 +141,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
ClassDatum classDatum = scheduleManager.getBooleanClassDatum();
BooleanLiteralNode booleanLiteralNode = QVTscheduleFactory.eINSTANCE.createBooleanLiteralNode();
booleanLiteralNode.initialize(Role.CONSTANT, region, utility, Boolean.toString(isTrue), classDatum);
- booleanLiteralNode.setMatched(true);
booleanLiteralNode.setBooleanValue(isTrue);
return booleanLiteralNode;
}
@@ -213,7 +212,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
// assert name != null;
PatternTypedNode node = QVTscheduleFactory.eINSTANCE.createPatternTypedNode();
node.initialize(nodeRole, region, utility, name, scheduleManager.getClassDatum(navigationCallExp));
- /**/ node.setMatched(isMatched);
node.setOriginatingElement(navigationCallExp);
return node;
}
@@ -231,7 +229,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
ClassDatum classDatum = scheduleManager.getClassDatum(typedModel, type);
PatternTypedNode node = QVTscheduleFactory.eINSTANCE.createPatternTypedNode();
node.initialize(nodeRole, region, utility, name, classDatum);
- node.setMatched(true);
node.setOriginatingElement(property);
return node;
}
@@ -379,7 +376,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
PatternVariableNode node = QVTscheduleFactory.eINSTANCE.createPatternVariableNode();
node.initialize(nodeRole, region, utility, getName(letVariable), scheduleManager.getClassDatum(letVariable));
node.initializeVariable(region, letVariable);
- node.setMatched(inNode.isMatchedCtor());
return node;
}
@@ -388,7 +384,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
PatternVariableNode node = QVTscheduleFactory.eINSTANCE.createPatternVariableNode();
node.initialize(nodeRole, region, utility, getName(stepVariable), scheduleManager.getClassDatum(stepVariable));
node.initializeVariable(region, stepVariable);
- node.setMatched(true);
return node;
}
@@ -525,7 +520,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
node.initialize(nodeRole, region, utility, getName(variable), classDatum);
((MappingNodeImpl)node).setRequiredOverride(true);
node.initializeVariable(region, variable);
- node.setMatched(QVTrelationUtil.isRequired(variable));
if (isThis) {
node.setThis();
node.setHead();
@@ -553,7 +547,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
assert nodeRole != null;
OperationCallNode node = QVTscheduleFactory.eINSTANCE.createOperationCallNode();
node.initialize(nodeRole, region, utility, name, classDatum);
- node.setMatched(isMatched);
node.setReferredOperation(operation);
return node;
}
@@ -599,7 +592,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
assert name != null;
PatternTypedNode node = QVTscheduleFactory.eINSTANCE.createPatternTypedNode();
node.initialize(nodeRole, region, utility, name, classDatum);
- /**/ node.setMatched(isMatched);
return node;
}
@@ -622,7 +614,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
public @NonNull Node createPredicatedNode(@NonNull InitUtility utility, @NonNull String name, @NonNull ClassDatum classDatum, boolean isMatched) {
PatternTypedNode node = QVTscheduleFactory.eINSTANCE.createPatternTypedNode();
node.initialize(Role.PREDICATED, region, utility, name, classDatum);
- node.setMatched(isMatched);
return node;
}
@@ -631,7 +622,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
PatternTypedNode node = QVTscheduleFactory.eINSTANCE.createPatternTypedNode();
node.initialize(Role.PREDICATED, region, utility, name, classDatum);
((MappingNodeImpl)node).setRequiredOverride(isRequiredOverride);
- node.setMatched(isMatched);
return node;
}
@@ -681,7 +671,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
public @NonNull VariableNode createRealizedNode(@NonNull InitUtility utility, @NonNull String name, @NonNull ClassDatum classDatum, boolean isMatched) {
PatternVariableNode node = QVTscheduleFactory.eINSTANCE.createPatternVariableNode();
node.initialize(Role.REALIZED, region, utility, name, classDatum);
- node.setMatched(isMatched);
return node;
}
@@ -766,7 +755,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
Role stepNodeRole = phase;
PatternTypedNode node = QVTscheduleFactory.eINSTANCE.createPatternTypedNode();
node.initialize(stepNodeRole, region, utility, name, scheduleManager.getClassDatum(callExp));
- /**/ node.setMatched(isMatched);
node.setOriginatingElement(callExp);
return node;
}
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Node.java b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Node.java
index 7f1598ef0..1f7e79091 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Node.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Node.java
@@ -442,9 +442,8 @@ public interface Node extends Element, ConnectionEnd, org.eclipse.ocl.pivot.util
* Return true if after execution this node exactly corresponds to a non-null object or to a non-null value or to an explicit null.
* Conversely return false if this node is optionally null or part of a conditional expression evaluation.
* Collections are never null-valued, not even empty collections.
- *
- * *deprecated try to use isUnconditional or getUtility
*/
+ @Deprecated /* @deprecated use initUtility */
boolean isMatched();
boolean isMatchedCtor();
boolean isMatchedAsMatchedUtility();
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java
index da3d41273..5dfaa439f 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java
@@ -30,13 +30,11 @@ import org.eclipse.ocl.pivot.Variable;
import org.eclipse.ocl.pivot.VariableDeclaration;
import org.eclipse.ocl.pivot.internal.ElementImpl;
import org.eclipse.ocl.pivot.utilities.ClassUtil;
-import org.eclipse.qvtd.pivot.qvtschedule.ClassDatum;
import org.eclipse.qvtd.pivot.qvtschedule.MappingNode;
import org.eclipse.qvtd.pivot.qvtschedule.Node;
import org.eclipse.qvtd.pivot.qvtschedule.QVTschedulePackage;
import org.eclipse.qvtd.pivot.qvtschedule.Region;
import org.eclipse.qvtd.pivot.qvtschedule.Role;
-import org.eclipse.qvtd.pivot.qvtschedule.utilities.InitUtility;
/**
* <!-- begin-user-doc -->
@@ -112,12 +110,12 @@ public abstract class MappingNodeImpl extends NodeImpl implements MappingNode {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
+ @Deprecated /* @deprecated use initUtility */
@Override
public boolean isMatched() {
- assert matched == !getInitUtility().isConditional();
- return matched;
+ return super.isMatched();
}
/**
@@ -127,8 +125,6 @@ public abstract class MappingNodeImpl extends NodeImpl implements MappingNode {
*/
@Override
public void setMatched(boolean newMatched) {
-
- assert newMatched == !getInitUtility().isConditional();
boolean oldMatched = matched;
matched = newMatched;
if (eNotificationRequired())
@@ -227,7 +223,6 @@ public abstract class MappingNodeImpl extends NodeImpl implements MappingNode {
for (@NonNull Element typedElement : originatingElements) {
node.originatingElements.add(typedElement);
}
- node.setMatched(matched);
return node;
}
@@ -243,12 +238,6 @@ public abstract class MappingNodeImpl extends NodeImpl implements MappingNode {
}
@Override
- public void initialize(@NonNull Role nodeRole, @NonNull Region region, @NonNull InitUtility initUtility, String name, ClassDatum classDatum) {
- super.initialize(nodeRole, region, initUtility, name, classDatum);
- setMatched(!initUtility.isConditional());
- }
-
- @Override
public boolean isRequired() {
boolean superIsRequired = super.isRequired();
boolean isRequired = isRequiredOverride != null ? isRequiredOverride : this.isRequired;
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/NodeImpl.java b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/NodeImpl.java
index a88ae03ce..17c60fbfd 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/NodeImpl.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/NodeImpl.java
@@ -995,9 +995,10 @@ public abstract class NodeImpl extends ElementImpl implements Node {
return nodeRole == Role.LOADED;
}
+ @Deprecated /* @deprecated use initUtility */
@Override
public boolean isMatched() {
- return false;
+ return !initUtility.isConditional();
}
@Override
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/PatternTypedNodeImpl.java b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/PatternTypedNodeImpl.java
index 82ffb0561..69e415612 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/PatternTypedNodeImpl.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/PatternTypedNodeImpl.java
@@ -17,11 +17,8 @@ package org.eclipse.qvtd.pivot.qvtschedule.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.ocl.pivot.util.Visitor;
-import org.eclipse.qvtd.pivot.qvtschedule.Node;
import org.eclipse.qvtd.pivot.qvtschedule.PatternTypedNode;
import org.eclipse.qvtd.pivot.qvtschedule.QVTschedulePackage;
-import org.eclipse.qvtd.pivot.qvtschedule.Region;
-import org.eclipse.qvtd.pivot.qvtschedule.Role;
import org.eclipse.qvtd.pivot.qvtschedule.util.QVTscheduleVisitor;
/**
@@ -89,13 +86,6 @@ public class PatternTypedNodeImpl extends MappingNodeImpl implements PatternType
}
@Override
- public @NonNull Node createNode(@NonNull Role nodeRole, @NonNull Region region) {
- PatternTypedNodeImpl node = (PatternTypedNodeImpl)super.createNode(nodeRole, region);
- node.setMatched(matched);
- return node;
- }
-
- @Override
public boolean isPattern() {
return true;
}

Back to the top