From a6a1dbea46fd4829189b23fb900da6a586a8151a Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Fri, 16 Jul 2021 10:48:06 +0700 Subject: Fix more AsciiDoc links and code blocks (WIP) - Add Java syntax highlighting to AspectJ and Java files - Add XML syntax highlighting to XML files (Ant, LTW etc.) - Dedent and remove empty lines, where necessary - Enclose in-line line numbers for Java code in /*23*/ comments in order to enable Java formatting Signed-off-by: Alexander Kriegisch --- docs/sandbox/readme-sandbox.adoc | 6 ++++++ docs/sandbox/trails/j2ee.adoc | 1 + 2 files changed, 7 insertions(+) (limited to 'docs/sandbox') diff --git a/docs/sandbox/readme-sandbox.adoc b/docs/sandbox/readme-sandbox.adoc index 8d796128a..da4e69cbe 100644 --- a/docs/sandbox/readme-sandbox.adoc +++ b/docs/sandbox/readme-sandbox.adoc @@ -34,6 +34,7 @@ tells how. extracts samples of the following form from any "source" file (currently source, html, text, and shell scripts): +[source, text] .... ... some text, possibly including @author tags {comment} START-SAMPLE [anchorName] [anchor title] {end-comment} @@ -63,6 +64,7 @@ indented only once in the source code, even though they might normally be indented more. ** In AspectJ, indent advice pointcuts beyond the block code: + +[source, java] .... before() : call(!public * com.company.library..*.*(String,..)) && within(Runnable+) { // indent once more than code @@ -107,6 +109,7 @@ suffixes necessary for clarity and to make sure there are unique titles for each test. E.g., for a sample with the anchor "`language-initialization`", + +[source, xml] .... @@ -135,6 +139,7 @@ message and the target code in sync. You can help with this by adding a comment in the target code so people editing the code know not to fix or move the code. E.g., + +[source, java] .... void spawn() { new Thread(this, toString()).start(); // KEEP CE 15 declares-factory @@ -151,6 +156,7 @@ make it easier to find the test that will break if the code is modified. If the code is broken (e.g., if it no longer works in the latest version of AspectJ), then prefix SAMPLE with BROKEN in the tag: +[source, text] .... {comment} START-BROKEN-SAMPLE ... ... sample code ... diff --git a/docs/sandbox/trails/j2ee.adoc b/docs/sandbox/trails/j2ee.adoc index 2697175f0..a483a7b79 100644 --- a/docs/sandbox/trails/j2ee.adoc +++ b/docs/sandbox/trails/j2ee.adoc @@ -37,6 +37,7 @@ up ajc as the compiler, do the following before starting Tomcat: tell Ant to use `ajc` by setting the compiler property to the AspectJ compiler adapter: + +[source, xml] .... jsp -- cgit v1.2.3