Installing XPath Explorer on NetBeans for Mac OSX

24 12 2008

I have only found this documentation on installing xpath explorer on netbeans, therefore I’ll give a little more info for mac osx (it’s easy but you have to search a little).

1. download the xpe-netbeans.jar file (from the xpe project download page).

2. place the xpe-netbeans.jar file in your NetBeans module lib dir, the following worked for me:
/Applications/NetBeans/NetBeans 6.5.app/Contents/Resources/NetBeans/platform9/lib

3. restart NetBeans and you should see the following menu option: Tools > XPath Explorer.

Adapt these instructions for your NetBeans installation path and version number if different.





vi search pattern for replacing line numbers in code snippet

19 12 2008

This is a useful search and replace pattern for deleting the line numbers in a code snippet…

use this command in vi (the unix based txt editor):

%s/^[0-9][0-9]\s*//g

this will delete (replace pattern with nothing) all the line numbers in the following code snippet (thus cleaning it and allowing you to compile it without first manually editing every line):

...
03 import java.util.List;
04 import java.util.ArrayList;
05 import java.util.Iterator;
06
07 public class Todo {
08 private String name;
09 private String note;
...