A few days ago, I created a new icon using my rudimentary graphics skills:
I was inspired by my recent ‘Open Contacts‘ work (I hope the icon quality is good enough, noone seems to take me up on my GraphicsZilla idea ;p)… and now that I had the icon completed, I released my code so you have a pretty menu and toolbar entry:
How did I do this? Well, I could’ve been lame and used
actionSets, but I decided to try out the new Platform Command Framework because I’m a big fan of learning new things. After looking at the wiki page, I was a bit depressed at first because it looked like a lot of work to get my pretty little icon where I wanted it 🙁
Never fear though, PDE was there for me like always with a new template for the 3.3 edition.
After looking at the code generated by the template, I had a better idea of how to work with the new command and menu story. The trickiest part was the locationURI attribute on the org.eclipse.ui.menus extension point. For the menu entry (pictured above), the locationURI was
menu:navigate?after=open.ext3, which means insert me into the navigate menu (see
IWorkbenchActionConstants for valid identifiers) after the open.ext3 group. For the toolbar entry, the locationURI was different,
That wasn’t too bad right :)?
On a side note, as part of my “not to gain a ton of weight while working in the software industry” diet, I like to bike about ~100 miles (~160 km) a week. In the Texas summer heat (100F / 37C), nothing is more precious than cold water for me 🙂 These new polar insulated water bottles seem to do a really good job keeping the water cold for a typical 2-3 hour ride in high heat.