vmassol (SVN) wrote:
Author: vmassol
Date: 2008-09-02 12:18:10 +0200 (Tue, 02 Sep 2008)
New Revision: 12357
Added:
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/block/AbstractVerbatimBlock.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/block/InlineVerbatimBlock.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/block/StandaloneVerbatimBlock.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/block/VerbatimBlock.java
platform/core/trunk/xwiki-rendering/src/test/resources/verbatim/
platform/core/trunk/xwiki-rendering/src/test/resources/verbatim/verbatim1.test
platform/core/trunk/xwiki-rendering/src/test/resources/verbatim/verbatim2.test
platform/core/trunk/xwiki-rendering/src/test/resources/verbatim/verbatim3.test
Removed:
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/internal/macro/nowiki/
platform/core/trunk/xwiki-rendering/src/test/resources/macros/macronowiki.test
Modified:
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/block/EscapeBlock.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/internal/parser/doxia/DoxiaGeneratorListener.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/internal/parser/wikimodel/WikiModelGeneratorListener.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/internal/parser/wikimodel/XDOMGeneratorListener.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/listener/Listener.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/listener/ListenerDelegate.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/renderer/EventsRenderer.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/renderer/XWikiSyntaxRenderer.java
platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/renderer/xhtml/XHTMLRenderer.java
platform/core/trunk/xwiki-rendering/src/main/resources/META-INF/plexus/components.xml
platform/core/trunk/xwiki-rendering/src/test/java/org/xwiki/rendering/RenderingTests.java
Log:
XWIKI-2634: Various tasks for the new rendering implementation
* Added support for verbatim.
* Removed nowiki macro which is no longer necessary
I'm starting to dislike the way renderers are done. They have many
methods to handle each type of element, the renderer classes are already
becoming large, and introducing a new element requires changing many
classes. Isn't there a better way to do this?
One would be to have just an onEvent method, and then the XYZRenderer
would forward the call to a specific class responsible for handling that
type of event. The downside is that we'll have many small classes and
large configuration files, but the advantage is that unimplemented
elements won't throw exceptions, but use a generic event handler.
I don't know which way is better, fewer huge classes, or more tiny
classes. If the syntax will become *very* stable soon, then I guess the
current way is good, too.
IMHO.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/