From 11cbae607b5a6f59f5a019b7eb525da689d2bb30 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 16 Nov 2021 16:47:58 +0100 Subject: feat(web): xtext formatter client Uses the xtext formatted on the server to format the document. Also adds the capability to take (delta) changes from the server and apply them before any pending local changes, then replay the changes. This means that the server-side formatter is effectively acting as a second user who is editing the document. --- .../language/tests/formatting2/ProblemFormatterTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'language') diff --git a/language/src/test/java/tools/refinery/language/tests/formatting2/ProblemFormatterTest.java b/language/src/test/java/tools/refinery/language/tests/formatting2/ProblemFormatterTest.java index 854c3da1..41ad2d31 100644 --- a/language/src/test/java/tools/refinery/language/tests/formatting2/ProblemFormatterTest.java +++ b/language/src/test/java/tools/refinery/language/tests/formatting2/ProblemFormatterTest.java @@ -105,19 +105,19 @@ class ProblemFormatterTest { void classWithoutBodyTest() { testFormatter(" class Foo . ", "class Foo.\n"); } - + @Test void abstractClassWithoutBodyTest() { testFormatter(" abstract class Foo . ", "abstract class Foo.\n"); } - + @Test void classExtendsWithoutBodyTest() { testFormatter(" class Foo. class Bar . class Quux extends Foo , Bar . ", """ class Foo. - + class Bar. - + class Quux extends Foo, Bar. """); } @@ -134,9 +134,9 @@ class ProblemFormatterTest { void classExtendsWithBodyTest() { testFormatter(" class Foo. class Bar . class Quux extends Foo , Bar { } ", """ class Foo. - + class Bar. - + class Quux extends Foo, Bar { } """); @@ -200,7 +200,7 @@ class ProblemFormatterTest { problem test. pred foo(node a). - + class Foo. foo(n1, n2). -- cgit v1.2.3-54-g00ecf