SvgViewer not working on OS X?

Anyone able to use the SVG viewer plugin on Mac OS X? When I try to view the image for an SVG file, I get the following error message:



I assume the name "Users" is coming from the full path to the SVG file I am trying to view (/Users/tdean/...)

0
6 comments

not sure I got this exception - but I was never able to view a PNG with it.

0

I've put a version of SvgViewer on the wiki at http://www.intellij.org/twiki/pub/Main/SvgViewer/SvgViewer.jar with some debug logging.

When you have time could you...
1. download it into your ~/.IntelliJIdea/config/plugins/SvgViewer/lib directory,
2. update your /idea/bin/log.xml to contain:

   ]]>

3. restart idea,
4. open an svg document (giving you the error),
5. exit idea and
6. edit the idea system log (~/.IntelliJIdea/system/log/idea.log) looking for


7. post the result here (or email me)

0

OK, here's the results I see in the log file:

0

hmmmm...this is weird. com.intellij.openapi.vfs.VirtualFile.getURL() on Windows returns


...but on OS X returns

...and in any case Apache Batik expects


I've done another hack to keep Batik happy:
http://www.intellij.org/twiki/pub/Main/SvgViewer/SvgViewer.jar

Does this fix it?

0

I've done some more testing (on Win2000). In summary...
On Win2000, VirtualFile.getUrl() returns:

...where d: is a drive letter. According to http://www.faqs.org/rfcs/rfc1738.html there should be a hostname or null where the drive letter is.

On OS X it returns

...which RFC1738 says is the correct format for a file URL. A null hostname means "localhost".


...Apache Batik accepts either the non-standard:

or the RFC1738 format (with a null hostname):

or this RFC1738-compliant format (on Win2000):

but chokes (trying to connect to hostname "d:") on:

and (trying to connect to hostname "foo"):


I've hacked SvgViewer to pass RFC1738 form URLs unchanged to Batik, and to convert "file://d:/foo/bar" to "file:///d:/foo/bar".

0

That seems to have fixed it - Thanks!

0

Please sign in to leave a comment.