use of org.eclipse.xtext.xbase.lib.Procedures.Procedure0 in project xtext-xtend by eclipse.
the class TypesChangingQueuedBuildDataTest method createPrimaryAndSecondaryType.
@Test
public void createPrimaryAndSecondaryType() {
final Procedure0 _function = () -> {
StringConcatenation _builder = new StringConcatenation();
_builder.append("public class Bar {}");
_builder.newLine();
_builder.newLine();
_builder.append("class Foo {}");
_builder.newLine();
this.create("Bar.java", _builder.toString());
};
this.assertThereAreDeltas(_function, "Foo", "Bar");
}
use of org.eclipse.xtext.xbase.lib.Procedures.Procedure0 in project xtext-xtend by eclipse.
the class TypesChangingQueuedBuildDataTest method deletePrimaryAndNestedTypes2.
@Test
public void deletePrimaryAndNestedTypes2() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("package mypackage;");
_builder.newLine();
_builder.newLine();
_builder.append("public class Bar {");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("public class Foo {");
_builder.newLine();
_builder.newLine();
_builder.append("\t\t");
_builder.append("public class Foo3 {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("public static class Foo2 {}");
_builder.newLine();
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.create("/mypackage/Bar.java", _builder.toString());
final Procedure0 _function = () -> {
this.delete("/mypackage/Bar.java");
};
this.assertThereAreDeltas(_function, "mypackage.Bar", "mypackage.Bar$Foo$Foo3", "mypackage.Bar$Foo2", "mypackage.Bar$Foo");
}
use of org.eclipse.xtext.xbase.lib.Procedures.Procedure0 in project xtext-xtend by eclipse.
the class TypesChangingQueuedBuildDataTest method createPrimaryType.
@Test
public void createPrimaryType() {
final Procedure0 _function = () -> {
this.create("Bar.java", "public class Bar {}");
};
this.assertThereAreDeltas(_function, "Bar");
}
use of org.eclipse.xtext.xbase.lib.Procedures.Procedure0 in project xtext-xtend by eclipse.
the class TypesChangingQueuedBuildDataTest method deletePrimaryAndSecondaryType.
@Test
public void deletePrimaryAndSecondaryType() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("public class Bar {}");
_builder.newLine();
_builder.newLine();
_builder.append("class Foo {}");
_builder.newLine();
this.create("Bar.java", _builder.toString());
final Procedure0 _function = () -> {
this.delete("Bar.java");
};
this.assertThereAreDeltas(_function, "Bar", "Foo");
}
use of org.eclipse.xtext.xbase.lib.Procedures.Procedure0 in project xtext-xtend by eclipse.
the class AbstractSingleEditorQueuedBuildTest method renamePrimaryTopLevelTypeWithinDefaultPackage.
@Test
public void renamePrimaryTopLevelTypeWithinDefaultPackage() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("public class Bar {}");
_builder.newLine();
this.testHelper.createFile("Bar.java", _builder.toString());
final Procedure0 _function = () -> {
this.save("Bar.java", "Bar", "Bar2");
};
this.assertThereAreDeltas(_function, "Bar", "Bar2");
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
Aggregations