Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-09-17 11:11:50 +0000
committerEd Willink2016-09-19 11:19:59 +0000
commit0c01bf3bd784690eb9e11b8e255ce80776176c97 (patch)
treed953f7a470836b637e8b26bdab800078a3d923d5
parent3a10a69ffa041fc7c61b86e4d54b73015587bbbd (diff)
downloadorg.eclipse.qvtd-0c01bf3bd784690eb9e11b8e255ce80776176c97.tar.gz
org.eclipse.qvtd-0c01bf3bd784690eb9e11b8e255ce80776176c97.tar.xz
org.eclipse.qvtd-0c01bf3bd784690eb9e11b8e255ce80776176c97.zip
[500369] Fix QVTi AS2CS new-line seriliazation
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/formatting/QVTimperativeFormatter.java31
1 files changed, 15 insertions, 16 deletions
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 2cfdcf4bc..6673738da 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
@@ -77,32 +77,32 @@ public class QVTimperativeFormatter extends AbstractEssentialOCLFormatter
{
AddStatementCSElements a = f.getAddStatementCSAccess();
- c.setLinewrap(1).before(a.getObserveKeyword_0_0());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().before(a.getCommaKeyword_0_2_0());
c.setLinewrap(1).before(a.getAddKeyword_1());
c.setNoSpace().before(a.getSemicolonKeyword_5());
}
{
CheckStatementCSElements a = f.getCheckStatementCSAccess();
- c.setLinewrap(1).before(a.getCheckKeyword_0());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().before(a.getSemicolonKeyword_2());
setNoSpaceLineWrap(c, a.getSemicolonKeyword_2());
}
{
DeclareStatementCSElements a = f.getDeclareStatementCSAccess();
- c.setLinewrap(1).before(a.getObserveKeyword_0_0());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().before(a.getCommaKeyword_0_2_0());
c.setLinewrap(1).before(a.getIsCheckedAssignment_1());
setNoSpaceLineWrap(c, a.getSemicolonKeyword_7());
}
{
DirectionCSElements a = f.getDirectionCSAccess();
- c.setLinewrap(1).before(a.getAlternatives_1());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().before(a.getCommaKeyword_5_0());
}
{
GuardVariableCSElements a = f.getGuardVariableCSAccess();
- c.setLinewrap(1).before(a.getInKeyword_0());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().around(a.getColonKeyword_1());
c.setNoSpace().before(a.getSemicolonKeyword_6());
}
@@ -112,12 +112,12 @@ public class QVTimperativeFormatter extends AbstractEssentialOCLFormatter
}
{
InoutVariableCSElements a = f.getInoutVariableCSAccess();
- c.setLinewrap(1).before(a.getInoutKeyword_0());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().before(a.getSemicolonKeyword_4());
}
{
MappingCSElements a = f.getMappingCSAccess();
- c.setLinewrap(2).before(a.getMapKeyword_1());
+ c.setLinewrap(2).before(a.getGroup());
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());
@@ -125,8 +125,7 @@ public class QVTimperativeFormatter extends AbstractEssentialOCLFormatter
}
{
MappingCallCSElements a = f.getMappingCallCSAccess();
- c.setLinewrap(1).before(a.getIsInfiniteInfiniteKeyword_1_0());
- c.setLinewrap(1).before(a.getCallKeyword_2());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoLinewrap().after(a.getIsInfiniteInfiniteKeyword_1_0());
setAppendedBraces(c, a.getLeftCurlyBracketKeyword_4(), a.getRightCurlyBracketKeyword_6());
// c.setIndentation(a.getLeftCurlyBracketKeyword_3(), a.getRightCurlyBracketKeyword_5());
@@ -137,13 +136,13 @@ public class QVTimperativeFormatter extends AbstractEssentialOCLFormatter
}
{
MappingLoopCSElements a = f.getMappingLoopCSAccess();
- c.setLinewrap(1).before(a.getObserveKeyword_0_0());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().before(a.getCommaKeyword_0_2_0());
setAppendedBraces(c, a.getLeftCurlyBracketKeyword_5(), a.getRightCurlyBracketKeyword_7());
}
{
NewStatementCSElements a = f.getNewStatementCSAccess();
- c.setLinewrap(1).before(a.getObserveKeyword_0_0());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().before(a.getCommaKeyword_0_2_0());
c.setLinewrap(1).before(a.getNewKeyword_1());
c.setNoSpace().around(a.getColonKeyword_2());
@@ -151,19 +150,19 @@ public class QVTimperativeFormatter extends AbstractEssentialOCLFormatter
}
{
OutVariableCSElements a = f.getOutVariableCSAccess();
- c.setLinewrap(1).before(a.getOutKeyword_0());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().before(a.getSemicolonKeyword_4());
}
{
QualifiedPackageCSElements a = f.getQualifiedPackageCSAccess();
- c.setLinewrap(2).before(a.getPackageKeyword_0());
+ c.setLinewrap(2).before(a.getGroup());
c.setNoSpace().between(a.getLeftCurlyBracketKeyword_5_0_0(), a.getRightCurlyBracketKeyword_5_0_2());
setBraces(c, a.getLeftCurlyBracketKeyword_5_0_0(), a.getRightCurlyBracketKeyword_5_0_2());
setNoSpaceLineWrap(c, a.getSemicolonKeyword_5_1());
}
{
QueryCSElements a = f.getQueryCSAccess();
- c.setLinewrap(2).before(a.getIsTransientAssignment_0());
+ c.setLinewrap(2).before(a.getGroup());
c.setNoSpace().around(a.getLeftParenthesisKeyword_4());
c.setNoSpace().around(a.getLeftParenthesisKeyword_4());
c.setNoSpace().before(a.getCommaKeyword_5_1_0());
@@ -180,7 +179,7 @@ public class QVTimperativeFormatter extends AbstractEssentialOCLFormatter
}
{
SetStatementCSElements a = f.getSetStatementCSAccess();
- c.setLinewrap(1).before(a.getObserveKeyword_0_0());
+ c.setLinewrap(1).before(a.getGroup());
c.setNoSpace().before(a.getCommaKeyword_0_2_0());
c.setLinewrap(1).before(a.getIsNotifyAssignment_1());
c.setNoSpace().around(a.getFullStopKeyword_4());
@@ -194,7 +193,7 @@ public class QVTimperativeFormatter extends AbstractEssentialOCLFormatter
// }
{
TransformationCSElements a = f.getTransformationCSAccess();
- c.setLinewrap(2).before(a.getTransformationKeyword_0());
+ c.setLinewrap(2).before(a.getGroup());
c.setNoSpace().between(a.getLeftCurlyBracketKeyword_3(), a.getRightCurlyBracketKeyword_5());
setBraces(c, a.getLeftCurlyBracketKeyword_3(), a.getRightCurlyBracketKeyword_5());
setNoSpaceLineWrap(c, a.getSemicolonKeyword_4_1());

Back to the top