Fix Remove leading CONTEXT prefix from all constants in
MODIFY
asciidoctorj-core/src/main/java/org/asciidoctor/extension/BlockProcessor.java
asciidoctorj-core/src/main/java/org/asciidoctor/extension/BlockProcessor.java
@@ -16,7 +16,7 @@ public abstract class BlockProcessor extends Processor {
* <pre>
* <verbatim>
* Map&lt;String, Object&gt; config = new HashMap&lt;&gt;();
- * config.put(CONTEXTS, Arrays.asList(CONTEXT_EXAMPLE, CONTEXT_LISTING));
+ * config.put(CONTEXTS, Arrays.asList(EXAMPLE, LISTING));
* BlockProcessor blockProcessor = new BlockProcessor("foo", config);
* asciidoctor.javaExtensionRegistry().block(blockProcessor);
* </verbatim>

MODIFY
asciidoctorj-core/src/main/java/org/asciidoctor/extension/Contexts.java
asciidoctorj-core/src/main/java/org/asciidoctor/extension/Contexts.java
@@ -11,7 +11,7 @@ import java.lang.annotation.Target;
* Example for a BlockProcessor that transforms all open blocks with the name {@code yell} to upper case:
* <pre><code>
* &#64;Name("yell")
- * &#64;Contexts(Contexts.CONTEXT_OPEN)
+ * &#64;Contexts(Contexts.OPEN)
* &#64;ContentModel(ContentModel.SIMPLE)
* class YellBlockProcessor extends BlockProcessor {
* public YellBlockProcessor(String blockName) {
@@ -58,7 +58,7 @@ public @interface Contexts {
* --
* </pre>
*/
- public static final String CONTEXT_OPEN = ":open";
+ public static final String OPEN = ":open";
/**
* Predefined constant for making a Processor work on example blocks.
@@ -69,7 +69,7 @@ public @interface Contexts {
* ====
* </pre>
*/
- public static final String CONTEXT_EXAMPLE = ":example";
+ public static final String EXAMPLE = ":example";
/**
* Predefined constant for making a Processor work on sidebar blocks.
@@ -80,7 +80,7 @@ public @interface Contexts {
* ****
* </pre>
*/
- public static final String CONTEXT_SIDEBAR = ":sidebar";
+ public static final String SIDEBAR = ":sidebar";
/**
* Predefined constant for making a Processor work on literal blocks.
@@ -91,7 +91,7 @@ public @interface Contexts {
* ....
* </pre>
*/
- public static final String CONTEXT_LITERAL = ":literal";
+ public static final String LITERAL = ":literal";
/**
* Predefined constant for making a Processor work on source blocks.
@@ -102,7 +102,7 @@ public @interface Contexts {
* ....
* </pre>
*/
- public static final String CONTEXT_LISTING = ":listing";
+ public static final String LISTING = ":listing";
/**
* Predefined constant for making a Processor work on quote blocks.
@@ -113,7 +113,7 @@ public @interface Contexts {
* ____
* </pre>
*/
- public static final String CONTEXT_QUOTE = ":quote";
+ public static final String QUOTE = ":quote";
/**
* Predefined constant for making a Processor work on passthrough blocks.
@@ -125,7 +125,7 @@ public @interface Contexts {
* ++++
* </pre>
*/
- public static final String CONTEXT_PASS = ":pass";
+ public static final String PASS = ":pass";
/**
* Predefined constant for making a Processor work on paragraph blocks.
@@ -137,7 +137,7 @@ public @interface Contexts {
* And don't process this.
* </pre>
*/
- public static final String CONTEXT_PARAGRAPH = ":paragraph";
+ public static final String PARAGRAPH = ":paragraph";
String[] value();

MODIFY
asciidoctorj-core/src/test/groovy/org/asciidoctor/extension/AnnotatedBlockProcessor.groovy
asciidoctorj-core/src/test/groovy/org/asciidoctor/extension/AnnotatedBlockProcessor.groovy
@@ -6,7 +6,7 @@ import org.asciidoctor.ast.StructuralNode
@CompileStatic
@Name('yell')
-@Contexts([Contexts.CONTEXT_LISTING, Contexts.CONTEXT_OPEN])
+@Contexts([Contexts.LISTING, Contexts.OPEN])
@ContentModel(ContentModel.SIMPLE)
@DefaultAttributes([
@DefaultAttribute(key = 'key', value = 'value')

MODIFY
asciidoctorj-core/src/test/groovy/org/asciidoctor/extension/AttributeCheckingBlockProcessor.groovy
asciidoctorj-core/src/test/groovy/org/asciidoctor/extension/AttributeCheckingBlockProcessor.groovy
@@ -2,7 +2,7 @@ package org.asciidoctor.extension
import org.asciidoctor.ast.StructuralNode
-@Contexts([Contexts.CONTEXT_PARAGRAPH])
+@Contexts([Contexts.PARAGRAPH])
@Name('checkattributes')
class AttributeCheckingBlockProcessor extends BlockProcessor {

MODIFY
asciidoctorj-core/src/test/groovy/org/asciidoctor/extension/WhenABlockProcessorCreatesABlockThatATreeProcessorVisits.groovy
asciidoctorj-core/src/test/groovy/org/asciidoctor/extension/WhenABlockProcessorCreatesABlockThatATreeProcessorVisits.groovy
@@ -17,7 +17,7 @@ import spock.lang.Specification
class WhenABlockProcessorCreatesABlockThatATreeProcessorVisits extends Specification {
@Name('tst')
- @Contexts(Contexts.CONTEXT_OPEN)
+ @Contexts(Contexts.OPEN)
@ContentModel(ContentModel.COMPOUND)
static class BlockCreator extends BlockProcessor {

MODIFY
asciidoctorj-core/src/test/groovy/org/asciidoctor/extension/WhenAJavaExtensionUsesCounters.groovy
asciidoctorj-core/src/test/groovy/org/asciidoctor/extension/WhenAJavaExtensionUsesCounters.groovy
@@ -121,7 +121,7 @@ testmacro::countera[]
@CompileStatic
@Name('testmacro')
- @Contexts(Contexts.CONTEXT_PARAGRAPH)
+ @Contexts(Contexts.PARAGRAPH)
@ContentModel(SIMPLE)
static class TestBlockMacroProcessor extends BlockMacroProcessor {
@@ -138,7 +138,7 @@ testmacro::countera[]
@CompileStatic
@Name('testmacro')
- @Contexts(Contexts.CONTEXT_PARAGRAPH)
+ @Contexts(Contexts.PARAGRAPH)
@ContentModel(SIMPLE)
static class TestBlockMacroWithInitialCounterProcessor extends BlockMacroProcessor {

MODIFY
asciidoctorj-documentation/src/test/java/org/asciidoctor/integrationguide/extension/YellBlockProcessor.java
asciidoctorj-documentation/src/test/java/org/asciidoctor/integrationguide/extension/YellBlockProcessor.java
@@ -11,7 +11,7 @@ import java.util.Map;
//tag::include[]
@Name("yell") // <1>
-@Contexts({Contexts.CONTEXT_PARAGRAPH}) // <2>
+@Contexts({Contexts.PARAGRAPH}) // <2>
@ContentModel(ContentModel.SIMPLE) // <3>
public class YellBlockProcessor extends BlockProcessor { // <4>

Fix #569 Remove leading CONTEXT prefix from all constants in @Contexts (#571)