{"id":9,"date":"2011-06-10T20:36:18","date_gmt":"2011-06-10T18:36:18","guid":{"rendered":"http:\/\/www.pellissier.co.za\/hermien\/?p=9"},"modified":"2013-02-10T09:09:18","modified_gmt":"2013-02-10T07:09:18","slug":"format-source","status":"publish","type":"post","link":"https:\/\/www.pellissier.co.za\/hermien\/?p=9","title":{"rendered":"Format Source"},"content":{"rendered":"<p>I guess I should have realised that starting a new blog on the 13th (even though it was not a Friday), might be a bad idea. \ud83d\ude42 Soon after the first post I experienced technical difficulties with the server. Today I finally got around to setting everything up again, so here is the first real post. \ud83d\ude42<\/p>\n<p>One of my favourite features of the NetBeans IDE is source formatting. With the press of a few buttons (Alt + Shift + F) (or Source | Format from the menu bar), you can convert a real mess&#8230;<\/p>\n<p>[java]package javaapplication1;public class JavaApplication1 {\/*** @param args the command line arguments*\/public static void main(String[] args) {System.out.println(&#8220;Hallo World!&#8221;);}}[\/java]<\/p>\n<p>into something a lot more readable&#8230;<\/p>\n<p>[java]package javaapplication1;<\/p>\n<p>public class JavaApplication1 {<\/p>\n<p>    \/**<br \/>\n     * @param args the command line arguments<br \/>\n     *\/<br \/>\n    public static void main(String[] args) {<br \/>\n        System.out.println(&#8220;Hallo World!&#8221;);<br \/>\n    }<br \/>\n}[\/java]<\/p>\n<p>The format is highly configurable, to suit the preferences of all developers. The settings can be accessed from Tools | Options, in the Editor category on the formatting tab.<\/p>\n<p>Source formatting is not limited to Java source code though &#8211; it works equally well for XML. For example, from<\/p>\n<p>[xml]<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><tag1><tag2><tag3><\/tag3><\/tag2><\/tag1><\/root>[\/xml]<\/p>\n<p>to<\/p>\n<p>[xml]<?xml version=\"1.0\" encoding=\"UTF-8\"?><br \/>\n<root><br \/>\n    <tag1><br \/>\n        <tag2><br \/>\n            <tag3><\/tag3><br \/>\n        <\/tag2><br \/>\n    <\/tag1><br \/>\n<\/root>[\/xml]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I guess I should have realised that starting a new blog on the 13th (even though it was not a Friday), might be a bad idea. \ud83d\ude42 Soon after the first post I experienced technical difficulties with the server. Today I finally got around to setting everything up again, so here is the first real &#8230; <a title=\"Format Source\" class=\"read-more\" href=\"https:\/\/www.pellissier.co.za\/hermien\/?p=9\" aria-label=\"More on Format Source\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[3,4],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1v8WL-9","_links":{"self":[{"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=\/wp\/v2\/posts\/9"}],"collection":[{"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":4,"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"predecessor-version":[{"id":686,"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions\/686"}],"wp:attachment":[{"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pellissier.co.za\/hermien\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}