On Wed, Aug 10, 2011 at 1:15 PM, ant elder <antel...@apache.org> wrote:

> 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.
>

Ant, I'm still getting the SVG file not found exception. Here's the trace:

java.io.FileNotFoundException:
/media/798D-18B1/GSoC-2011/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/file:/tmp/tmp1022936089053255799.svg
(No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
    at
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
    at
org.apache.batik.util.ParsedURLData.openStreamInternal(ParsedURLData.java:547)
    at
org.apache.batik.util.ParsedURLData.openStream(ParsedURLData.java:471)
    at org.apache.batik.util.ParsedURL.openStream(ParsedURL.java:417)
    at
org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:158)
    at
org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(SAXSVGDocumentFactory.java:124)
    at
org.apache.batik.bridge.DocumentLoader.loadDocument(DocumentLoader.java:106)
    at
org.apache.batik.swing.svg.SVGDocumentLoader.run(SVGDocumentLoader.java:84)


>
> 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?
>

I changed it to "middle", but couldn't check whether there's an error still.


>
> 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.
>

Done! :)

Thanks.

>
>   ...ant
>



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Blog: http://nirmalfdo.blogspot.com/

Reply via email to