<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>JMatter Blog: IntelliJ IDEA Support</title>
    <link>http://jmatter.org/articles/2006/07/13/intellij-idea-support</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Simplify</description>
    <item>
      <title>IntelliJ IDEA Support</title>
      <description>&lt;p&gt;Sam Griffith proposed on the jMatter mailing list (a couple of weeks ago) the construction of a jMatter application for the construction of jMatter applications.&lt;/p&gt;

&lt;p&gt;I can imagine how one might simply instantiate a few instances of "Entity" in a GUI, specify field names, and other meta-information, and then layer behaviour on top of it, namely: "Generate Source Code."&lt;/p&gt;

&lt;p&gt;This is a worthy goal.  In fact, I clearly recall once seeing screenshots of an application built by Rick Mugridge for NakedObjects called "Emperor" (although as far as I know, this application was never made accessible to a wider audience).&lt;/p&gt;

&lt;p&gt;We will get there.  But in the meantime, I thought I'd post a few simple IntelliJ IDEA live templates for jMatter that I recently put together.  This is nothing fancy, but it's a small, first step.&lt;/p&gt;

&lt;p&gt;The xml file, &lt;a href="/tooling/jmatter.xml"&gt;jmatter.xml&lt;/a&gt;, can be dropped into the &lt;code&gt;config/templates/&lt;/code&gt; directory of your user configuration area.  On linux, the full path is &lt;code&gt;~/.IntelliJIdea50/config/templates/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, for example, if you've defined a class named &lt;code&gt;Talk&lt;/code&gt; and a many to one association to a &lt;code&gt;Speaker&lt;/code&gt; via a field named &lt;code&gt;spk&lt;/code&gt;, instead of hand-coding the JavaBeans bound property's getter and setter methods, you can instead type:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    bprop[tab]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and fill in the two arguments:  &lt;code&gt;spk[tab]&lt;/code&gt; and &lt;code&gt;Speaker[tab]&lt;/code&gt; and you're basically done.&lt;/p&gt;

&lt;p&gt;I've defined a little over a dozen such simple live timeplates (fo for fieldOrder, cc for ColorCode, cmd for defining a command method, etc..&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jul 2006 15:54:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:05b2ad4ac9c237cf2cad3717d45797c6</guid>
      <author>Eitan Suez</author>
      <link>http://jmatter.org/articles/2006/07/13/intellij-idea-support</link>
    </item>
    <item>
      <title>"IntelliJ IDEA Support" by eitan</title>
      <description>&lt;p&gt;createInstance() creates and initializes a new domain object programmatically.  It's equivalent to the New command on types.&lt;/p&gt;

&lt;p&gt;it not only instantiates the object in question but sets its initial state properly and performs initialization (if applicable).&lt;/p&gt;

&lt;p&gt;progammatically, in jmatter you should use createInstance() and not simply invoke a constructor.&lt;/p&gt;</description>
      <pubDate>Tue, 01 Aug 2006 19:04:39 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:</guid>
      <link>http://jmatter.org/articles/2006/07/13/intellij-idea-support#comment-5</link>
    </item>
    <item>
      <title>"IntelliJ IDEA Support" by Java Developer</title>
      <description>&lt;p&gt;What is the purpose of cri (create instance) code pattern? When should it be used?&lt;/p&gt;

&lt;p&gt;cheers&lt;/p&gt;</description>
      <pubDate>Fri, 14 Jul 2006 10:11:09 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:</guid>
      <link>http://jmatter.org/articles/2006/07/13/intellij-idea-support#comment-4</link>
    </item>
  </channel>
</rss>

