You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@codehaus.org> on 2010/04/26 23:20:12 UTC
[jira] Commented: (DOXIA-387) Add RandomAccessSink
[ http://jira.codehaus.org/browse/DOXIA-387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219013#action_219013 ]
Robert Scholte commented on DOXIA-387:
--------------------------------------
Hmm, tried to write some tests, where I'd like to use the SinkAdapter. But that class seems to be part of the doxia-core, so that would result in a circular dependency. The RandomAccessSink itself only uses Sink and SinkFactory, no specific implementation so the Sink API looked like a valid location. Should I move this patch or just use an anonymous implementation classes for the tests?
> Add RandomAccessSink
> --------------------
>
> Key: DOXIA-387
> URL: http://jira.codehaus.org/browse/DOXIA-387
> Project: Maven Doxia
> Issue Type: New Feature
> Components: Sink API
> Affects Versions: 1.1.2
> Reporter: Robert Scholte
> Priority: Minor
> Attachments: randomaccesssink.patch
>
>
> In some cases components have to write to different parts of a page. With the current implementation you can only keep appending the page.
> I've attached a new class, with which it should be possible to add subsinks to which you can write at any time.
> Code might look like this
> {code}
> baseSink.text("Hello World");
> Sink top = baseSink.addSink();
> baseSink.horizontalRule();
> Sink content = baseSink.addSink();
> baseSink.text("So long, farewell");
> {code}
> After flushing the basesink, subsinks will flush to the basesink.
> Closing the basesink will close al subsinks as well.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira