diff --git a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/formatting2/package-info.java b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/formatting2/package-info.java index cf57e0bad..984fcfd0f 100644 --- a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/formatting2/package-info.java +++ b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/formatting2/package-info.java @@ -6,7 +6,7 @@ * semantic model.

* *

This infrastructure is capable of formatting documents based on the node model and based on the serializer's output. - * The actual formatting is done by constructing a list of text replacements. Applying the text replacement turns the + * The actual formatting is done by constructing a list of text replacements. Applying the text replacements turns the * unformatted document into a formatted document. Purpose of this infrastructure is to make it convenient for * implementers to construct these text replacements.

* diff --git a/tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/formatting2/internal/GenericFormatterTester.xtend b/tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/formatting2/internal/GenericFormatterTester.xtend index ab1677a81..d3897ff87 100644 --- a/tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/formatting2/internal/GenericFormatterTester.xtend +++ b/tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/formatting2/internal/GenericFormatterTester.xtend @@ -31,17 +31,27 @@ class GenericFormatterTester { } } +/** + * @author Moritz Eysholdt - Initial contribution and API + */ class FormatterTesterWithImpl extends FormatterTester { override protected createFormatter(FormatterTestRequest req) { (req as GenericFormatterTestRequest).formatter } } +/** + * @author Moritz Eysholdt - Initial contribution and API + */ class GenericFormatterTestRequest extends FormatterTestRequest { @Accessors GenericFormatter formatter } -@Accessors abstract class GenericFormatter extends AbstractFormatter2 { +/** + * @author Moritz Eysholdt - Initial contribution and API + */ +@Accessors +abstract class GenericFormatter extends AbstractFormatter2 { def dispatch format(EObject obj, IFormattableDocument document) { format(obj as T, request.textRegionAccess, document) } diff --git a/tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/formatting2/internal/RegionSetTest.xtend b/tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/formatting2/internal/RegionSetTest.xtend index 83ee1510c..cef77d2a9 100644 --- a/tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/formatting2/internal/RegionSetTest.xtend +++ b/tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/formatting2/internal/RegionSetTest.xtend @@ -116,6 +116,9 @@ class RegionSetTest { } } +/** + * @author Moritz Eysholdt - Initial contribution and API + */ @FinalFieldsConstructor class TestableTextSegmentSet { val List issues = newArrayList val TextSegmentSet set