Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2019-12-01 13:43:51 +0000
committerEd Willink2019-12-01 13:43:51 +0000
commitc2db9149c7557d66b2cbb551c27b6cd5ae8f72b7 (patch)
tree216e4941282371b45f9f86f31c1df355d180a204
parent103b4e875899ab77406351aac303f92e4459e84a (diff)
downloadorg.eclipse.qvtd-c2db9149c7557d66b2cbb551c27b6cd5ae8f72b7.tar.gz
org.eclipse.qvtd-c2db9149c7557d66b2cbb551c27b6cd5ae8f72b7.tar.xz
org.eclipse.qvtd-c2db9149c7557d66b2cbb551c27b6cd5ae8f72b7.zip
ok 3
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java26
1 files changed, 8 insertions, 18 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 d965b2cc1..ff624aa3d 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
@@ -481,7 +481,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
protected @Nullable Node doOperationCallExp(@NonNull OperationCallExp operationCallExp, @Nullable Node sourceNode) {
- boolean isMatched = !resultUtility.isConditional() || QVTscheduleUtil.isMatched(operationCallExp);
+ boolean isMatched = QVTscheduleUtil.isMatched(operationCallExp);
Operation referredOperation = QVTbaseUtil.getReferredOperation(operationCallExp);
String operationName = ClassUtil.nonNullState(referredOperation.getName());
OCLExpression ownedSource = operationCallExp.getOwnedSource();
@@ -492,7 +492,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
for (int i = 0; i < iSize; i++) {
argNodes[i] = synthesize(ownedArguments.get(i));
}
- ExpressionSynthesizer nestedAnalyzer = getExpressionSynthesizer(isMatched);
+ ExpressionSynthesizer nestedAnalyzer = getRequiredExpressionSynthesizer(isMatched);
Node operationNode = findOperationNode(referredOperation, argNodes);
if (operationNode == null) {
operationNode = nestedAnalyzer.createOperationCallNode(operationCallExp, referredOperation, argNodes);
@@ -677,16 +677,6 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
return isNullable ? InitUtility.NULLABLE_CONDITIONAL : InitUtility.NON_NULL_CONDITIONAL;
}
- @Deprecated /* @deprecated use utility */
- public @NonNull ExpressionSynthesizer getExpressionSynthesizer(boolean isUnconditional) {
- if (!isUnconditional) {
- return getExpressionSynthesizer(getConditionalUtility());
- }
- else { // ?? stick with STRONGLY_MATCHED
- return getExpressionSynthesizer(resultUtility.isNullable() ? InitUtility.NULLABLE_MATCHED : InitUtility.NON_NULL_MATCHED);
- }
- }
-
public @NonNull ExpressionSynthesizer getExpressionSynthesizer(@NonNull InitUtility initUtility) {
if (nonNullMatchedExpressionSynthesizer != this) {
return nonNullMatchedExpressionSynthesizer.getExpressionSynthesizer(initUtility);
@@ -1259,7 +1249,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
collectionParts[i] = collectionPart;
}
boolean isMatched = QVTscheduleUtil.isMatched(collectionLiteralExp);
- ExpressionSynthesizer nestedAnalyzer = getExpressionSynthesizer(isMatched);
+ ExpressionSynthesizer nestedAnalyzer = getRequiredExpressionSynthesizer(isMatched);
return nestedAnalyzer.createCollectionLiteral(resultUtility, collectionLiteralExp, collectionParts, partNodes);
}
@@ -1273,7 +1263,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node firstNode = synthesize(collectionRange.getOwnedFirst());
Node lastNode = synthesize(collectionRange.getOwnedLast());
boolean isMatched = QVTscheduleUtil.isMatched(collectionRange);
- ExpressionSynthesizer nestedAnalyzer = getExpressionSynthesizer(isMatched);
+ ExpressionSynthesizer nestedAnalyzer = getRequiredExpressionSynthesizer(isMatched);
return nestedAnalyzer.createCollectionRange(resultUtility, collectionRange, firstNode, lastNode);
}
@@ -1376,7 +1366,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
mapParts[i] = mapPart;
}
boolean isMatched = QVTscheduleUtil.isMatched(mapLiteralExp);
- ExpressionSynthesizer nestedAnalyzer = getExpressionSynthesizer(isMatched);
+ ExpressionSynthesizer nestedAnalyzer = getRequiredExpressionSynthesizer(isMatched);
return nestedAnalyzer.createMapLiteral(resultUtility, mapLiteralExp, mapParts, partNodes);
}
@@ -1385,7 +1375,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node keyNode = synthesize(QVTbaseUtil.getOwnedKey(mapLiteralPart));
Node valueNode = synthesize(QVTbaseUtil.getOwnedValue(mapLiteralPart));
boolean isMatched = QVTscheduleUtil.isMatched(mapLiteralPart);
- ExpressionSynthesizer nestedAnalyzer = getExpressionSynthesizer(isMatched);
+ ExpressionSynthesizer nestedAnalyzer = getRequiredExpressionSynthesizer(isMatched);
return nestedAnalyzer.createMapPart(mapLiteralPart, keyNode, valueNode);
}
@@ -1453,7 +1443,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
shadowParts[i] = shadowPart;
}
boolean isMatched = QVTscheduleUtil.isMatched(shadowExp);
- ExpressionSynthesizer nestedAnalyzer = getExpressionSynthesizer(isMatched);
+ ExpressionSynthesizer nestedAnalyzer = getRequiredExpressionSynthesizer(isMatched);
return nestedAnalyzer.createShadow(shadowExp, shadowParts, partNodes);
}
@@ -1481,7 +1471,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
tupleParts[i] = tuplePart;
}
boolean isMatched = QVTscheduleUtil.isMatched(tupleLiteralExp);
- ExpressionSynthesizer nestedAnalyzer = getExpressionSynthesizer(isMatched);
+ ExpressionSynthesizer nestedAnalyzer = getRequiredExpressionSynthesizer(isMatched);
return nestedAnalyzer.createTupleLiteral(tupleLiteralExp, tupleParts, partNodes);
}

Back to the top