use of org.eclipse.xtext.preferences.MapBasedPreferenceValues in project xtext-xtend by eclipse.
the class XtendInterfaceFormatterTest method formatFieldPublicStaticFinal.
@Test
public void formatFieldPublicStaticFinal() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("interface bar {");
_builder.newLine();
_builder.append("\t");
_builder.append("public static final int foo");
_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 XtendInterfaceFormatterTest method formatFieldStatic03.
@Test
public void formatFieldStatic03() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("interface bar {");
_builder.newLine();
_builder.append("\t");
_builder.append("public static int bar");
_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 XtendInterfaceFormatterTest method formatMethod03.
@Test
public void formatMethod03() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
it.<Boolean>put(XbaseFormatterPreferenceKeys.bracesInNewLine, Boolean.valueOf(true));
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("package foo");
_builder.newLine();
_builder.newLine();
_builder.append("interface bar");
_builder.newLine();
_builder.append("{");
_builder.newLine();
_builder.append("\t");
_builder.append("abstract def baz()");
_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 XtendInterfaceFormatterTest method formatMethod02.
@Test
public void formatMethod02() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
it.<Boolean>put(XbaseFormatterPreferenceKeys.bracesInNewLine, Boolean.valueOf(true));
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("package foo");
_builder.newLine();
_builder.newLine();
_builder.append("interface bar");
_builder.newLine();
_builder.append("{");
_builder.newLine();
_builder.append("\t");
_builder.append("def baz()");
_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 XtendOnelinersFormatterTest method formatEmptyMethod4.
@Test
public void formatEmptyMethod4() {
final Procedure1<MapBasedPreferenceValues> _function = (MapBasedPreferenceValues it) -> {
it.<Boolean>put(XtendFormatterPreferenceKeys.keepOneLineMethods, Boolean.valueOf(true));
};
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("def m() {}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("class C {");
_builder_1.newLine();
_builder_1.append("\t");
_builder_1.append("def m() { }");
_builder_1.newLine();
_builder_1.append("}");
_builder_1.newLine();
this.assertFormatted(_function, _builder, _builder_1);
}
Aggregations