Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-09-10 07:56:02 +0000
committerEd Willink2016-09-19 11:18:32 +0000
commitabf67c02dbc19c8e71eaac23dc9076ce0513e2e9 (patch)
treed7661dc5fd81d2d6edf13e3674d4fa602dd9b2d9
parentc10d87738c17a35d5bda41deb4a217371069f8f9 (diff)
downloadorg.eclipse.qvtd-abf67c02dbc19c8e71eaac23dc9076ce0513e2e9.tar.gz
org.eclipse.qvtd-abf67c02dbc19c8e71eaac23dc9076ce0513e2e9.tar.xz
org.eclipse.qvtd-abf67c02dbc19c8e71eaac23dc9076ce0513e2e9.zip
[500369] Remove polledClasses/keyIdentifier support
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/as2cs/QVTimperativeDeclarationVisitor.java14
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSContainmentVisitor.java1
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPostOrderVisitor.java5
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPreOrderVisitor.java13
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/formatting/QVTimperativeFormatter.java11
5 files changed, 5 insertions, 39 deletions
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/as2cs/QVTimperativeDeclarationVisitor.java b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/as2cs/QVTimperativeDeclarationVisitor.java
index 2e32c31f2..24feb6051 100644
--- a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/as2cs/QVTimperativeDeclarationVisitor.java
+++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/as2cs/QVTimperativeDeclarationVisitor.java
@@ -354,17 +354,6 @@ public class QVTimperativeDeclarationVisitor extends QVTbaseDeclarationVisitor i
context.refreshList(csPathNames, pathNames);
}
- protected void refreshUsedTypes(@NonNull MappingCS csMapping, @NonNull Mapping asMapping) {
- List<PathNameCS> csPathNames = new ArrayList<PathNameCS>();
- for (org.eclipse.ocl.pivot.@NonNull Class asClass : ClassUtil.nullFree(asMapping.getPolledClasses())) {
- @NonNull PathNameCS csPathName = BaseCSFactory.eINSTANCE.createPathNameCS();
- csPathNames.add(csPathName);
- Transformation asTransformation = QVTbaseUtil.getContainingTransformation(asMapping);
- context.refreshPathName(csPathName, asClass, asTransformation);
- }
- context.refreshList(csMapping.getOwnedUsesPathNames(), csPathNames);
- }
-
@Override
public ElementCS visitAddStatement(@NonNull AddStatement asAddStatement) {
AddStatementCS csStatement = context.refreshElement(AddStatementCS.class, QVTimperativeCSPackage.Literals.ADD_STATEMENT_CS, asAddStatement);
@@ -523,9 +512,7 @@ public class QVTimperativeDeclarationVisitor extends QVTbaseDeclarationVisitor i
public ElementCS visitMapping(@NonNull Mapping asMapping) {
MappingCS csMapping = context.refreshNamedElement(MappingCS.class, QVTimperativeCSPackage.Literals.MAPPING_CS, asMapping);
csMapping.setPivot(asMapping);
- csMapping.setIsDefault(asMapping.isIsDefault());
refreshOwnedInTransformation(csMapping, asMapping);
- refreshUsedTypes(csMapping, asMapping);
context.refreshList(csMapping.getOwnedDomains(), context.visitDeclarations(DomainCS.class, asMapping.getDomain(), null));
DomainCS csDomain = context.refreshElement(DomainCS.class, QVTimperativeCSPackage.Literals.DOMAIN_CS, asMapping);
csDomain.setPivot(null); // stop comment duplication
@@ -536,7 +523,6 @@ public class QVTimperativeDeclarationVisitor extends QVTbaseDeclarationVisitor i
refreshUsedProperties(asTransformation, csDomain.getCheckedProperties(), ClassUtil.nullFree(asMapping.getCheckedProperties()));
refreshUsedProperties(asTransformation, csDomain.getCheckedProperties(), ClassUtil.nullFree(asMapping.getCheckedProperties()));
csMapping.setOwnedMiddle(csDomain);
- csMapping.setOwnedKeyExpression(createExpCS(asMapping.getOwnedKeyExpression()));
context.refreshList(csMapping.getOwnedStatements(), context.visitDeclarations(StatementCS.class, asMapping.getOwnedStatements(), null));
return csMapping;
}
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSContainmentVisitor.java b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSContainmentVisitor.java
index 87b32f1cf..a7d5a1697 100644
--- a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSContainmentVisitor.java
+++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSContainmentVisitor.java
@@ -291,7 +291,6 @@ public class QVTimperativeCSContainmentVisitor extends AbstractQVTimperativeCSCo
}
context.refreshPivotList(ImperativeDomain.class, pivotElement.getDomain(), csElement.getOwnedDomains());
context.refreshPivotList(Statement.class, pivotElement.getOwnedStatements(), csElement.getOwnedStatements());
- pivotElement.setIsDefault(csElement.isIsDefault());
return null;
}
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPostOrderVisitor.java b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPostOrderVisitor.java
index bf6f644f3..9ea510d35 100644
--- a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPostOrderVisitor.java
+++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPostOrderVisitor.java
@@ -240,11 +240,6 @@ public class QVTimperativeCSPostOrderVisitor extends AbstractQVTimperativeCSPost
asPredicates.add(j++, asVariablePredicate);
}
}
- ExpCS expression = csElement.getOwnedKeyExpression();
- if (expression != null) {
- OCLExpression target = context.visitLeft2Right(OCLExpression.class, expression);
- asMapping.setOwnedKeyExpression(target);
- }
}
return null;
}
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPreOrderVisitor.java b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPreOrderVisitor.java
index e39903ab9..5499cac7e 100644
--- a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPreOrderVisitor.java
+++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/cs2as/QVTimperativeCSPreOrderVisitor.java
@@ -240,19 +240,6 @@ public class QVTimperativeCSPreOrderVisitor extends AbstractQVTimperativeCSPreOr
@Override
public Continuation<?> visitMappingCS(@NonNull MappingCS csMapping) {
- Mapping asMapping = PivotUtil.getPivot(Mapping.class, csMapping);
- if (asMapping != null) {
- List<org.eclipse.ocl.pivot.Class> asClasses = new ArrayList<org.eclipse.ocl.pivot.Class>();
- for (PathNameCS csPathName : csMapping.getOwnedUsesPathNames()) {
- if (csPathName != null) {
- org.eclipse.ocl.pivot.Class asClass = lookupClass(csMapping, csPathName, null);
- if (asClass != null) {
- asClasses.add(asClass);
- }
- }
- }
- context.refreshList(asMapping.getPolledClasses(), asClasses);
- }
return null;
}
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/formatting/QVTimperativeFormatter.java b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/formatting/QVTimperativeFormatter.java
index 171b997d7..d52a71b09 100644
--- a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/formatting/QVTimperativeFormatter.java
+++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/formatting/QVTimperativeFormatter.java
@@ -221,13 +221,12 @@ public class QVTimperativeFormatter extends AbstractEssentialOCLFormatter
}
{
MappingCSElements a = f.getMappingCSAccess();
- c.setLinewrap(2).before(a.getMapKeyword_2());
- c.setNoSpace().before(a.getSemicolonKeyword_6_2());
- c.setNoSpace().between(a.getLeftCurlyBracketKeyword_7(), a.getRightCurlyBracketKeyword_12());
- setBraces(c, a.getLeftCurlyBracketKeyword_7(), a.getRightCurlyBracketKeyword_12());
+ c.setLinewrap(2).before(a.getMapKeyword_1());
+ c.setNoSpace().between(a.getLeftCurlyBracketKeyword_4(), a.getRightCurlyBracketKeyword_9());
+ setBraces(c, a.getLeftCurlyBracketKeyword_4(), a.getRightCurlyBracketKeyword_9());
// c.setLinewrap(2).between(a.getDomainsAssignment_5(), a.getDomainsAssignment_5());
- c.setLinewrap(1).before(a.getOwnedDomainsAssignment_8());
- c.setLinewrap(1).before(a.getWhereKeyword_9_0());
+ c.setLinewrap(1).before(a.getOwnedDomainsAssignment_5());
+ c.setLinewrap(1).before(a.getWhereKeyword_6_0());
}
{
MappingCallCSElements a = f.getMappingCallCSAccess();

Back to the top