{"id":820,"date":"2012-12-07T20:10:02","date_gmt":"2012-12-07T18:10:02","guid":{"rendered":"http:\/\/blog.wenzlaff.de\/?p=820"},"modified":"2021-11-22T17:16:34","modified_gmt":"2021-11-22T16:16:34","slug":"quick-howto-fuer-die-coole-java-template-erstellung-mit-commenttemplate-ldt-javamagazin-1-2013","status":"publish","type":"post","link":"http:\/\/blog.wenzlaff.de\/?p=820","title":{"rendered":"Quick-Howto f\u00fcr die Coole Java Template-Erstellung (JaMoPP) mit CommentTemplate  ldt. JavaMagazin 1-2013"},"content":{"rendered":"<p>Oder was ist JaMoPP? Damit es auch unter Eclipse Kepler SR1 l\u00e4uft (<strong>Update<\/strong>: l\u00e4uft auch unter <a href=\"http:\/\/blog.wenzlaff.de\/?p=3603\" title=\"luna\" target=\"_blank\" rel=\"noopener\">Eclipse Luna 4.4.0<\/a> und Eclipse Mars 4.5.0), zuerst \u00fcber Eclipse Marketplace den CommentTemplate 0.9.2 installieren:<br \/>\n<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2012\/12\/Bildschirmfoto-2014-05-01-um-21.17.45.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2012\/12\/Bildschirmfoto-2014-05-01-um-21.17.45.png\" alt=\"Bildschirmfoto 2014-05-01 um 21.17.45\" width=\"580\" height=\"528\" class=\"aligncenter size-full wp-image-3235\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2012\/12\/Bildschirmfoto-2014-05-01-um-21.17.45.png 580w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2012\/12\/Bildschirmfoto-2014-05-01-um-21.17.45-300x273.png 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><br \/>\nDann diesen Beispiel Code ausf\u00fchren:<br \/>\n<code><br \/>\npackage de.wenzlaff;<\/p>\n<p>import java.util.Date;<\/p>\n<p>import de.devboost.commenttemplate.CommentTemplate;<\/p>\n<p>\/**<br \/>\n * 1. Installieren \u00fcber Eclipse Update oder Marketplace (suchen nach CommentTemplate)<br \/>\n * 2. New PlugIn Projekt<br \/>\n * 3. Add new Dependencies de.devboost.commenttemplate-Version.jar<br \/>\n * 4. Klasse mit Extension Source.java erstellen<br \/>\n * 5. Annotation @CommentTemplate an String Methode mit return null<br \/>\n * 6. JavaDoc Formatierung in Eclipse f\u00fcr das Projekt ausschalten<br \/>\n * 7. Save erzeugt in src-gen-comment-template die generierte Klasse<br \/>\n * 8. Run as<br \/>\n *<br \/>\n * Beispiel Video: <a href=\"http:\/\/jamopp.org\/index.php\/JaMoPP_CommentTemplate\" title=\"http:\/\/jamopp.org\/index.php\/JaMoPP_CommentTemplate\">http:\/\/jamopp.org\/index.php\/JaMoPP_CommentTemplate<\/a><br \/>\n * Anleitung: <a href=\"http:\/\/reuseware.org\/publications\/2012_ACME_CommentTemplate.pdf\" title=\"http:\/\/reuseware.org\/publications\/2012_ACME_CommentTemplate.pdf\">http:\/\/reuseware.org\/publications\/2012_ACME_CommentTemplate.pdf<\/a><br \/>\n *\/<br \/>\n<!--more--><br \/>\npublic class HalloWeltSource {<\/p>\n<p>\t@CommentTemplate<br \/>\n\t@SuppressWarnings(\"unused\")<br \/>\n\tpublic static String getTemplate() {<\/p>\n<p>\t\tString datum = new Date(System.currentTimeMillis()).toString();<br \/>\n\t\tString vorname = \"Thomas\";<br \/>\n\t\tString wasNoch = \"was Noch zu sagen ist.\";<br \/>\n\t\t\/*<br \/>\n\t\t Hallo vorname Wenzlaff und wasNoch<br \/>\n\t\t Ok, das aktuelle Datum lautet: <\/p>\n<p>\t\t datum<br \/>\n\t\t*\/<\/p>\n<p>\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tString count = \"\" + i;\n\t\t\t\/* \t\t<br \/>Ausgabe: count<br \/>\n\t\t\t *\/<br \/>\n\t\t}<br \/>\n\t\treturn null;<br \/>\n\t}<\/p>\n<p>\tpublic static void main(String[] args) {<br \/>\n\t\tSystem.out.println(HalloWelt.getTemplate());<br \/>\n\t}<\/p>\n<p>}<br \/>\n<\/code><br \/>\n<strong>Ausgabe<\/strong>:<\/p>\n<p><code><br \/>\n Hallo Thomas Wenzlaff und was Noch zu sagen ist.<br \/>\n Ok, das aktuelle Datum lautet: <\/p>\n<p> Fri Dec 07 18:59:02 CET 2012<br \/>\n \t\t<br \/>Ausgabe: 0<br \/>\n  \t\t<br \/>Ausgabe: 1<br \/>\n  \t\t<br \/>Ausgabe: 2<br \/>\n  \t\t<br \/>Ausgabe: 3<br \/>\n  \t\t<br \/>Ausgabe: 4<br \/>\n <\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oder was ist JaMoPP? Damit es auch unter Eclipse Kepler SR1 l\u00e4uft (Update: l\u00e4uft auch unter Eclipse Luna 4.4.0 und Eclipse Mars 4.5.0), zuerst \u00fcber Eclipse Marketplace den CommentTemplate 0.9.2 installieren: Dann diesen Beispiel Code ausf\u00fchren: package de.wenzlaff; import java.util.Date; import de.devboost.commenttemplate.CommentTemplate; \/** * 1. Installieren \u00fcber Eclipse Update oder Marketplace (suchen nach CommentTemplate) * &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/blog.wenzlaff.de\/?p=820\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eQuick-Howto f\u00fcr die Coole Java Template-Erstellung (JaMoPP) mit CommentTemplate  ldt. JavaMagazin 1-2013\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,210,1361,79],"tags":[396,397,395,293,394],"class_list":["post-820","post","type-post","status-publish","format-standard","hentry","category-eclipse","category-java","category-java-7","category-java-8","category-programmierung","tag-comment-template","tag-java-magazin","tag-java-template","tag-plugin","tag-template"],"_links":{"self":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=820"}],"version-history":[{"count":0,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/820\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=820"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}