<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-466034306372559694</id><updated>2012-02-17T09:14:55.534+08:00</updated><category term='linux'/><category term='xml'/><category term='qemu'/><category term='android'/><category term='eclipse'/><category term='rap'/><category term='emf'/><category term='cdt'/><category term='vi'/><category term='java'/><category term='unix'/><category term='c'/><title type='text'>publicabstractvoid</title><subtitle type='html'>Notes of a software developer</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-4677908653114576158</id><published>2008-03-07T02:41:00.004+08:00</published><updated>2008-03-07T03:06:10.087+08:00</updated><title type='text'>OMG</title><content type='html'>I am watching (if you can call it that -- I'm just refresh-reading the live blog) the release of the Apple iPhone SDK as I write.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Oh. My. God.                  &lt;/div&gt;&lt;div&gt;I just peed my pants. (^_^)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-4677908653114576158?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/4677908653114576158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=4677908653114576158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/4677908653114576158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/4677908653114576158'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2008/03/omg.html' title='OMG'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-9170963020473651523</id><published>2008-01-23T14:07:00.000+08:00</published><updated>2008-01-23T14:18:48.534+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cdt'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><title type='text'>Really, really nice</title><content type='html'>Just a quick one today.&lt;br /&gt;&lt;br /&gt;After my previous qemu &lt;a href="http://publicabstractvoid.blogspot.com/2007/12/installing-ubuntu-704-server-on-qemu.html"&gt;post&lt;/a&gt;, I found this really cool &lt;a href="http://issaris.blogspot.com/2007/12/download-linux-kernel-sourcecode-from.html"&gt;article&lt;/a&gt; on how to debug the linux kernel itself running on the emulator. It even uses Eclipse CDT so you have a nice IDE while debugging the kernel code.&lt;br /&gt;&lt;br /&gt;Great stuff...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-9170963020473651523?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/9170963020473651523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=9170963020473651523' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/9170963020473651523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/9170963020473651523'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2008/01/really-really-nice.html' title='Really, really nice'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-7694156870042443603</id><published>2008-01-22T11:31:00.000+08:00</published><updated>2008-01-23T15:57:18.880+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>Fork/exec while redirecting I/O</title><content type='html'>Here's a common problem in (POSIX) C applications: let's say you want to execute another application, but you want to redirect this application's standard I/O (i.e., stdin, stdout, stderr) to a file descriptor(s) of your choice. Perhaps you want to log the output to a file, or stream the application's input from a file you just created, or collect error messages (stderr) for parsing later.&lt;br /&gt;&lt;br /&gt;The function below illustrates how to do this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code style="border: thin dashed ; padding: 10px; display: block; background-color: rgb(220, 220, 220);"&gt;pid_t&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;exec_redirect&lt;/span&gt;(&lt;br /&gt;const char *path, char *const args[],&lt;br /&gt;int new_in, int new_out, int new_err&lt;br /&gt;)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;pid_t child;&lt;br /&gt;&lt;br /&gt;// Fork new process&lt;br /&gt;child = fork();&lt;br /&gt;&lt;br /&gt;if (child == 0) {&lt;br /&gt;&lt;br /&gt;// Child process&lt;br /&gt;&lt;br /&gt;// Redirect standard input&lt;br /&gt;if (new_in &gt;= 0) {&lt;br /&gt; close(STDIN_FILENO);&lt;br /&gt; dup2(new_in, STDIN_FILENO);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Redirect standard output&lt;br /&gt;if (new_out &gt;= 0) {&lt;br /&gt; close(STDOUT_FILENO);&lt;br /&gt; dup2(new_out, STDOUT_FILENO);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Redirect standard error&lt;br /&gt;if (new_err &gt;= 0) {&lt;br /&gt; close(STDERR_FILENO);&lt;br /&gt; dup2(new_err, STDERR_FILENO);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Execute the command&lt;br /&gt;execv(path, args);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Parent process&lt;br /&gt;return child;&lt;br /&gt;&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;This function takes the parameters &lt;code&gt;path&lt;/code&gt; and &lt;code&gt;args&lt;/code&gt; which is the same as what you would normally pass to &lt;code&gt;&lt;a href="http://www.hmug.org/man/3/execv.php" style="text-decoration: none;"&gt;execv(3)&lt;/a&gt;&lt;/code&gt;. In addition, there are three parameters, &lt;code&gt;new_in&lt;/code&gt;, &lt;code&gt;new_out&lt;/code&gt;, and &lt;code&gt;new_err&lt;/code&gt; which are (optional) file descriptors where the new application's standard input, output, and error, respectively, will be redirected from/to. To make redirection optional, we specify that if the descriptor parameter is &lt;code&gt;-1&lt;/code&gt;, then no redirection will take place.&lt;br /&gt;&lt;br /&gt;So how do we use this? The code snippet below executes the command line &lt;code&gt;/bin/myapp -l -p&lt;/code&gt;, with input redirected from &lt;code&gt;in.txt&lt;/code&gt;, output redirected to &lt;code&gt;out.txt&lt;/code&gt;, and error redirected to &lt;code&gt;err.txt&lt;/code&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code style="border: thin dashed ; padding: 10px; display: block; background-color: rgb(220, 220, 220);"&gt;    ...&lt;br /&gt; char *cmd = "/bin/myapp";&lt;br /&gt; char *args[] = { "/bin/myapp", "-l", "-p", NULL };&lt;br /&gt;&lt;br /&gt; in = open("in.txt", O_RDONLY);&lt;br /&gt; out = open("out.txt", O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);&lt;br /&gt; err = open("err.txt", O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);&lt;br /&gt;&lt;br /&gt; exec_redirect(cmd, args, in, out, err);&lt;br /&gt; ...&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;On a closing note, it's also probably a good idea to &lt;code&gt;close()&lt;/code&gt; the file handles in the parent process, after &lt;code&gt;exec_redirect()&lt;/code&gt;, just to prevent "inadvertently" accessing them while the child process is also doing the same. Yes, the pun was intended ;-)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-style: italic;"&gt;[Update: fixed some typos]&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-7694156870042443603?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/7694156870042443603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=7694156870042443603' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/7694156870042443603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/7694156870042443603'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2008/01/forkexec-while-redirecting-io.html' title='Fork/exec while redirecting I/O'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-5831508546202388161</id><published>2008-01-17T10:13:00.000+08:00</published><updated>2008-01-18T20:43:29.634+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='emf'/><title type='text'>A Quick Eclipse-based XML Editor Using EMF, Part I</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've recently been dabbling in &lt;span style="font-weight: bold;"&gt;OSGi&lt;/span&gt; technology and found &lt;span style="font-weight: bold;"&gt;DS&lt;/span&gt; (Declarative Services) feature neat for automagically registering and finding/consuming services. Basically, instead of having to call OSGi APIs for registering Java objects(services), you will just need to "declare" these provided services in an XML file and the DS framework will take care of registering it for you. Similarly, if your application needs a service, instead of finding (and tracking) it yourself in code, just declare it in the XML file and DS will take care of "injecting" it into your object and tracking dynamic registration/unregistration. It is very reminiscent of &lt;span style="font-weight: bold;"&gt;Spring Dependency Injection&lt;/span&gt; and in fact, Spring has a very similar technology called &lt;span style="font-weight: bold;"&gt;Spring DM&lt;/span&gt; (Dynamic Modules). In the end, these technologies are all about decoupling your business logic from framework/container (e.g.OSGi) APIs, which promotes greater code reusability.&lt;br /&gt;&lt;br /&gt;Anyway, like I said, the configuration is XML-based and being the lazy (in a good way ;-)) developer that I am, I wanted an integrated editor in Eclipse to edit these DS files. Nowadays, whenever I see and XML&lt;-&gt;Java binding (plus Eclipse integration) problem my neurons automatically fire "&lt;span style="font-weight: bold;"&gt;EMF!&lt;/span&gt;", and so I set about trying to use this technology to create my own editor.&lt;br /&gt;&lt;br /&gt;Which brings us to our first box-looking thingie:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div  style="border: thin dashed ; padding: 10px; background-color: rgb(220, 220, 220);font-size:smaller;"&gt;&lt;span style="font-weight: bold; width: 80%;"&gt;What is EMF?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;A (meta-)modeling language (ecore)&lt;/li&gt;&lt;li&gt; A Java code generator for your model&lt;/li&gt;&lt;li&gt;An (extensible) XML&lt;-&gt;Java binding framework&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;In addition to the above, you also get the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Reflective API (e.g., eGet("sandwich") method in addition to getSandwich() method)&lt;/li&gt;&lt;li&gt;Change notification&lt;/li&gt;&lt;li&gt;Base adapter &amp;amp; adapter factory classes for most model editing needs (providing content, labels, etc. for your model)&lt;/li&gt;&lt;li&gt;Command-based editing, undo/redo support&lt;/li&gt;&lt;li&gt;A sample Eclipse editor which you can customize or study&lt;/li&gt;&lt;li&gt;An option to export the editor as a standalone RCP app (cool!)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As a &lt;span style="font-weight: bold;"&gt;modeling &lt;/span&gt;technology, EMF is pretty solid and feature-rich. However, for this case, we don't need to create models because there is already a schema available - it's in the OSGi specs. EMF already has the ability to convert any XSD schema to an ecore model, and vice-versa.&lt;br /&gt;&lt;br /&gt;The DS schema looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JV9_q-dLKr0/R5CHobtuXRI/AAAAAAAAAEk/ZEflI7PYy6k/s1600-h/00_ds_schema.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JV9_q-dLKr0/R5CHobtuXRI/AAAAAAAAAEk/ZEflI7PYy6k/s320/00_ds_schema.PNG" alt="" id="BLOGGER_PHOTO_ID_5156770702043274514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I just copied it from the specs and saved it to a file in my system.&lt;br /&gt;&lt;br /&gt;Here, then, is the quick procedure for creating the editor. Are you ready? Don't blink your eyes because this will be &lt;span style="font-weight: bold;"&gt;F-A-S-T&lt;/span&gt;! :-)&lt;br /&gt;&lt;br /&gt;1. From Eclipse, click &lt;span style="font-weight: bold;"&gt;New-&gt;Other...&lt;/span&gt;, then select &lt;span style="font-weight: bold;"&gt;EMF Project&lt;/span&gt; as below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JV9_q-dLKr0/R5CAdrtuXPI/AAAAAAAAAEU/dLWTuEyGYJw/s1600-h/01_new_emf_proj_wiz.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_JV9_q-dLKr0/R5CAdrtuXPI/AAAAAAAAAEU/dLWTuEyGYJw/s320/01_new_emf_proj_wiz.PNG" alt="" id="BLOGGER_PHOTO_ID_5156762820778286322" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;You will be prompted for a project name. Type, e.g., &lt;code&gt;org.example.ds&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;2. Select a Model Importer. For now we use &lt;span style="font-weight: bold;"&gt;XML Schema&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JV9_q-dLKr0/R5CB1LtuXQI/AAAAAAAAAEc/xAhBMwzuo0M/s1600-h/02_import_schema.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JV9_q-dLKr0/R5CB1LtuXQI/AAAAAAAAAEc/xAhBMwzuo0M/s320/02_import_schema.PNG" alt="" id="BLOGGER_PHOTO_ID_5156764324016839938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Then, browse to where you saved the DS schema file (.xsd).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JV9_q-dLKr0/R5CM2btuXSI/AAAAAAAAAEs/u8QAtEt8Bek/s1600-h/03_schema_import.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JV9_q-dLKr0/R5CM2btuXSI/AAAAAAAAAEs/u8QAtEt8Bek/s320/03_schema_import.PNG" alt="" id="BLOGGER_PHOTO_ID_5156776440119581986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. In the next page you will be asked what packages to import. EMF tries to generate a model filename from the schema contents but it's sometimes not nice (e.g. &lt;code&gt;_0.ecore&lt;/code&gt;). You can rename it if you want, like here I renamed it to &lt;code&gt;ds.ecore&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JV9_q-dLKr0/R5CNgbtuXTI/AAAAAAAAAE0/ZFkjnAlKQow/s1600-h/04_package_select.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JV9_q-dLKr0/R5CNgbtuXTI/AAAAAAAAAE0/ZFkjnAlKQow/s320/04_package_select.PNG" alt="" id="BLOGGER_PHOTO_ID_5156777161674087730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;4. When the wizard is finished, you will have a new project in your workspace, with the generated ecore model (&lt;code&gt;ds.ecore&lt;/code&gt;). Also, there will be a &lt;code&gt;ds.genmodel&lt;/code&gt; file which is a generator model for your model: it tells EMF about code-generator-specific stuff like where to put the generated files, what base package name to use, etc.&lt;br /&gt;&lt;br /&gt;You can view and edit these files via the Ecore and GenModel editors already bundled with EMF:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JV9_q-dLKr0/R5CRr7tuXVI/AAAAAAAAAFE/d-LZDIlIUJw/s1600-h/05_project.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_JV9_q-dLKr0/R5CRr7tuXVI/AAAAAAAAAFE/d-LZDIlIUJw/s320/05_project.PNG" alt="" id="BLOGGER_PHOTO_ID_5156781757289094482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Again, the package name derived from the schema might not look nice ("_0"), so here we can rename it. In the Ecore editor, select the package _0, and in the Properties View, set the &lt;span style="font-weight: bold;"&gt;Name&lt;/span&gt; property to "ds".&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JV9_q-dLKr0/R5CSg7tuXWI/AAAAAAAAAFM/7mCdroHO_qE/s1600-h/06_package_properties.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_JV9_q-dLKr0/R5CSg7tuXWI/AAAAAAAAAFM/7mCdroHO_qE/s320/06_package_properties.PNG" alt="" id="BLOGGER_PHOTO_ID_5156782667822161250" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;5. Now that that's out of the way, we can configure the code generator. First, double-click the &lt;code&gt;ds.genmodel&lt;/code&gt; file. It will open the GenModel editor:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JV9_q-dLKr0/R5CTOLtuXXI/AAAAAAAAAFU/l14sDkffccg/s1600-h/07_genmodel.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JV9_q-dLKr0/R5CTOLtuXXI/AAAAAAAAAFU/l14sDkffccg/s320/07_genmodel.PNG" alt="" id="BLOGGER_PHOTO_ID_5156783445211241842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;We can set the &lt;span style="font-weight: bold;"&gt;Base Package&lt;/span&gt; property to &lt;code&gt;org.example&lt;/code&gt; so that the generated package will start with &lt;code&gt;org.example.ds&lt;/code&gt;. And also rename the &lt;span style="font-weight: bold;"&gt;Prefix &lt;/span&gt;property to "Ds" (previously it was "_0").&lt;br /&gt;&lt;br /&gt;6. Code generation time!&lt;br /&gt;&lt;br /&gt;Select the root genmodel (Ds), right-click, then click the &lt;span style="font-weight: bold;"&gt;Generate Model Code&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;Generate Edit Code&lt;/span&gt;, and &lt;span style="font-weight: bold;"&gt;Generate Editor Code&lt;/span&gt; commands successively.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JV9_q-dLKr0/R5CU5LtuXYI/AAAAAAAAAFc/Hwyan7mavsQ/s1600-h/08_codegen.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JV9_q-dLKr0/R5CU5LtuXYI/AAAAAAAAAFc/Hwyan7mavsQ/s320/08_codegen.PNG" alt="" id="BLOGGER_PHOTO_ID_5156785283457244546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If successful, it will generate the Java code for your model, as well as 2 new projects: a UI-agnostic &lt;code&gt;.edit&lt;/code&gt; project which you can re-use outside of the Eclipse environment, and an Eclipse-specific &lt;code&gt;.editor&lt;/code&gt; project which is tightly bound to (you guessed it) the Eclipse environment.&lt;br /&gt;&lt;br /&gt;The editor application is complete!&lt;br /&gt;&lt;br /&gt;7. You can test it by launching a new Eclipse instance from the workbench:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JV9_q-dLKr0/R5CWCrtuXZI/AAAAAAAAAFk/l3w8wXqc1W8/s1600-h/09_launch.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_JV9_q-dLKr0/R5CWCrtuXZI/AAAAAAAAAFk/l3w8wXqc1W8/s320/09_launch.PNG" alt="" id="BLOGGER_PHOTO_ID_5156786546177629586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It will run a new Eclipse environment with your core, edit, and editor plug-ins included. In it you can try to create a new DS file via &lt;span style="font-weight: bold;"&gt;New-&gt;Other...-&gt;Example EMF Model Creation Wizards-&gt;Ds Model&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JV9_q-dLKr0/R5CXq7tuXaI/AAAAAAAAAFs/DeuAzv0aXrs/s1600-h/10_dswizard.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_JV9_q-dLKr0/R5CXq7tuXaI/AAAAAAAAAFs/DeuAzv0aXrs/s320/10_dswizard.PNG" alt="" id="BLOGGER_PHOTO_ID_5156788337178992034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If you try to double-click this new file, it will invoke the &lt;code&gt;.editor&lt;/code&gt; plugin you just created, and show a nice tree-based editor for you!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JV9_q-dLKr0/R5CYNLtuXbI/AAAAAAAAAF0/D_FOJHMKLrQ/s1600-h/11_dseditor.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JV9_q-dLKr0/R5CYNLtuXbI/AAAAAAAAAF0/D_FOJHMKLrQ/s320/11_dseditor.PNG" alt="" id="BLOGGER_PHOTO_ID_5156788925589511602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The great thing is, if you try to look at &lt;code&gt;My.ds&lt;/code&gt; using a text editor, you will see the underlying data is fully compliant XML!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What's Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We've gone from &lt;span style="font-style: italic;"&gt;zero&lt;/span&gt; (editing XML by hand) to &lt;span style="font-style: italic;"&gt;hero&lt;/span&gt; (editing the same XML by a neat, integrated, GUI-based editor) in just a few mouse clicks. But that is not all that EMF can do! I just hope this article has gotten you interested enough to want to have a deeper look. :-)&lt;br /&gt;&lt;br /&gt;From here, where can our DS Editor application go? Well, I can see a few things for improvement already:&lt;br /&gt;&lt;br /&gt;1. The generated class names are ugly!&lt;br /&gt;&lt;br /&gt;Did you have a look at the generated model/Java code? There are classes whose names are &lt;code&gt;Tservice&lt;/code&gt;, &lt;code&gt;Tproperties&lt;/code&gt;, and so on (fugly!). These are a direct consequence of the &lt;code&gt;&amp;lt;complexType name="xxx"&amp;gt;&lt;/code&gt; declarations in the schema. It would be nice if the generated class names were more, hmm... &lt;span style="font-style: italic;"&gt;how you say&lt;/span&gt;... Java-ish? :-p Like &lt;code&gt;Service&lt;/code&gt; and &lt;code&gt;Properties&lt;/code&gt;, respectively, for example.&lt;br /&gt;&lt;br /&gt;In the next parts I will show how to "coax" EMF to generate (nicer, if you wish) class names, so you won't be forced to use the schema's type names if you don't want to. :-)&lt;br /&gt;&lt;br /&gt;2. I want more Eclipse IDE integration!&lt;br /&gt;&lt;br /&gt;For example, when I edit the attribute &lt;code&gt;interface&lt;/code&gt;, I don't want to type the Java interface name in a text box. I want something similar to those nice &lt;a href="http://www.eclipse.org/jdt/"&gt;JDT&lt;/a&gt; dialogs where I can search and select for the Java interface:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JV9_q-dLKr0/R5CP0rtuXUI/AAAAAAAAAE8/roox3flh86c/s1600-h/99_jdt_dialog.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_JV9_q-dLKr0/R5CP0rtuXUI/AAAAAAAAAE8/roox3flh86c/s320/99_jdt_dialog.PNG" alt="" id="BLOGGER_PHOTO_ID_5156779708589694274" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the next posts, we'll see how this can be done.&lt;br /&gt;&lt;br /&gt;3. I want it to make me coffee &amp;amp; toast!&lt;br /&gt;&lt;br /&gt;Okay, EMF is cool.. but not &lt;span style="font-style: italic;"&gt;that&lt;/span&gt; cool :-)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Stay tuned!!!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-5831508546202388161?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/5831508546202388161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=5831508546202388161' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/5831508546202388161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/5831508546202388161'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2008/01/quick-eclipse-based-xml-editor-using.html' title='A Quick Eclipse-based XML Editor Using EMF, Part I'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JV9_q-dLKr0/R5CHobtuXRI/AAAAAAAAAEk/ZEflI7PYy6k/s72-c/00_ds_schema.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-4557691908832408895</id><published>2008-01-07T22:55:00.000+08:00</published><updated>2008-01-10T23:00:25.929+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cdt'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>Read...+ Write?</title><content type='html'>In a previous &lt;a href="http://publicabstractvoid.blogspot.com/2007/11/whats-out-and-about-nov-29-2007.html"&gt;post&lt;/a&gt; I mentioned the possibilities opened up by having access to a C/C++ project's DOM AST within Eclipse. Now there's a new &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=214334"&gt;bugzilla&lt;/a&gt; in CDT to work on making this AST writable. Aside from the obvious benefit (aka "refactoring"), I can imagine a whole new bunch of neat features that can be made possible by this work: more intelligent C/C++ code generation, quick fix, among others.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Eclipse CDT is becoming more and more like the excellent JDT in terms of features &lt;span class="Apple-style-span" style="font-style: italic;"&gt;and&lt;/span&gt; API, and this is great news for us C/C++ developers and Eclipse plug-in developers alike.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-4557691908832408895?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/4557691908832408895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=4557691908832408895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/4557691908832408895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/4557691908832408895'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2008/01/read-write.html' title='Read...+ Write?'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-1895931163743680069</id><published>2007-12-12T21:30:00.000+08:00</published><updated>2007-12-12T22:15:08.364+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><title type='text'>Installing Ubuntu 7.04 Server on QEMU</title><content type='html'>I was able to install and run an Ubuntu 7.04 Linux (Server Edition) on a Windows XP host using &lt;a href="http://fabrice.bellard.free.fr/qemu/index.html"&gt;QEMU&lt;/a&gt;. Installation was pretty straightforward, what required some extra research was getting the Linux guest OS to communicate with the host OS using TCP/IP.&lt;br /&gt;&lt;br /&gt;Here are the steps:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ubuntu Installation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://www.h6.dion.ne.jp/%7Ekazuw/qemu-win/Qemu-0.9.0-install.exe"&gt;Download&lt;/a&gt; and install QEMU for Windows&lt;br /&gt;&lt;br /&gt;2. (Optional) &lt;a href="http://www.h6.dion.ne.jp/%7Ekazuw/qemu-win/Kqemu-1.3.0pre11-install.exe"&gt;Download&lt;/a&gt; and install KQEMU for Windows&lt;br /&gt;&lt;br /&gt;This will greatly speed up the virtual machine running in QEMU.&lt;br /&gt;&lt;br /&gt;3. You will also need to download the Ubuntu server .iso file.&lt;br /&gt;&lt;br /&gt;4. Once these are ready, you can create the disk image that will be used by the virtual machine.&lt;br /&gt;&lt;br /&gt;The command line below will create a disk image 3GB-large in the file &lt;code&gt;ubuntu.img&lt;/code&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;qemu-img.exe create ubuntu.img 3G&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;5. Boot the virtual machine with the Ubuntu .iso as CD-ROM drive&lt;br /&gt;&lt;br /&gt;&lt;code&gt;qemu.exe -cdrom ubuntu-7.04-server-i386.iso -boot d -m 256 -L . ubuntu.img&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You should see a window with the Ubuntu installation screen.&lt;br /&gt;Proceed with the installation as per normal.&lt;br /&gt;&lt;br /&gt;After installation, you need to reboot with the disk image as boot disk. Just remove the &lt;code&gt;-boot d&lt;/code&gt; option to do this.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;qemu.exe -cdrom ubuntu-7.04-server-i386.iso -m 256 -L . ubuntu.img&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Voila!&lt;/em&gt; A Linux box (with LAMP) right inside your Windows desktop.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Configuring the Network&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;There are a couple of ways to go about this, and it really depends on your network configuration (i.e., whether you use DHCP, whether you need to connect to the Internet, etc.). The steps below describe what I did in my set-up:&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://openvpn.net"&gt;Download&lt;/a&gt; and install OpenVPN.&lt;br /&gt;&lt;br /&gt;Actually you will just need the Tap-Win32 component, so you can go ahead and de-select the other components during installation.&lt;br /&gt;&lt;br /&gt;2. After installation you will have a new "Local Area Connection" in your Network Settings folder. For convenience later, I suggest you rename this to something like &lt;code&gt;tap0&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;This interface will be used to connect to the guest OS. You can assign it an IP address, e.g. &lt;code&gt;192.168.1.1&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;3. Boot the guest OS, but this time add the ff. parameters: &lt;code&gt;-net nic -net tap,ifname=tap0&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This will give the virtual machine a network interface, and connect that network interface to the host's &lt;code&gt;tap0&lt;/code&gt; interface.&lt;br /&gt;&lt;br /&gt;4. After the Ubuntu server has booted, it should have an &lt;code&gt;eth0&lt;/code&gt; interface. You can assign an IP address to this using &lt;code&gt;ifconfig&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$ ifconfig eth0 192.168.1.2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;That's it. Your host OS and guest OS should have network connectivity! Try to ping each other. Your network should look like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;192.168.1.2(eth0, linux) &amp;lt;----&amp;gt; 192.168.1.1(tap0, windows)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you want to connect the linux box to the Internet then you can use the bridging function of Windows. I also suggest turning on the Samba server of the linux box so that transferring files between OSes will be very convenient.&lt;br /&gt;&lt;br /&gt;Happy emulating!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-1895931163743680069?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/1895931163743680069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=1895931163743680069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/1895931163743680069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/1895931163743680069'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2007/12/installing-ubuntu-704-server-on-qemu.html' title='Installing Ubuntu 7.04 Server on QEMU'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-2573177698043896160</id><published>2007-12-04T23:53:00.000+08:00</published><updated>2007-12-05T21:48:35.479+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vi'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>vi plug-in for Eclipse</title><content type='html'>During the past few years, I've gotten so used to using &lt;span style="font-style: italic;"&gt;vi&lt;/span&gt; that my fingers have memorized some of the key bindings. Now that I'm using the Eclipse as IDE, I'm having withdrawal symptoms... like constantly typing &lt;span style="font-style: italic;"&gt;&lt;esc&gt;:wq&lt;cr&gt;&lt;/cr&gt;&lt;/esc&gt;&lt;/span&gt; to save current file, or '/' to perform a search. It's just so &lt;span style="font-weight: bold;"&gt;convenient &lt;/span&gt;to not have to lift my hand over to the mouse to do some common editing tasks.&lt;br /&gt;&lt;br /&gt;Much as I love the convenience, though, I'm not willing to give up the powerful Java &amp;amp; C/C++ editing features of Eclipse: outline view, type hierarchy, &lt;a href="http://publicabstractvoid.blogspot.com/2007/12/build-averse.html"&gt;continuous build&lt;/a&gt;, among many others.  Given this dilemma, what is a developer to do?&lt;br /&gt;&lt;br /&gt;Thankfully, Eclipse is an extensible IDE/platform and creating plug-ins has never been easier.&lt;br /&gt;So I did the next best thing: I tried to create my own plug-in that emulates &lt;span style="font-style: italic;"&gt;vi&lt;/span&gt; inside the Eclipse IDE (specifically, inside the text editors).&lt;br /&gt;&lt;br /&gt;So, let me introduce to my own (pre-alpha) version of the &lt;a href="http://sourceforge.net/projects/eclipseviplugin"&gt;Eclipse vi plug-in&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here's how to install it:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Inside Eclipse, go to &lt;span style="font-style: italic;"&gt;Help-&gt;Software Updates-&gt;Find and Install...-&gt;Search for new features to install&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Click the   &lt;span style="font-style: italic;"&gt;New Remote Site&lt;/span&gt; button. Enter the information below when prompted:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Name&lt;/span&gt;: Eclipse vi plug-in (or whatever suits you)&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;URL&lt;/span&gt;: http://eclipseviplugin.sourceforge.net/update/0.x/&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;Finish.&lt;/span&gt; Eclipse will try to download the plug-in from the above site.&lt;/li&gt;&lt;li&gt;Once the download is finished, you will be asked to select the features to install. Just select &lt;span style="font-style: italic;"&gt;All&lt;/span&gt; then hit &lt;span style="font-style: italic;"&gt;Next&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Accept the license... &lt;span style="font-style: italic;"&gt;blah blah blah&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Next&lt;/span&gt;. Then &lt;span style="font-style: italic;"&gt;Finish&lt;/span&gt;. You will be prompted to restart Eclipse shortly afterwards. Please do.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;After restarting, try opening a text, Java, or C/C++ file.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Press &lt;span style="font-style: italic;"&gt;Ctrl+4&lt;/span&gt; (my temporary equivalent of &lt;span style="font-style: italic;"&gt;vi&lt;/span&gt;'s &lt;span style="font-style: italic;"&gt;&lt;esc&gt;&lt;/esc&gt;&lt;/span&gt;) inside the editor to go into vi command mode&lt;/li&gt;&lt;li&gt;From command mode, you can press &lt;span style="font-style: italic;"&gt;i&lt;/span&gt; (insert), &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; (append), or &lt;span style="font-style: italic;"&gt;o&lt;/span&gt; (insert line) to go back to edit mode. Or just click the mouse anywhere inside the document.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-style: italic;"&gt;Voila!  &lt;/span&gt;The  convenience of &lt;span style="font-style: italic;"&gt;vi &lt;/span&gt;at your fingertips. &lt;span style="font-style: italic;"&gt;Literally&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Mind you, it is still pre-alpha (v0.0.1), and thus sorely lacking in features and probably ridden with bugs too. If you find some, please don't hesitate to report it in the project's &lt;a href="http://sourceforge.net/tracker/?atid=1018559&amp;amp;group_id=211637&amp;amp;func=browse"&gt;Bugs&lt;/a&gt; or &lt;a href="http://sourceforge.net/tracker/?atid=1018562&amp;amp;group_id=211637&amp;amp;func=browse"&gt;Feature Requests&lt;/a&gt; page. Please be kind as I am only doing this in my free time :-)&lt;br /&gt;&lt;br /&gt;Here are some of the other commands that work so far:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; &lt;span style="font-style: italic;"&gt;:w&lt;/span&gt; (save)&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;:wq&lt;/span&gt; (save and close)&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;:q&lt;/span&gt; (close)&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;w&lt;/span&gt; (next word)&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;b&lt;/span&gt; (previous word)&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;$&lt;/span&gt; (go to end of line)&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;^&lt;/span&gt; (go to start of line)&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;%&lt;/span&gt; (find matching bracket - you need to be in a Java or C/C++ editor for this)&lt;/li&gt;&lt;li&gt;most navigational keys (&lt;span style="font-style: italic;"&gt;h, j, k, l&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;arrow/pgup/pgdown&lt;/span&gt; keys)&lt;/li&gt;&lt;li&gt;delete commands (&lt;span style="font-style: italic;"&gt;x, dw, d$, dd, db&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;u&lt;/span&gt; (undo)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;In the future, I plan to add support for:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Find commands (&lt;span style="font-style: italic;"&gt;/, ?, *, #&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;Repeat previous command (.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Command count (e.g., &lt;span style="font-style: italic;"&gt;3x&lt;/span&gt; to delete 3 characters)&lt;/li&gt;&lt;li&gt;Other neat vi features&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Text editor (UI) enhancements such as status line, popup dialogs, preference pages, etc.&lt;/li&gt;&lt;li&gt;Help pages&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Members &amp;amp; contributors to the project are most welcome, especially those with Eclipse platform knowledge!&lt;br /&gt;&lt;br /&gt;In the next posts, I will try to document some of the experiences in developing the plug-in, for the benefit of those who might also be interested in Eclipse plug-in development. Stay tuned!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Update (12/05/2007) - Ack.. I forgot to set the compiler level to 1.5. As a consequence, v0.0.1 will not run on 5.0 JREs. It's fixed now in v0.0.2]&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-2573177698043896160?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/2573177698043896160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=2573177698043896160' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/2573177698043896160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/2573177698043896160'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2007/12/vi-plug-in-for-eclipse.html' title='vi plug-in for Eclipse'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-9174918755200892941</id><published>2007-12-02T03:34:00.000+08:00</published><updated>2007-12-05T00:24:31.351+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>Build-averse</title><content type='html'>After reading this &lt;a href="http://software.ericsink.com/entries/java_eclipse_3.html"&gt;blog entry&lt;/a&gt;, I had a personal &lt;a href="http://www.m-w.com/dictionary/epiphany"&gt;epiphany&lt;/a&gt; of sorts (or &lt;a href="http://www.urbandictionary.com/define.php?term=epiphanot"&gt;was it&lt;/a&gt;?). I realized that one of the reasons I love using Eclipse is: &lt;span style="font-style: italic;"&gt;I hate building&lt;/span&gt;. Well, not really hate. It's just that, sometimes, I consider it a part of "noise" in the signal-to-noise of writing software. Or, maybe I'm just too lazy. Or, I just didn't know how useful (and perfectly natural) having a continuous build would be.&lt;br /&gt;&lt;br /&gt;Most probably it's all of the above :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-9174918755200892941?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/9174918755200892941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=9174918755200892941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/9174918755200892941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/9174918755200892941'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2007/12/build-averse.html' title='Build-averse'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-8263190340377051345</id><published>2007-11-29T19:03:00.000+08:00</published><updated>2007-12-02T03:21:29.735+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='cdt'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>What's out and about, Nov. 29 2007</title><content type='html'>&lt;div  style="font-family:verdana;"&gt;&lt;span class="961275105-29112007"  style="font-size:100%;"&gt;Hidden under the  myriad of Android &lt;a href="http://code.google.com/android/documentation.html"&gt;docs&lt;/a&gt; is a gem for  anyone writing embedded Java applications: &lt;a href="http://code.google.com/android/toolbox/performance.html"&gt;Writing Efficient  Android Code&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt; &lt;div  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt; &lt;/span&gt;&lt;/div&gt; &lt;div  style="font-family:verdana;"&gt;&lt;span class="961275105-29112007"  style="font-size:100%;"&gt;While some of the  concepts there presented would make many a software architect/OO practitioner  cringe (&lt;a href="http://code.google.com/android/toolbox/performance.html#prefer_virtual"&gt;Prefer  Virtual Over Interface&lt;/a&gt;?), the writer is careful enough to advise when (or  when not) to do something.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt; &lt;div  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt; &lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="961275105-29112007"  style="font-size:100%;"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-family:verdana;"&gt;And speaking of  gems, I found another &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ptp/doc/presentations/EclipseCon_2007_C_and_C++_Code_Introspection_Using_The_CDT.pdf?root=Tools_Project&amp;amp;view=co"&gt;presentation&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;  that describes how you can use Eclipse &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://www.eclipse.org/cdt/"&gt;CDT&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; to introspect C source code a la DOM.  It even describes how the Eclipse Parallel Tools Platform (&lt;/span&gt;&lt;a style="font-family: verdana;" href="http://eclipse.org/ptp"&gt;PTP&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;) project used it to implement some neat  features such as barrier analysis, call graph, and identifying potential  deadlocks. Pretty exciting for me... having a DOM AST available opens up a lot  of possibilities. Think code metrics, static code analysis, visualization, &lt;/span&gt;&lt;a style="font-family: verdana;" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181493"&gt;refactoring&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;,  etc. integrated into the same IDE in which you write the code.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-8263190340377051345?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/8263190340377051345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=8263190340377051345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/8263190340377051345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/8263190340377051345'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2007/11/whats-out-and-about-nov-29-2007.html' title='What&apos;s out and about, Nov. 29 2007'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-325091030294383992</id><published>2007-11-28T12:50:00.001+08:00</published><updated>2007-12-02T03:22:07.045+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='rap'/><title type='text'>What's out and about, Nov. 28 2007</title><content type='html'>&lt;div  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="695511502-28112007"&gt;&lt;a href="http://code.google.com/android/index.html"&gt;Android&lt;/a&gt; is out and has been  generating a lot of buzz. Ahh.. what having an extra &lt;a href="http://code.google.com/android/adc.html"&gt;$10 million&lt;/a&gt; wouldn't do for  your platform. ;-)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="695511502-28112007"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="695511502-28112007"&gt;&lt;br /&gt;Personally, I like  the fact that the main development environment is &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt;, but I guess it also makes a lot of  sense for Google. It's free, it's powerful, it's mature, it's open source, and  it has an excellent plug-in architecture that lets anyone add features quite  easily. (Quite the fanboy, I am, eh?) &lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="695511502-28112007"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="695511502-28112007"&gt;&lt;br /&gt;Speaking of Eclipse,  its Rich Ajax Platform (&lt;a href="http://www.eclipse.org/rap"&gt;RAP&lt;/a&gt;) is also  out and is pretty exciting. It lets you write rich Ajax applications using Java  and also leverage the powerful OSGi capabilities of Eclipse. That means reusable  components (and Eclipse itself has some very good ones such as JFace, EMF,  etc.), and some very powerful IDE support. In fact, some RCP applications  can be easily ported to a web (RAP) application with some minimal  modifications. Personally, this is great news&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="695511502-28112007"&gt; since I don't really have  any kind of &lt;em&gt;code-fu&lt;/em&gt; for JavaScript.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="695511502-28112007"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="695511502-28112007"&gt;For some demos on  what RAP can do, see &lt;a href="http://www.eclipse.org/rap/demos.php"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-325091030294383992?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/325091030294383992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=325091030294383992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/325091030294383992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/325091030294383992'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2007/11/whats-out-and-about-nov-28-2007.html' title='What&apos;s out and about, Nov. 28 2007'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-466034306372559694.post-1803408867912013458</id><published>2007-11-27T18:36:00.000+08:00</published><updated>2007-11-27T19:12:26.185+08:00</updated><title type='text'>The Obligatory First Post</title><content type='html'>Might as well get it over with :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/466034306372559694-1803408867912013458?l=publicabstractvoid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://publicabstractvoid.blogspot.com/feeds/1803408867912013458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=466034306372559694&amp;postID=1803408867912013458' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/1803408867912013458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/466034306372559694/posts/default/1803408867912013458'/><link rel='alternate' type='text/html' href='http://publicabstractvoid.blogspot.com/2007/11/obligatory-first-post.html' title='The Obligatory First Post'/><author><name>Ron</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://photos1.blogger.com/blogger/3990/908/320/bobmarley.jpg'/></author><thr:total>0</thr:total></entry></feed>
