Blackberry Javascript Extension using an external library

I have a BlackBerry WebWorks project that needed to use Omniture reporting. Since Omniture already have an library for BlackBerry, I’ve decided to create an JavaScript Ext that would expose that functionality to the web application.

The only thing that you need to do differently from creating another regular JS Ext is that you need to include a new “<dependencies>” tag in the library.xml file, with the relative location of the external library.
Here it’s the example:

<library>
  <extension>
   <entryClass>xxx</entryClass>
  </extension>
  <features>
   <feature id="xxx" version="1.0.0" >XXX</feature>
  </features>
  <dependencies>
   <jar path="omni.jar" />
  </dependencies>
 </library>

Revert modifications from a git project in Eclipse IDE

Something that I’ve missed when I switch from SVN to git was subeclipse:(

I’m using eGit, but it lacks support for doing a simple task like reverting modifications from a specific file.

eGit without reverting
eGit without reverting

Even though I’m getting use to those simple command line scripts a simple thing like reverting modifications from a specific file is kind of tedious, and this is something that I could handle in the IDE.

To simplify this procedure I’ve created a simple bash script (revert.sh):

#!/bin/bash
# @author Daniel Botelho <botelho.daniel@gmail.com>
# @date 2010-05-19
workspace_loc=$1
project_name=$2
selected_resource_path=$3
git=/usr/bin/git
cd $workspace_loc/$project_name
#echo $git status

#$git status

length=”${#project_name}”+2;
echo $git checkout ${selected_resource_path:length}
$git checkout ${selected_resource_path:length}
echo “completed.”

Then I’ve created a new External Tool Configuration to call this simple script (Run>External Tools> External Tools Configurations…>)

new_ext

Screenshot-External Tools ConfigurationsHere you should change your “Location” to the location where you have your “revert.sh” script.

Ok, and it’s done! :)

Now I can choose the file that I want to revert and click on “Run revert modifications (git)” right from the eclipse IDE.

run

Subclipse 1.4.7 in Eclipse 3.4 (Ganymede) using Ubuntu 8.10

Since I’ve made a Fresh Ubuntu install in my laptop, now I’ve to setup the environment so I can do some working in the laptop ;)

The company that I’m working now only uses PHP, so the production IDE that I use is Eclipse PDT. The great thing about Eclipse, is it’s huge plugin repository, and the one that’ll be talking here is the Subclipse.

Subeclipse is on 1.4.7 version and it’s a great SVN plugin (the only one I know ;)).

Installation Instructions

This installation instructions are based on Download and Install with the difference that here I’ll be showing Subclipse installation process for Eclipse 3.4 (Ganymede) and screens were captured in Eclipse 3.4.0 running on Ubuntu 8.10.

Step 1:

Begin the installation from the Eclipse Help menu item.

Software Updates
Software Updates

Step 2:

This screen will vary depending on the features you have installed already. You want to click on the New Remote Site button. If you are behind a proxy and the Eclipse install mechanism does not work, then you can download a zipped version of the update site and then click the New Local Site button instead.

Software Updates and Add-ons
Software Updates and Add-ons

Step 3:

This screen is showing the Add Site dialog, filled in with the correct information to install Subclipse 1.4.7 (url: http://subclipse.tigris.org/update_1.4.x)

Add Site
Add Site

Step 4:

When you first come back to this screen, the site you added will NOT be selected. Be sure to select it before clicking Next.

Install
Install

Step 5:

This next screen shows all of the features that are available to install.

Confirm Install
Confirm Install

Step 6:

Click the button to accept the license agreement.

Confirm
Confirm

Step 7:

Eclipse needs to be restarted after installing Subclipse.

Restart
Restart

Step 8:

Finally, after restarting Eclipse, you can do Import and checkout a Project from SVN

Import
Import