Thursday, August 25, 2016

Oomph 03: Our First Project Setup

We are going to prepare our first project setup with Oomph.

Source code for this tutorial is available on github as a single zip archive, as a Team Project Set or you can browse the files online.  

For a list of all Oomph related tutorials see my Oomph Tutorials Overview.

Step 1: A basic setup file

Of course Oomph setups can be created within eclipse. So start with a new General/Project named com.codeandme.oomph. Now create a new Oomph / Setup Project Model. The wizard will setup all kinds of default tasks for us, but we want to start from scratch to understand all the tasks involved.

So select a Simple Project, provide a Label "Code and me" and Finish the wizard.


The setup file created simply contains a root node for the project and a default stream named Master.


Not much of a setup yet, but we can already add it to our eclipse installer.

Step 2: Adding the setup to the installer

Launch the eclipse installer from our first tutorial, select an eclipse product and advance to page 2 of the wizard. There hit the + icon on the toolbar, select Browse File System and select the setup file we just created. The setup will be added to the <User> node. Not much sense installing our empty setup yet, but now the installer references our setup file and we can test it for each step we add. On each start of the installer the setup file gets reloaded, so you do not have to add the file each time you want to test it.

Step 3: Adding a simple ini file action

One of the simplest actions to add is an ini file adjustment. As you might guess this adds entries to the eclipse.ini file provided with your product installation. Select the Code and me node in your setup, then use the context menu to add a New Child / Eclipse ini task. Now we are going to adjust the task using the Properties view.

To change the initial heap size of your Java VM set Option to -Xms, Value to 1024m and VM to true. The last parameter is needed for all Java VM properties. Set it to false when changing any eclipse.ini properties like -showsplash or similar.

Make sure to provide a unique ID and a usable Description. The IDs are important when we want to refer to a node later in our setup.


Step 4: Add folders to structure your settings

When we start adding multiple ini tasks we should cluster them. Therefore add a new Compound item to your root node and D&D your ini settings in there. Compounds add more structure to your setup, but have no effect on the installation process.

Optional: Investigate common tasks

The scheme for adding new tasks is the same for all kinds of things. Add a node, adapt its properties, save and run your setup to test it. Good sources for tasks are the existing eclipse project setups. You may browse them by opening the catalog from the toolbar or from the main menu: Navigate / Open Setup / Parent Models / Catalog Index. We will have a closer look at dedicated tasks in the following tutorials.

Thursday, August 4, 2016

Regular Expression Tester

There are quite a lot regular expression tester utilities available for Eclipse. While all of them do a good job my favorite is RegExTester.

This project has not seen any updates for more than 2 years now, so some of you might consider it discontinued, I call it rock stable!

While working on my Oomph tutorials I found it really annoying that this little tool does not come with a p2 update site, so I created one and put it online. Feel free to use it for your own installations.

P2 site:

https://dl.bintray.com/pontesegger/regextester/