diff --git a/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/ExecutionEnvironment.check b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/ExecutionEnvironment.check
new file mode 100644
index 0000000000..f05da22ca7
--- /dev/null
+++ b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/ExecutionEnvironment.check
@@ -0,0 +1,25 @@
+package com.avaloq.tools.ddk.check.validation
+
+import com.avaloq.tools.ddk.check.testLanguage.Greeting
+
+catalog ExecutionEnvironment
+for grammar com.avaloq.tools.ddk.check.TestLanguage {
+
+ category DefaultCategory "Test category" {
+
+ /** Checks the greeting name length */
+ onSave error GreetingNameLength "Greeting name length" (String defaultName = "Franz")
+ message "Greeting name {0}" {
+
+ for Greeting g {
+ if (g.name.length > 5) {
+ issue bind ("too long") data namelength (null)
+ } else if (g.name.equals(defaultName)) {
+ issue bind ("must not be Franz") data franzname (null)
+ }
+ }
+
+ }
+
+ }
+}
diff --git a/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/ExecutionEnvironment.html b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/ExecutionEnvironment.html
new file mode 100644
index 0000000000..ea4a27aaaa
--- /dev/null
+++ b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/ExecutionEnvironment.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+ ExecutionEnvironment
+
+
+
+
+
+
+ Test category
+ Checks the greeting name length
+
+
+ Greeting name length #
+ error
+
+ Checks the greeting name length
+ Greeting name ...
+
+
+
+
+
diff --git a/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/LibraryChecks.check b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/LibraryChecks.check
new file mode 100644
index 0000000000..1ab022695a
--- /dev/null
+++ b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/LibraryChecks.check
@@ -0,0 +1,99 @@
+package com.avaloq.tools.ddk.check.validation
+
+import com.avaloq.tools.ddk.check.lib.IResourceCache
+import com.avaloq.tools.ddk.check.testLanguage.Greeting
+import com.google.inject.Inject
+import java.util.List
+import com.google.common.collect.ImmutableList
+
+/**
+ * Check catalog for com.avaloq.tools.ddk.check.TestLanguage
+ */
+catalog LibraryChecks
+for grammar com.avaloq.tools.ddk.check.TestLanguage {
+
+ @Inject IResourceCache cache;
+
+
+ category InjectionChecks "Checks on injections in check catalogs." {
+
+ /** Warning to indicate that this catalog is active. */
+ live warning CheckCatalogIsActive "Check catalog is active"
+ message "Catalog is active" {
+ for Greeting {
+ issue;
+ }
+ }
+
+ /** Error if the injection didn't work. */
+ live error CacheInjectionFailed "Cache injection failed"
+ message "Cache was not injected" {
+ for Greeting g {
+ if (cache === null) {
+ issue;
+ }
+ }
+ }
+
+ /** Error if values cannot be read from cache. */
+ live error CacheDoesntWork "Cache doesn't work"
+ message "{0}" {
+ for Greeting {
+ val String key = this.qualifiedCatalogName + ".testValue";
+ try {
+ cache.put(it, key, Boolean.TRUE);
+ val Boolean value = cache.get(it, key);
+ if (value === null || !value) {
+ issue bind ("Could not read value from cache: " + value);
+ }
+ } catch (Throwable t) {
+ issue bind ("Exception in cache access: " + t.getMessage());
+ }
+ }
+ }
+ }
+
+ category FormalParameterChecks "Checks on formal parameters" {
+
+ /** Test formal parameter access. */
+ live error FormalParameters "Formal Parameters"
+ (String param1 = "param1", boolean param2 = !!true, Boolean param3 = false, List names = #['foo', 'bar', 'ba\u0001\nz'], List ints = #[5, -42, 7])
+ message "{0}" {
+ for Greeting {
+ val String p1 = param1;
+ val boolean p2 = false;
+ val List expectedNames = ImmutableList::of('foo', 'bar', 'ba\u0001\nz');
+ val expectedInts = #[5, -42, 7];
+ if (!"param1".equals(p1)) {
+ issue bind ('String parameter wrong (expected "param1"): ' + p1);
+ }
+ if (p2 != param3 || !p2 != param2) {
+ issue bind ("Boolean parameter wrong.");
+ }
+ var int i = 0;
+ val List names = names; // Whoa!
+ if (names.size != expectedNames.size) {
+ issue bind ("Expected three names, got " + names.size);
+ } else {
+ while (i < names.size) {
+ if (!expectedNames.get(i).equals(names.get(i))) {
+ issue bind ('String mismatch in list, expected "' + expectedNames.get(i) + '" but got "' + names.get(i) + '"')
+ }
+ i = i + 1;
+ }
+ }
+ val INTS = ints;
+ if (INTS.size != expectedInts.size) {
+ issue bind('Expected three ints, got ' + INTS.size);
+ }
+ i = 0;
+ while (i < INTS.size) {
+ if (expectedInts.get(i).intValue != INTS.get(i).intValue) {
+ issue bind ('Integer mismatch at index ' + i + ':' + expectedInts.get(i) + ' != ' + INTS.get(i));
+ }
+ i = i + 1;
+ }
+ }
+ }
+ }
+}
diff --git a/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/LibraryChecks.html b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/LibraryChecks.html
new file mode 100644
index 0000000000..a84e860e46
--- /dev/null
+++ b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/LibraryChecks.html
@@ -0,0 +1,198 @@
+
+
+
+
+
+ LibraryChecks
+
+
+
+
+
+
+ Checks on injections in check catalogs.
+ Warning to indicate that this catalog is active.
+
+
+ Check catalog is active #
+ warning
+
+ Warning to indicate that this catalog is active.
+ Catalog is active
+
+
+
+ Cache injection failed #
+ error
+
+ Error if the injection didn't work.
+ Cache was not injected
+
+
+
+ Cache doesn't work #
+ error
+
+ Error if values cannot be read from cache.
+ ...
+
+
+
+
+ Test formal parameter access.
+
+
+ Formal Parameters #
+ error
+
+ Test formal parameter access.
+ ...
+
+
+
+
+
diff --git a/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/Special-contexts.xml b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/Special-contexts.xml
new file mode 100644
index 0000000000..181dbbdfdc
--- /dev/null
+++ b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/Special-contexts.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/Special-toc.xml b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/Special-toc.xml
new file mode 100644
index 0000000000..b8d476bdb3
--- /dev/null
+++ b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/Special-toc.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/Special.check b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/Special.check
new file mode 100644
index 0000000000..41a5bbd608
--- /dev/null
+++ b/com.avaloq.tools.ddk.check.core.test/resource/com/avaloq/tools/ddk/check/core/test/docgen/Special.check
@@ -0,0 +1,25 @@
+package com.avaloq.tools.ddk.check.validation
+
+import com.avaloq.tools.ddk.check.testLanguage.Greeting
+
+catalog Special
+for grammar com.avaloq.tools.ddk.check.TestLanguage {
+
+ /** A check outside any category. */
+ live warning TopLevel "Naming &
+
+
+
+
+
+
+
+