{"id":91,"date":"2012-06-27T16:06:00","date_gmt":"2012-06-27T14:06:00","guid":{"rendered":"http:\/\/marko-seifert.de\/blog\/?p=91"},"modified":"2020-01-15T12:23:37","modified_gmt":"2020-01-15T10:23:37","slug":"detail-formater-besser-debuggen-in-eclipse","status":"publish","type":"post","link":"http:\/\/marko-seifert.de\/blog\/?p=91","title":{"rendered":"Detail Formater \u2013 besser debuggen in Eclipse"},"content":{"rendered":"<p>Wer kennt das nicht? Man debuggt \u00a0sich Zeile f\u00fcr Zeile durch den Code um Fehler in komplexen Algorithmen zu finden.<\/p>\n<p>Das Auslesen von primitiven Datentypen oder Strings klappt ziemlich gut. Wenig hilfreich ist allerdings die Darstellung von Kalenderobjekten.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/debug.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-92\" title=\"debug\" src=\"http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/debug.png\" alt=\"\" width=\"693\" height=\"273\" srcset=\"http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/debug.png 693w, http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/debug-300x118.png 300w, http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/debug-500x196.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<p>Mit Hilfe der in Eclipse angebotenen DetailFormater lassen sich Objekte im Debug-Modus beliebig formatieren. F\u00fcr ein Objekt vom Typ \u201c<code>java.util.GregorianCalendar<\/code>\u201d k\u00f6nnte die Formatierung folgenderma\u00dfen aussehen: <code>this.getTime().toString();<\/code><\/p>\n<p>Ergebnis: <code>Fri Jul 17 22:46:07 CEST 2009<\/code><\/p>\n<p>Diese Darstellung ist dann schon deutlich lesbarer.<br \/>\nAuch f\u00fcr komplexere Datenstrukturen k\u00f6nnte es hilfreich sein, die wichtigen Informationen auf einem Blick zu sehen.<\/p>\n<p><strong>So funktioniert es<\/strong><\/p>\n<p><a href=\"http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-93\" title=\"settings\" src=\"http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/settings.png\" alt=\"\" width=\"628\" height=\"527\" srcset=\"http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/settings.png 628w, http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/settings-300x251.png 300w, http:\/\/marko-seifert.de\/blog\/wp-content\/uploads\/2012\/06\/settings-357x300.png 357w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>Einstellungsdialog \u00f6ffnen (Men\u00fc \u201cWindows\/Preferences\u201d Pfad \u201cJava\/Debug\/Detail Formaters\u201d)<\/li>\n<li>Button \u201cAdd\u201d klicken<\/li>\n<li>Eintragen von <code>java.util.Calendar<\/code> in das Feld \u201cQualified type name\u201d field<\/li>\n<li>Eintragen von <code>Enter this.getTime().toString()<\/code><\/li>\n<li>Button \u201cOK\u201d klicken<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Wer kennt das nicht? Man debuggt \u00a0sich Zeile f\u00fcr Zeile durch den Code um Fehler in komplexen Algorithmen zu finden. Das Auslesen von primitiven Datentypen oder Strings klappt ziemlich gut. Wenig hilfreich ist allerdings die Darstellung von Kalenderobjekten. &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,13],"tags":[33,34,35,6],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-development","category-tools","tag-debugger","tag-eclipse","tag-ide","tag-java"],"_links":{"self":[{"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=91"}],"version-history":[{"count":3,"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":168,"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions\/168"}],"wp:attachment":[{"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/marko-seifert.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}