My life became easy ever since I run NS3 from Eclipse. The procedure is easy counter the one described here. You need only two steps:
1) Open New External Configuration, add ${workspace_loc:/ns3dev/waf} (in my case waf is in ~/ns3dev/waf)
2) Specify working directory i.e., ${workspace_loc:/ns3dev/}
3) Open examples/tutorial/first.cc and press external configuration button. Input "first" to dialogue box.
Thats it, :).