Tags

, , ,

 

I’ve started to use Oracle’s JDeveloper more and more, not just because I’m working with the AIA (Application Integration Architecture) Foundation Pack but also as an XSD Editor for designing interface definitions.

I’ve spent sometime trying to find a solution that can compete with XML Spy but without the huge price tag.  I’ve tried OxygenXML, Eclipse, Visual Studio among others and concluded that its very good for a free tool. Perhaps still not as good as XMLSpy – but thats the difference between an IDE and a dedicated XSD/XML tool.

image JDeveloper design view- with a lot of similarities to XMLSpy in presentation

You might think, that to use JDeveloper I have to commit to using the Oracle technology stack (and the big price tag that comes with), but this isn’t the case.

Not to mention Oracle have very much caught up with the Open Source World of Maven, there is a growing library of plugins both Official and Open Source covering a plethora of things from JUnit integration to Python & Groovy language  syntaxes.

One of the nice things with XMLSpy and VisualStudio is the ability to copy into other documents the pretty formatted text (colour coded syntax etc) – making schemas or code fragments easier to look at in a document.  However out of the box JDeveloper doesn’t do this out of the box. But it would seem that this capability wasn’t just wanted by me, so an extension has been written Chris Hughes that solves this problem called jdev-copyashtml.


<?xmlversion="1.0"encoding="ISO-8859-1"?><xs:schemaxmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:elementname="shiporder"><xs:complexType><xs:sequence><xs:elementname="orderperson"type="xs:string"/><xs:elementname="shipto"><xs:complexType><xs:sequence><xs:elementname="name"type="xs:string"/><xs:elementname="address"type="xs:string"/><xs:elementname="city"type="xs:string"/><xs:elementname="country"type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:elementname="item"maxOccurs="unbounded"><xs:complexType><xs:sequence><xs:elementname="title"type="xs:string"/><xs:elementname="note"type="xs:string"minOccurs="0"/><xs:elementname="quantity"type="xs:positiveInteger"/><xs:elementname="price"type="xs:decimal"/></xs:sequence></xs:complexType></xs:element></xs:sequence><xs:attributename="orderid"type="xs:string"use="required"/></xs:complexType></xs:element></xs:schema>

 

Once downloaded go to Help –> Check for Updates and step through so you can then choose your download – as shown.

image

Once installed you’ll need to restart JDeveloper.  To then configure to plugin to work as you want go to Tools –> Preferences… Where you should be able to find Copy As HTML/RTF in the left menu tree to get the options to configure the plugin behaviour.

image

If you’re going from Windows application to another then you want the Rich Text Format setting.  After that rather than Ctrl+C its Ctrl+H to copy and carry the pretty formatting/colours etc.