If you're looking for example code and you have the plugins installed, you can go to file-> new project -> samples -> FRC Java -> GearsBot. The gearsbot example is a great example for command based programming. If you're still having trouble, post your code, and we can figure out what's not working.
Also, check out these videos for command based programming
http://www.youtube.com/playlist?list=PL8FF26A88C6D16C8F