Hi Vincent,
I globally agree with a Syntax Registry concept.
Given the API you proposed on https://jira.xwiki.org/browse/XRENDERING-595?focusedCommentId=107408&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-107408
/**
* Automatically register one or several syntaxes into the Syntax Registry. The syntaxes will be registered when
* the implementing component is registered into the Component Manager.
*
* @since 12.10RC1
*/
@Unstable
@Role
public interface SyntaxRegistryInitializer
{
/**
* @return the list of syntaxes to register into the Syntax Registry
*/
List<Syntax> initialize();
}
I don’t really agree with calling this method initialize
since AFAIU it only returns the list of syntax to initialize: it does not perform the initialization itself.
You also said:
Note: We might also need a SyntaxTypeRegistry (not sure yet)
what would be the difference between SyntaxRegistry
and SyntaxTypeRegistry
?