On Nov 17, 2009, at 7:16 PM, Thomas Mortagne wrote:

> Hi devs,
>
> Currently it's not possible to list support BlockRenderer syntaxes
> like we do for Parser for example.
>
> So i propose to add
> Syntax getSyntax();
> to BlockRenderer interface
>
> Here is my +1

I'm hesitating. Shouldn't we have getSyntax() in the Renderer  
interface then?

If we add it to BlockRenderer, I'd like to see it in Renderer and to  
remove it from PrintRendererFactory.

<stupid question>
I don't recall why we need this getSyntax() method. Since the user  
will have to look up the component using a hint, he already knows the  
syntax for the BlockRenderer. Are there cases where we return a  
BlockRenderer from an api call and we need to know its syntax? If all  
we want is to know all syntaxes, then we just need to do a lookupMap  
and get the key list...
</stupid question>

<thinking aloud>
We could potentially have a common interface between BlockRenderer and  
Renderer since they're both renderers. However that interface would  
only have the getSyntax() method which is too poor for a functional  
interface.... Hmmm... Actually could this mean that the Renderer name  
is a bad name... I think we could remove the current Renderer  
interface and rename PrintRenderer by PrintListener. Thus the user  
would use either a PrintListenerFactory or a BlockRenderer.
</thinking aloud>

WDYT?

Thanks
-Vincent

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to