<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>kaizen</title>
	<atom:link href="http://www.ostrogothia.com/process/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.ostrogothia.com/process</link>
	<description>On improvement of organizations</description>
	<lastBuildDate>Sun, 05 Sep 2010 20:57:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Some progress</title>
		<link>http://www.ostrogothia.com/process/?p=1518</link>
		<comments>http://www.ostrogothia.com/process/?p=1518#comments</comments>
		<pubDate>Sun, 05 Sep 2010 09:16:52 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1518</guid>
		<description><![CDATA[This guy could use some more weights and protein but is kind of handsome still. Having spent quite a bit of time on trial and error I finally gave up trying to manage with just the GMF modeling tools to get the kind of layout that I want. I typed in a search in Google [...]]]></description>
			<content:encoded><![CDATA[<table class="image" align="right" width="207">
<tr>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/09/custom_figure.png" alt="Custom figure" /></td>
</tr>
<tr>
<td class="caption">This guy could use some more weights and protein but is kind of handsome still.</td>
</tr>
</table>
<p>Having spent quite a bit of time on trial and error I finally gave up trying to manage with just the GMF modeling tools to get the kind of layout that I want. I typed in a search in Google that I seemed to have done before. I must have overlooked some results because now I found <a href="http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/msg16511.html" title="Custom figure">this very helpful post</a> that explained how to add a custom figure to the gallery. I cut and pasted the code and tweaked it a bit and see and behold, it did exactly what I expected (thanks Christian).</p>
<p>Having read the whole thread of the post referred to above, I realize that my woes with the unruly polygons are not unique and maybe somebody in the GMF community is already working on a solution.</p>
<p>Now that this &#8220;gate&#8221; is passed, I can proceed to the next step: to create a pretty-looking class diagram with <b>Roles</b>, <b>Items</b> (work products etc), and <b>Workflows</b>, just like my meta-model prescribes. And some relationships to boot. And then perhaps some code (HTML) generation before adding the rest of the classes from the meta-model.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1518</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Going meta</title>
		<link>http://www.ostrogothia.com/process/?p=1449</link>
		<comments>http://www.ostrogothia.com/process/?p=1449#comments</comments>
		<pubDate>Sun, 29 Aug 2010 08:26:39 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1449</guid>
		<description><![CDATA[Meta-meta-model pointing at itself. This post is admittedly a digression from the original intended kaizen theme of this blog. This thing has fascinated me since my college years though (ever since I read that book Gödel, Escher, Bach, compulsory for all nerds in the 80&#8242;s), and still does, so bear with me. Things referring to [...]]]></description>
			<content:encoded><![CDATA[<table class="image" align="right" width="566">
<tr>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/08/meta-meta.png" alt="Meta-meta" /></td>
</tr>
<tr>
<td class="caption">Meta-meta-model pointing at itself.</td>
</tr>
</table>
<p>This post is admittedly a digression from the original intended kaizen theme of this blog. This thing has fascinated me since my college years though (ever since I read that book Gödel, Escher, Bach, compulsory for all nerds in the 80&#8242;s), and still does, so bear with me.</p>
<p>Things referring to themselves can be very useful and have produced some profound insights. I hold Gödel&#8217;s proof the #1 intellectual achievement of mankind. Gödel created a language which he used to reason about number theory. The grammar of that language was &#8211; number theory. He then went on to create an interesting (true) theorem that said about itself that it wasn&#8217;t a (true) theorem. I will not go into further implications of this. Suffices to say that it has far-reaching implications for mathematics.</p>
<p>In a similar way, our brain builds representations of the world, including itself, which is probably what gives us this interesting illusion of a self. It also endows us with a very complicated and sophisticated behavior.</p>
<p>The example of self-reference in this post is illustrated in the diagram to the right. When creating a modeling language, it is necessary to create a <em>model</em> (textual, graphical or some other kind) of the modeling language. This model is known as a &#8220;meta-model&#8221; or a model of the model. But what is the modeling language for describing the meta-model? What does the meta-meta-model look like? I come to think of a story from Stephen Hawking&#8217;s A Brief History of Time:</p>
<blockquote><p>A well-known scientist (some say it was Bertrand Russell) once gave a public lecture on astronomy. He described how the earth orbits around the sun and how the sun, in turn, orbits around the center of a vast collection of stars called our galaxy. At the end of the lecture, a little old lady at the back of the room got up and said: &#8220;What you have told us is rubbish. The world is really a flat plate supported on the back of a giant tortoise.&#8221; The scientist gave a superior smile before replying, &#8220;What is the tortoise standing on?&#8221; &#8220;You&#8217;re very clever, young man, very clever&#8221;, said the old lady. &#8220;But it&#8217;s turtles all the way down!&#8221;</p></blockquote>
<p>An infinite number of turtles seems wasteful and so does an infinite number of meta-models. We need to stop the regression before it gets out of hand. The standard way of doing that is to create a meta-meta-model that is its own meta-model, i.e. it defines the language of itself. Kind of like a turtle that stands on himself. This idea always makes my head spin a bit so I tried to draw a picture of a really simple meta-meta-model and contemplate on it for a while. As you may see from the names of the &#8220;things&#8221;, or rather, &#8220;ideas&#8221;, in the model, it is inspired by the meta-meta-model used in Eclipse, Ecore.</p>
<p>There is quite a lot to say about this simple meta-meta-model:</p>
<ul>
<li>It defines by definition &#8211; it&#8217;s what meta-meta-models do for a living &#8211; an <em>abstract syntax</em>, a description of the ideas that we use to create meta-models and meta-meta-models, but it also assumes, or implicitly defines, a <em>concrete syntax</em>, i.e. how we draw representations of those ideas in our diagrams .</li>
<li>Without any a priori knowledge, we would need to bootstrap the process of understanding the picture with a <em>hypothesis</em>. One such hypothesis could be that the ideas in our meta-meta-model are represented by the yellow boxes and that the names of the ideas can be found in the upper part of the box; the yellow boxes are part of the concrete syntax used to describe the abstract syntax of the meta-meta-model (and the meta-model).</li>
<li>The test of our hypothesis and the correctness of the model is if we can create a <em>consistent</em> understanding of how the model represents itself. Do we in the model find representations of all the ideas that the model consists of? Do we for instance find a representation of that line with an arrow between two yellow boxes? We could guess that it is represented by a meta-model element called <b>EReference</b> and see if that mapping can be made part of a consistent interpretation.</li>
<li>We can also deduce that we have an idea called <b>EClass</b> and another idea called <b>EAttribute</b> in our meta-model. These are thus additional building blocks of our meta-model (and our meta-meta-model). The red arrows indicate as far as I can see a consistent hypothesis about the mapping of the ideas in the meta-meta-model onto the element of the concrete syntax of the meta-meta-model and the meta-model.</li>
<li>Just looking at the diagram we don&#8217;t get any clues as to the <em>semantics</em> (meaning) of the parts of the diagram. <b>upperBound</b> for instance could mean pretty much anything. To get something useful, we need to add semantics. To get closer to a semantics we could for instance create a framework in which the elements in our model (described in the meta-model) could correspond to classes in an object oriented language that could be stored and manipulated in a certain way. Without such a visit into the real world, the models would just be meaningless symbols.</li>
</ul>
<p>I don&#8217;t think i will try to explain every single red arrow as I might still get lost in the self-referential maze and end up on the wrong level (meta when meta-meta would be correct and so on) all of a sudden. It seems to me that this picture ultimately still needs to be understood by contemplating on it and by getting an intuitive understanding of the mapping. And that may be better done under a lotus tree than at your desk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1449</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first Eclipse bug report</title>
		<link>http://www.ostrogothia.com/process/?p=1423</link>
		<comments>http://www.ostrogothia.com/process/?p=1423#comments</comments>
		<pubDate>Fri, 20 Aug 2010 22:00:34 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1423</guid>
		<description><![CDATA[Should look the same. I think. There was no response at the forum so I filed a bug report on the behavior described in previous posts. It took some time to find the right place the file the bug report since the GMF button on the Bugzilla home page doesn&#8217;t take you to a place [...]]]></description>
			<content:encoded><![CDATA[<table class="image" align="right" width="279">
<tr>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/08/figures.png" alt="Figures" /></td>
</tr>
<tr>
<td class="caption">Should look the same. I think.</td>
</tr>
</table>
<p>There was no response at the forum so I filed a bug report on the behavior described in previous posts. It took some time to find the right place the file the bug report since the <b>GMF</b> button on the Bugzilla home page doesn&#8217;t take you to a place where GMF bugs can be reported. Instead you have to go to <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMP&#038;format=guided" title="GMF Bugs"> <b>Other projects -&gt; More&#8230; -&gt; GMP</b></a>.</p>
<p>The screen-shot to the right shows a simplified view of the issue. The blue and the red rectangles should in my opinion end up at the same location within their respective containing rectangles. The blue rectangle is defined as a <code>Rectangle</code> and the red one as a <code>Polygon</code> of the same size. The layout parameters are exactly the same in both cases (Grid Layout).</p>
<p>Now I&#8217;m excited to see if it was a real bug or just a newbie mistake. It seems a bit too obvious and basic to be a real bug but maybe this use case has never been tested.</p>
<p>As I mentioned earlier I realize that I have to learn quite a lot of basics, including what the generated code does, to be able to use the DSL Toolkit. Or to quote the excellent textbook on EMF [2]:</p>
<blockquote><p>The problem is that high-level modeling languages need to be learned, and because we are going to need to work with (e.g. debug) the generated Java code anyway, we &#8230; need to understand the mapping between them.</p></blockquote>
<p>Sounds just about right.</p>
<p>On the positive side I have to admit that the more I read about Eclipse in general, the more impressed I become. It looks like considerable time has been spent on the architecture of the platform. So there is lot to learn (and precious little time as always).</p>
<h4>Links</h4>
<p>[1] <a href="http://www.ostrogothia.com/process/wp-content/uploads/2010/08/models.tar.gz" title="Models">The models used to reproduce the bug.</a></p>
<p>[2] Dave Steinberg, Frank Budinsky, Marcelo Paternostro, Ed Merks. EMF Eclipse Modeling Framework.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1423</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A couple of more tests</title>
		<link>http://www.ostrogothia.com/process/?p=1350</link>
		<comments>http://www.ostrogothia.com/process/?p=1350#comments</comments>
		<pubDate>Sat, 14 Aug 2010 10:51:26 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1350</guid>
		<description><![CDATA[I also downloaded the DSL Toolkit to a Windows XP system (all the previous tests were run on Ubuntu 10.04). The behavior with the missing polygon layout is exactly the same. I then created a GMF project in the Helios release of EMF and imported my models. In this version the red polygon doesn&#8217;t show [...]]]></description>
			<content:encoded><![CDATA[<p>I also downloaded the DSL Toolkit to a Windows XP system (all the previous tests were run on Ubuntu 10.04). The behavior with the missing polygon layout is exactly the same.</p>
<p>I then created a GMF project in the Helios release of EMF and imported my models. In this version the red polygon doesn&#8217;t show up at all. Everything else seems to work.</p>
<p>A curious thing about unpacking the zip-file containing the DSL is that the native Windows unzip program asks for numerous passwords when unpacking so I canceled the whole operation. I tried 7-Zip instead and it didn&#8217;t ask for a single password. Go figure.</p>
<p>An additional frustration right now is that I can&#8217;t report a GMF-bug in Bugzilla. It allows me to report bugs on any other project but not GMF. There seems to be something evil going on <img src='http://www.ostrogothia.com/process/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1350</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miscellaneous failures</title>
		<link>http://www.ostrogothia.com/process/?p=1395</link>
		<comments>http://www.ostrogothia.com/process/?p=1395#comments</comments>
		<pubDate>Fri, 06 Aug 2010 07:55:59 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1395</guid>
		<description><![CDATA[I have so far failed to find any way to draw a custom icon with a centered label (the class name) below the icon, using the model-based process (not editing the generated Java files). I still say &#8220;I have failed&#8221; instead of &#8220;it&#8217;s not possible&#8221;. (And there will probably be a &#8220;it seems impossible&#8221; phase [...]]]></description>
			<content:encoded><![CDATA[<p>I have so far failed to find any way to draw a custom icon with a centered label (the class name) below the icon, using the model-based process (not editing the generated Java files). I still say &#8220;I have failed&#8221; instead of &#8220;it&#8217;s not possible&#8221;. (And there will probably be a &#8220;it <em>seems</em> impossible&#8221; phase there in between.) I posted a question in the GMF Forum [1] but have not received any replies yet. When you are a beginner it&#8217;s hard to know if the question is too hard to answer or too stupid to answer. If it is the latter, I can live with the shame, as long as I learn how to center my labels.</p>
<p>Having given up the polygons that wouldn&#8217;t center, I tried an SVG file. It&#8217;s there as an option in the context menu in the <b>GMFGraph Model Editor</b>. The reference to the actual SVG file isn&#8217;t entirely straight-forward: My workspace is at <code>/home/arto/Helios/Source</code>, my SVG file <code>circle.svg</code> resides in <code>/home/arto/Helios/Source/ProcessModel/images</code> which yields the following <b>Document URI</b> for the SVG file: <code>platform:/plugin/ProcessModel/images/circle.svg</code>. I&#8217;m sure there is a pattern there.</p>
<p>It turned out that SVG files couldn&#8217;t be used unless you added a plug in to both the development environment and the runtime environment. (This goes for both the DSL Toolkit release and the latest Helios release.) This is how it can be done (as far as I can recall):</p>
<table class="image" align="right" width="165">
<tr>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/08/gronback.jpg" alt="Gronback" /></td>
</tr>
<tr>
<td class="caption">Back to the classroom.</td>
</tr>
</table>
<ol>
<li>Download and unzip the <code>gmf-sdk-experimental-2.2.0</code> package (use Google to find it). It contains the <code>org.eclipse.gmf.runtime.lite.svg</code> and the <code>org.eclipse.gmf.runtime.lite</code> plug-ins.</li>
<li>Add the plug-in jar-files from the unzipped package to the plug-in directory of the Eclipse installation.</li>
<li>Open the Java files that don&#8217;t compile and choose the quick fix to add the dependency (hover the cursor over the error message and you&#8217;ll see).</li>
<li>Add the plugin also into the runtime configuration by selecting <b>Add Required Plug-ins</b> under the <b>Plug-ins</b> tab of the <b>Run Configurations</b> dialog. The missing plug-ins are added to the list under <b>Target Platform</b>.</li>
</ol>
<p>This was a useful exercise in plug-in management. Unfortunately it didn&#8217;t take me anywhere close to my goal. I was able to show an SVG image as a child to a <b>Figure Descriptor</b> but not as a child to an enclosing rectangle which means that I can&#8217;t combine it with a label using a layout.</p>
<p>Finally I tried a <b>Polyline</b> but it worked pretty much like a <b>Polygon</b> i.e. it didn&#8217;t obey the layout hints either.</p>
<p>The conclusion seems to be that I need to accept a more programmatic (and less &#8220;generative&#8221;) approach and dig deeper into the mysteries of some of the Eclipse TLAs (Three Letter Acronyms). The process I&#8217;m going through is very much like when I embarked on my quest for judder-free video on a PC a few years back (see <a href="http://www.ostrogothia.com/video/" title="Vertical Sync">my other blog</a>). Also in that case I tried some high-level solutions first but ended up with having to spend considerable time to learn how to aggregate COM objects into other COM objects before I could do anything useful. The good thing is it gives the brain a lot of exercise and it is more entertaining than Sudoku.</p>
<p>I will go back to Gronback&#8217;s tutorial and give up my own progress for a while, however impatient I am to see my own icons show up there in the diagram. I recall seeing a lot of Java code on the pages ahead of where I thought I had got it all it so I assume the tutorial will eventually take me deeper into the generated code and hopefully give some hints as to how to tweak it.</p>
<h4>Links</h4>
<p>[1] <a href="http://www.eclipse.org/forums/index.php?t=thread&#038;frm_id=16&#038;S=d3fb6432d4a48579085be15fe2a6e7c8" title="GMF Forum">GMF Forum</a></p>
<p>[2] <a href="http://agile.csc.ncsu.edu/SEMaterials/tutorials/install_plugin/index_v35.html#section2_0" title="Installing Plug-ins">How to install Eclipse plug-ins</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1395</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Close but no cigar</title>
		<link>http://www.ostrogothia.com/process/?p=1385</link>
		<comments>http://www.ostrogothia.com/process/?p=1385#comments</comments>
		<pubDate>Wed, 04 Aug 2010 09:10:00 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1385</guid>
		<description><![CDATA[I got a hint from the Modeling forum to do the following modification to the appropriate file in .diagram.edit.parts: /** * @generated NOT */ private boolean myUseLocalCoordinates = true; It kind of worked in the sense that now at least the body of the icon (defined as a polygon) ends up within the enclosing rectangle [...]]]></description>
			<content:encoded><![CDATA[<p>I got a hint from the Modeling forum to do the following modification to the appropriate file in <code>.diagram.edit.parts</code>:</p>
<p><code>/**<br />
* @generated NOT<br />
*/<br />
private boolean myUseLocalCoordinates = true;</code></p>
<p>It kind of worked in the sense that now at least the body of the icon (defined as a polygon) ends up <em>within</em> the enclosing rectangle and can therefore be moved around on the canvas. It still doesn&#8217;t obey the same <code>CENTER</code> parameter that makes the ellipse center inside the rectangle. Now the forum is up so it&#8217;s time for that first n00b question. I also realize that GMF will be very hard to use without understanding the generated code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1385</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Out of body experience</title>
		<link>http://www.ostrogothia.com/process/?p=1372</link>
		<comments>http://www.ostrogothia.com/process/?p=1372#comments</comments>
		<pubDate>Tue, 03 Aug 2010 07:18:22 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1372</guid>
		<description><![CDATA[The beheaded icon. I don&#8217;t easily give up so I went back to GMF the tutorial to try it once more, now that I&#8217;ve played around a bit more with figure definition. Reading the section &#8220;Graphical Definition&#8221;, I notice to start with that the code snippet and the GMFGraph Model Editor screen-shot to the right [...]]]></description>
			<content:encoded><![CDATA[<table class="image" align="right" width="165">
<tr>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/08/beheaded.png" alt="Beheaded icon" /></td>
</tr>
<tr>
<td class="caption">The beheaded icon.</td>
</tr>
</table>
<p>I don&#8217;t easily give up so I went back to GMF the tutorial to try it once more, now that I&#8217;ve played around a bit more with figure definition. Reading the section &#8220;Graphical Definition&#8221;, I notice to start with that the code snippet and the GMFGraph Model Editor screen-shot to the right aren&#8217;t consistent. The code uses <b>Flow Layout</b> whereas the screen-shot indicates <b>XY Layout</b>. I copied the code into my project and got the thing to the right. The body of the icon always stays in the upper left corner of the canvas. Only the head follows the actual element when it is moved around. This looks like a variant of the behavior I described in my previous post: the polygon doesn&#8217;t obey the layout.</p>
<p>I also tried <b>XY Layout</b> but got a similar behavior (but not exactly the same). I would have expected to have been able to define the XY coordinates of the figure parts (head and body) using <b>XY Layout Data</b> but it doesn&#8217;t have any attributes in my version of the DSL Toolkit. If I still add an <b>XY Layout Data</b> child (with no attributes) to both the head (ellipse) and the body (polygon) of the icon, then the head disappears from the icon and the body still lingers in the upper left corner of the canvas.</p>
<p>I will post a question in the Modeling forum before I post a bug report although this looks very much like a bug or several bugs (at least in the tutorial). The forums are still down though so I document what I learn here on my blog in the mean time and perhaps start reading the basic EMF book that has now arrived to understand more of the history and the basic philosophy of Eclipse. My risk-based approach to start using the GMF has now come to it&#8217;s first &#8220;gate&#8221; that I will not pass before I can define a good-looking icon with a centered label below it (for more on the &#8220;risk-based approach&#8221;, see <a href="http://www.ostrogothia.com/process/?p=1077" title="Stage-Gate">this post</a>.)</p>
<h4>Links</h4>
<p>[1] <a href="http://wiki.eclipse.org/GMF_Tutorial_Part_3" title="Tutorial 3">GMF Tutorial Part 3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1372</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Layout inconsistencies?</title>
		<link>http://www.ostrogothia.com/process/?p=1351</link>
		<comments>http://www.ostrogothia.com/process/?p=1351#comments</comments>
		<pubDate>Sun, 01 Aug 2010 13:36:05 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1351</guid>
		<description><![CDATA[At this point on my learning curve it&#8217;s hard to say if I have run into a bug or if I should blame that I&#8217;m stilll a &#8220;n00b&#8221;. If I&#8217;m seeing the intended results of the layout code then I&#8217;m missing something fundamental in my mental model of the layout mechanism of GMF though. The [...]]]></description>
			<content:encoded><![CDATA[<p>At this point on my learning curve it&#8217;s hard to say if I have run into a bug or if I should blame that I&#8217;m stilll a &#8220;n00b&#8221;. If I&#8217;m seeing the intended results of the layout code then I&#8217;m missing something fundamental in my mental model of the layout mechanism of GMF though.</p>
<p>The layout of the rectangle defined as a <b>Rectangle</b> (blue) in the screen-shots below is as I would expect in both <b>Flow Layout</b> and <b>Grid Layout</b>. The same goes for the ellipse. The layout algorithm seems to <em>make space</em> for the the other rectangle which is defined as a <b>Polygon</b> (red) below the (&#8220;native&#8221;) rectangle but then throws the polygon up into the upper left corner.</p>
<p>Similarly the positioning of the element label isn&#8217;t in my opinion consistent. With <b>Grid Layout</b> the label ends up centered where I want it to, and expect it to. With <b>Flow Layout</b> it isn&#8217;t centered. In summary, only two out of four figures end up where I would expect them to when I use the <b>Flow Layout</b>.</p>
<p>Another thing that somewhat bothers me is the vertical space between the geometrics figures in <b>Grid Layout</b>. I can&#8217;t see that I have defined such a space anywhere in my <code>.gmfgraph</code> file.</p>
<p>As soon as the Eclipse forum is on line again, I&#8217;ll post a question. I guess that sooner or later I need to delve into the generated Java code to really understand what&#8217;s happening&#8230;</p>
<table width="780">
<tr>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/08/flowlayoutdef.png" alt="Flow layout definition" /></td>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/08/gridlayoutdef.png" alt="Grid layout definition" /></td>
</tr>
<tr>
<td class="caption" valign="top" width="390">Flow layout definition.</td>
<td class="caption" valign="top" width="390">Grid layout definition.</td>
</tr>
<tr>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/08/flowlayout.png" alt="Flow layout" /></td>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/08/gridlayout.png" alt="Grid layout" /></td>
</tr>
<tr>
<td class="caption" valign="top" width="390">Resulting flow layout.</td>
<td class="caption" valign="top" width="390">Resulting grid layout.</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1351</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Layout experiments</title>
		<link>http://www.ostrogothia.com/process/?p=1335</link>
		<comments>http://www.ostrogothia.com/process/?p=1335#comments</comments>
		<pubDate>Fri, 30 Jul 2010 08:42:28 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>
		<category><![CDATA[Process support]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1335</guid>
		<description><![CDATA[A very lame DSL Editor. The &#8220;role&#8221; and the &#8220;item&#8221; figures are created with Grid Layout. The &#8220;workflow&#8221; figure demonstrates the use of Insets (padding around the text). The first goal with my DSL Toolkit experiments is to create an &#8220;operations manual generator&#8221;, a bit like EPF (see this post), but using my own favorite [...]]]></description>
			<content:encoded><![CDATA[<table class="image" align="right" width="307">
<tr>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/07/labelalignment.png" alt="Grid Layout" /></td>
</tr>
<tr>
<td class="caption">A very lame DSL Editor. The &#8220;role&#8221; and the &#8220;item&#8221; figures are created with <b>Grid Layout</b>. The &#8220;workflow&#8221; figure demonstrates the use of <b>Insets</b> (padding around the text).</td>
</tr>
</table>
<p>The first goal with my DSL Toolkit experiments is to create an &#8220;operations manual generator&#8221;, a bit like EPF (see <a href="http://www.ostrogothia.com/process/?p=1047" title="EPF"> this post</a>), but using my own favorite meta-model (see <a href="http://www.ostrogothia.com/process/?page_id=64" title="Meta-model"> this page</a>).</p>
<p>It could be argued that I lack imagination as I have already created a couple of such generators before, one based on Rational Rose and one based on StarUML. (In both cases I used UML stereotypes for defining the meta-model.) Unfortunately both these solutions have serious drawbacks: Rational Rose is forbiddingly expensive (or at least was at the time) and StarUML is a dead open source project despite its very impressive qualities. Eclipse and the DSL Toolkit don&#8217;t seem to have those two particular drawbacks but I&#8217;m sure I&#8217;ll run into other road-blocks why I&#8217;m doing this in a risk-based fashion.</p>
<p>I believe that intuitive graphics, particularly good looking modeling element icons and a diagram editor that works as expected (no random reordering of elements, no rounding errors when snapping to grid, rectilinear lines behaving well etc), are important to make a domain specific language attractive to use. I have therefore spent several hours to explore the layout options in the <code>gmfgraph</code> model. I wish to eventually use my own icons with icon (class) labels centered below the icon. It took me quite some time to actually manage to center the label. There might be more than one way of doing it but only way that worked for me was the <b>Grid Layout</b> with default <b>Grid Layout Data</b> for the child element.</p>
<p>I still don&#8217;t have the full mental model of the modeling elements (e.g. the <b>Child Access</b>) in the diagram definition models so I guess I&#8217;ll spend a few more rainy hours making small adjustments and generating new diagram code. Fortunately I have a pretty fast computer.</p>
<p>I have waded through numerous tutorials on the Internet (links to those that I found most useful can be found below). I used the reference section of the DSL Toolkit book to understand the layout options (the reference part is actually pretty good).</p>
<h4>GMF Tutorials</h4>
<p>[1] <a href="http://set.sintef.no/inf5120/index.php/EMF_and_GMF_-_Basic_Tutorial" title="SINTEF">A very basic tutorial that creates a class diagram editor using the wizards. The created solution is a good starting point for further experiments though.</a></p>
<p>[2] <a href="http://rtsys.informatik.uni-kiel.de/trac/09ws-eclipse/wiki/Exercises/GMF" title="uni-kiel">A basic tutorial with some hints as to how to change to look of elements in the diagram etc.</a></p>
<p>[3] <a href="http://gmfsamples.tuxfamily.org/wiki/doku.php?id=start" title="Brazeau">A tutorial that covers more than just the basic diagram with a few classes-as-rectangles and associations.</a></p>
<p>[4] <a href="http://wiki.eclipse.org/index.php/GMF_Tutorial" title="Eclipse GMF Tutorial">The official Eclipse GMF tutorial. Unfortunately, it seems a bit outdated. The Taipan example can for instance not be found at the indicated location.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1335</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A broken mental model and a hint</title>
		<link>http://www.ostrogothia.com/process/?p=1315</link>
		<comments>http://www.ostrogothia.com/process/?p=1315#comments</comments>
		<pubDate>Tue, 27 Jul 2010 08:52:55 +0000</pubDate>
		<dc:creator>Arto Jarvinen</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://www.ostrogothia.com/process/?p=1315</guid>
		<description><![CDATA[Information not added. When I try to understand a new domain, I build mental models of the domain, very much like we build Ecore models of the domains we try to model with our domain specific languages. (Peter Senge has a wonderful account of mental models in his book The Fifth Discipline.) The mental models [...]]]></description>
			<content:encoded><![CDATA[<table class="image" align="right" width="612">
<tr>
<td><img src="http://www.ostrogothia.com/process/wp-content/uploads/2010/07/graphical_definition.png" alt="Graphical definition wizard" /></td>
</tr>
<tr>
<td class="caption">Information not added.</td>
</tr>
</table>
<p>When I try to understand a new domain, I build <em>mental models</em> of the domain, very much like we build Ecore models of the domains we try to model with our domain specific languages. (Peter Senge has a wonderful account of mental models in his book The Fifth Discipline.) The mental models are of course not as formal as the Ecore models and maybe not even consciously known but are nevertheless there in the synapses somewhere.</p>
<p>Quite often I get a sense of that something in my mental model is wrong but it is only much later that I can pin down exactly what it is. Finally finding out is one of the joys in life.</p>
<p>I could not at first create a consistent mental model of how the different models of the Graphical Modeling Framework used to create graphical editors related to each other. One of the aspects that I look for in my mental models is &#8220;orthogonality&#8221; (independence) between different concepts. When working through the wizards that created the various models needed to define the graphical editor for the mindmap example I got the feeling that things were not &#8220;orthogonal&#8221; which broke my mental model of the graphical editor definition process.</p>
<p>The mental tension was relieved when I realized that one of the wizards (see figure) didn&#8217;t really record all of the information that was available in the wizard dialog; even if it could have established a first mapping between the domain elements of the Ecore model and the graphical elements of the diagram, it didn&#8217;t. It established a set of graphical elements that were only later (in the Mapping Model) connected to the Ecore (domain) elements. It would here have been helpful if the tutorial had been clear about what information was extracted from the wizard and what information was discarded. So it goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostrogothia.com/process/?feed=rss2&amp;p=1315</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
