use of org.eclipse.xtext.preferences.MapBasedPreferenceValues in project xtext-xtend by eclipse.
the class XtendClassFormatterTest method formatFieldExtensionInit01.
@Test
public void formatFieldExtensionInit01() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("class bar {");
_builder.newLine();
_builder.append("\t");
_builder.append("extension String = \"a\" + \"b\"");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.assertFormatted(_function, _builder);
}
use of org.eclipse.xtext.preferences.MapBasedPreferenceValues in project xtext-xtend by eclipse.
the class XtendClassFormatterTest method formatFieldExtensionInit02.
@Test
public void formatFieldExtensionInit02() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("class bar {");
_builder.newLine();
_builder.append("\t");
_builder.append("extension String = \"a\" + \"b\"");
_builder.newLine();
_builder.append("\t");
_builder.append("extension Integer = 1 + 2");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.assertFormatted(_function, _builder);
}
use of org.eclipse.xtext.preferences.MapBasedPreferenceValues in project xtext-xtend by eclipse.
the class XtendClassFormatterTest method formatConstructor02.
@Test
public void formatConstructor02() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
it.<Boolean>put(XbaseFormatterPreferenceKeys.bracesInNewLine, Boolean.valueOf(true));
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("class bar");
_builder.newLine();
_builder.append("{");
_builder.newLine();
_builder.append("\t");
_builder.append("new()");
_builder.newLine();
_builder.append("\t");
_builder.append("{");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.assertFormatted(_function, _builder);
}
use of org.eclipse.xtext.preferences.MapBasedPreferenceValues in project xtext-xtend by eclipse.
the class XtendClassFormatterTest method formatFieldExtension01.
@Test
public void formatFieldExtension01() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("class bar {");
_builder.newLine();
_builder.append("\t");
_builder.append("extension String");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.assertFormatted(_function, _builder);
}
use of org.eclipse.xtext.preferences.MapBasedPreferenceValues in project xtext-xtend by eclipse.
the class XtendClassFormatterTest method formatMethod01.
@Test
public void formatMethod01() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
it.<Boolean>put(XbaseFormatterPreferenceKeys.bracesInNewLine, Boolean.valueOf(false));
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("package foo");
_builder.newLine();
_builder.newLine();
_builder.append("class bar {");
_builder.newLine();
_builder.append("\t");
_builder.append("def baz() {");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.assertFormatted(_function, _builder);
}
Aggregations