Showing posts with label x2svg. Show all posts
Showing posts with label x2svg. Show all posts

Friday, May 15, 2009

Nominate x2svg for Sourceforge awards

Just click here:

Sunday, December 14, 2008

x2svg updated to use fop 0.95 final

I have updated x2svg to compile against fop 0.95 final.
There is no new binary release yet, as I wanted to look into some other issues first.

If you are running the source, you can just do a svn update to get this minor change.

Let me know if you encounter issues.

Friday, November 14, 2008

X2svg: how to create diagrams (in the XSD parser)?

For some simple stuff it is easy to create diagrams with x2svg - here is an example from the test suite:

$ sh run.sh -c :pdf test-src/resources/sample.xsd root


This creates a PDF version of sample.xsd along with a SVG one (technically speaking, it creates a SVG version and converts it to PDF afterwards), where the root of the tree is the element root. There are no limits, so the whole tree with all its children is shown.

sample.png


But how to tackle more complex things?

The XSD-Parser has some options that we will have a look at:


  • -d n: this limits the depth of the tree to n, where a depth of 0 means the root element only and 1 means one level of children:


    sample1.png


  • -st : This option tells the parser that the given root element is not an element, but a type.

  • -lt : If this element is given, then elements of an given type are not filled with the content of the type, but the type name is specified:


    $ sh run.sh -c :png test-src/resources/inheritance.xsd parent-type -lt

    inheritance-lt.png


    Note, that there is currently a little display bug.



Those options allow you to create already good quality structural content from your schema files - see e.g. Part 2 and Part 4 of my RHQ plugin development series.

Tuesday, July 29, 2008

Netbeans: where is the servlet-api?

I am currently writing a sample servlet for x2svg. And I am also trying to use NetBeans for it (as you probably remember, I am normally using Eclipse for my daily work). Actually I even downloaded 6.5M1 as Adam Bien sounded enthusiastic about it (and the editor really feels somewhat snappier than the 6.1 one).

To be able to include javax.servlet.* I need the servlet-api.
So I went to Tools->Libraries and expected it to be there. I have downloaded the EE edition of NetBeans, that should have it, but I just can't find it. There are tons of stuff like JSF libs etc. that all depend on it in some way, but I can't just pull in the basic servlet api.

For now I ended up with including the external servlet-api jar from tomcat, but this can't be the real solution.

What am I doing wrong? Where is the servlet-api in the NetBeans distribution?

Sunday, July 13, 2008

x2svg 1.2.1 released


I have just released version 1.2.1 of x2svg, a tool to render input graphs as svg and to convert the created SVG (actually any SVG) into other formats like PNG or PDF.

This release consists of two changes relative to the previous one:
  • Lines have shadows now

  • Fixed a bug, where straight lines had 'steps' in them


As usual, you can download the release from sourceforge.

Thursday, July 10, 2008

RHQ and x2svg on ohloh

RHQ and x2svg have lately been added to the list of projects on ohloh.net - if you are a user of said software, please consider passing at ohloh and to click on the "I use this" button.

Direct links to the projects:


Unfortunately, Ohloh can't know that we already were working on RHQ before open sourcing it in February 2008, so it thinks its history is still relatively short.

Sunday, May 18, 2008

OS X Gui package added to x2svg

For all of us OS X guys, it is always somewhat lame when the favorite app doesn't live in /Applications and can't just be double clicked (Ok, I admit, I love OS X because of its command line and its Unix internals).

So I just created an application bundle of the gui version of x2svg and uploaded it to SourceForge.

Just open the disk image and double click on x2svg.app

Enjoy :-)

Forums enabled for x2svg

I have enabled the forums fuctionality for x2svg in the hope for feedback from the community.

While this is not (yet) the top downloaded project at SourceForge, there are users out there and are using the program - I want to hear from you!

And in case you have missed it - Version 1.2 has been released with a lot of new functionality and fixes over previous versions.
Check the changelog at http://x2svg.sourceforge.net/changes.html.

Tuesday, May 13, 2008

x2svg new release x2svg-1.2

Project x2svg just released the final 1.2 version.



Changes in release 1.2 since the last beta are:

  • Pass debug flag to the parsers.

  • Add the possibility in the GUI to pass parser specific options to
    the parser (SF fr#1956587).

  • Allow parsing of attributes and element comments. It depends on the
    individual parser if this is supported (SF FR#1940442). As this is still
    somewhat experimental, it is turned off by default.

  • Pull ant.lib into lib/, so the IDE can use this one.

  • Allow parsing of types in the XSD parser (SF FR#1947079).

  • Lot of cleanup and smaller fixes.



Browse the full changelog to see all changes in earlier versions.

You can download it from Sourceforge

Please provide feeback:


Help is always welcome.





Sunday, April 27, 2008

x2svg new release 1.2beta3

Project x2svg just released a new version.



Changes in release 1.2beta3 are:

  • Updated the libraries on the scripts to match the libraries introduced in 1.2-beta2 (SF bug#1944294).

  • Added the possibility to the XSD parser to just show references to substitutonGroups, but not the whole
    substituted group (SF fr#1769065).

  • Added the possibility to limit the depth of the parsed tree of the XSD Parser

  • It is now possible to get the parser specific help on the command line and to list modes and suffixes (SG
    bug#1950350)

  • Fix errors with options without argument and NPE without input file (SF bug#1951088).



You can download it from Sourceforge

Please provide feeback:

Monday, April 21, 2008

Testing NetBeans (coming from Eclipse)

Inspired by Adam Bien's praise on NetBeans and its Maven support, I was looking at NetBeans again.
NetBeans basically was my first Java IDE, but somehow I never got infected by it and switched to Eclipse relatively soon thereafter.

I downloaded NetBeans 6.0.1 for Mac OS X from the website and started ..

First a little test



So I first tried to import a simple Eclipse project like x2svg with the "Open Project..." and "from existing build file" option, but this wasn't really as I wanted it. Ok, back to the dialog and searching for "from Eclipse project" - nothing. A quick search in help showed that I first have to download and install the respective plugin. That was quick and this time the import worked well.

The next thing that I changed was the key bindings. I am so used to the Eclipse ones, that I don't want to learn new ones. This was equally simple. Just go to preferences and the key bindings section, then choose Eclipse from the drop down. Done (Note to Mac users: Save is on Ctrl-S in that binding, but can be easily changed).

One drawbacks for me is that run/debug options have not been transferred (I am currently trying to improve the XSD parser and have a longish command line).

One irritating thing is that it seemed like the SVN settings also have not been imported. But it turned out that as soon as I specified the location of the svn executable (actually SVN_HOME is the directory where it resides in), svn integration worked as supposed. Interestingly, as I have three source trees in the project, NetBeans is connecting three times to the svn server, while Eclipse uses one connection only on a svn up.

Another thing that is irritating (but which I find a good think after I know what is going on) is the fact that NetBeans is storing its information in a separate folder in the filesystem and uses this folder as default root directory when running an executable, which will make some tests fail. But the I am very happy, that it doesn't just write stuff in my existing project that I would need to remove later.

When I tried to open my two GUI files, I received a (well known) NPE both times - actually I was hoping to get some sort of visual Swing editor instead. The website that took my error report told me that this is probably already resolved and that I should download the latest NB 6.1 milestone (RC2 in my case).

Updating to 6.1 RC 2



The update was painless, and installed a new version next to the 6.0 one in /Applications/NetBeans. Having seen this, I did not expect the plugins that I installed earlier to be present - and I was right.

The NPE was gone too, but I still have no GUI editor - perhaps because NB is just not able to parse GUI elements that were not created using NB?

But from that little test I have to say that I like it much more than when I was looking at it the last time. Now lets go on to something heavier.

Testing with a mavenized project



In RHQ we are using maven a lot. So the next test is to see if the maven support is really as good as Adam is saying.

Checkout from http://svn.rhq-project.org/repos/rhq was painless and NetBeans was asking what project I want to open. I've chosen the root and it now showed me a structure of maven poms, that I could open as project afterwards. This again is very different from how Eclipse is handling things (I mean, RHQ is one project with a bunch of modules). But ok, that import was painless as well.
And then: a build from within NetBeans fails because of some wrong maven version. But this is not fatal for me, as I am used to build from the command line anyway.

Speed



In total NB doesn't feel slow, but with RHQ, auto completion is slower than in Eclipse, the "member view" is slower than the Outline view and the fan of my MacBook is much more active. I can imagine that this comes from the usage of the mavenized project. I will try to import this as Eclipse project as well to see if that changes things to the better.

My friend, the problem view



Eclipse has a problem view that just works. Period. IntelliJ 6 had its issues with it. And now I am finding basically the same in NB 6.1. Perhaps I am missing something obvious - dunno. I have already enabled the "track java dependencies" setting:



(I am not even sure if this setting is supposed to do what I want it to do).

In x2svg I have three source trees src, gui-src and test-src. When I now e.g. rename a method in src (by hand, not via re-factoring), only the errors in the src tree show in the project explorer and in the task list. Even when I have a file from gui-src open and the editor shows the error for that file, it doesn't appear in the task list nor the projects explorer.



When I switch back to the other file, the error will eventually show.

When I then fix the issue in src/ , the error will still show up for the file(s) in gui-src/.

Profiler



Just to mention that as a big plus for NetBeans: it comes with a built in profiler. I don't know how much I'll look at it or even use it, as we are using jProfiler in RHQ, but nevertheless this is a big plus.



Conclusion



NetBeans has gained a lot since I was last looking at it and the Maven integration is really so much better than in Eclipse, which saves me from the pain to always update the .classpath file when we pull in a different library version.

I will keep an eye on NB in the upcoming weeks to see if it could be an alternative to what I now have with Eclispe. But the issue with the problem view / task list, that I mentioned, really is close to a show stopper for me. Perhaps it will just be fixed in NB 6.1 GA.