use of org.eclipse.xtext.parsetree.formatter.formattertestlanguage.TestLinewrapMinMax in project xtext-core by eclipse.
the class FormatterTestLanguageSemanticSequencer method sequence.
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == FormattertestlanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case FormattertestlanguagePackage.ASSIGN:
sequence_Assign(context, (Assign) semanticObject);
return;
case FormattertestlanguagePackage.DATATYPES:
sequence_Datatypes(context, (Datatypes) semanticObject);
return;
case FormattertestlanguagePackage.DECL:
sequence_Decl(context, (Decl) semanticObject);
return;
case FormattertestlanguagePackage.ENUMERATION:
sequence_Enumeration(context, (Enumeration) semanticObject);
return;
case FormattertestlanguagePackage.FQN_OBJ:
sequence_FqnObj(context, (FqnObj) semanticObject);
return;
case FormattertestlanguagePackage.FQN_REF:
sequence_FqnRef(context, (FqnRef) semanticObject);
return;
case FormattertestlanguagePackage.METH:
sequence_Meth(context, (Meth) semanticObject);
return;
case FormattertestlanguagePackage.PARAM:
sequence_Param(context, (Param) semanticObject);
return;
case FormattertestlanguagePackage.SPACE:
sequence_Space(context, (Space) semanticObject);
return;
case FormattertestlanguagePackage.SUPPRESSED_HIDDEN:
sequence_SuppressedHidden(context, (SuppressedHidden) semanticObject);
return;
case FormattertestlanguagePackage.SUPPRESSED_HIDDEN_SUB_ID:
sequence_SuppressedHiddenSubID(context, (SuppressedHiddenSubID) semanticObject);
return;
case FormattertestlanguagePackage.SUPPRESSED_HIDDEN_SUB_SUB:
sequence_SuppressedHiddenSubSub(context, (SuppressedHiddenSubSub) semanticObject);
return;
case FormattertestlanguagePackage.TEST_INDENTATION:
sequence_TestIndentation(context, (TestIndentation) semanticObject);
return;
case FormattertestlanguagePackage.TEST_LINEWRAP:
sequence_TestLinewrap(context, (TestLinewrap) semanticObject);
return;
case FormattertestlanguagePackage.TEST_LINEWRAP_MIN_MAX:
sequence_TestLinewrapMinMax(context, (TestLinewrapMinMax) semanticObject);
return;
case FormattertestlanguagePackage.WRAPPING_DATA_TYPE_TEST:
sequence_WrappingDataTypeTest(context, (WrappingDataTypeTest) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.parsetree.formatter.formattertestlanguage.TestLinewrapMinMax in project xtext-core by eclipse.
the class FormatterTest method testLinewrapDefault.
@Test
public void testLinewrapDefault() throws Exception {
FormattertestlanguageFactory f = FormattertestlanguageFactory.eINSTANCE;
TestLinewrapMinMax m = f.createTestLinewrapMinMax();
Decl d = f.createDecl();
d.getType().add("xxx");
d.getName().add("yyy");
m.getItems().add(d);
String actual = getSerializer().serialize(m, SaveOptions.newBuilder().format().getOptions());
final String expected = convertLineBreaks("test wrapminmax\n\n\nxxx yyy;");
assertEquals(expected, actual);
}
Aggregations