On Monday, September 5, 2011 9:05:37 AM UTC-6, Jason Morrison wrote:
>
> Thanks, Lex. I worked a bit more on this today, and found that I just
> wasn't using named attributes correctly. Once I switched to specifying all
> attributes, positionally, it worked great. (Asciidoc 8.6.5 on OSX
> installed via homebrew, btw)
>
>
Btw, there is another implementation of this idea by the Neo4j project
called "snippet", documented here [1] for reference. I think this is a
great feature to add to include.
[snippet,java]
----
component=neo4j-examples
source=org/neo4j/examples/JmxTest.java
classifier=test-sources
tag=getStartTime
----
renders as
private static Date getStartTimeFromManagementBean(
GraphDatabaseService graphDbService )
{
GraphDatabaseAPI graphDb = (GraphDatabaseAPI) graphDbService;
Kernel kernel = graphDb.getDependencyResolver().resolveDependency(
JmxKernelExtension.class )
.getSingleManagementBean( Kernel.class );
Date startTime = kernel.getKernelStartTime();
return startTime;
}
Their test suite can also produce AsciiDoc documentation as it runs, which
is pretty cool. That sort of flips the problem on its head, push rather
than pull.
https://github.com/neo4j/community/blob/1.9.M01/embedded-examples/src/test/java/org/neo4j/examples/DocumentationTest.java
-Dan
[1] http://docs.neo4j.org/chunked/milestone/community-docs.html
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/asciidoc/-/Ndf7ZLZkcwEJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.