On Tue, Aug 9, 2011 at 6:55 PM, Nirmal Fernando <nirmal070...@gmail.com> wrote: > Hi Ant, > > On Mon, Aug 8, 2011 at 1:58 PM, ant elder <ant.el...@gmail.com> wrote: >> >> Nirmal, I've just committed a module with a couple of classes that >> show how your SVG code could be used by the Tuscany Shell to draw SVG >> pictures of composites: >> >> >> https://svn.apache.org/repos/asf/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/ >> >> The code is pretty simple, just one Batik class copied from their >> examples to display an SVG with Swing, and one small class for the >> Tuscany Shell command. If you check that out and from its directory do >> "mvn tuscany:run" it will start the Tuscany Shell and you'll see in >> the help there is a new "draw command, and entering >> >> draw CompositeDiagramShellPlugin helloworld.composite >> >> it will try to display the SVG. That doesn't quite work as the >> EntityBuilder has a problem parsing the XML. Ideally it wouldn't have >> to parse the XML but would be able to work with the Tuscany Composite >> object directly. > > Thanks for the contribution ! :) > >> >> What do you think about adding another EntityBuilder impl that works >> with the Composite object? > > I added the support to the Tuscany composite object by adding > TuscanyCompositeEntityBuilder class: > https://svn.apache.org/repos/asf/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/TuscanyCompositeEntityBuilder.java > > And tried to run the shell command, but I think there's some problem with > the temp file which you are creating in "DrawShellCommand" class. >
Thanks Nirmal, thats looking good to me. I've updated DrawShellCommand to not use the intermediate file so it should be working now. I do get an error while its displaying the SVG but the image still seems to display ok - org.w3c.dom.DOMException: The "central" identifier is not a valid value for the "alignment-baseline" property. That comes from the code in CompositeArtifact.addElement and Layer.addElement setting the alignment-baseline attribute, i don't know what the issue is with that value does it mean anything to you? The diagrams always have the bit at the bottom for included composites even when there aren't any included, i think it might look better if DiagramGenerator.addInclusions() did nothing when there are no included composites. ...ant