Emma has an Eclipse plugin for running code in a workspace. Emma also allows you to instrument standalone code (like that deployed to a web application) and view the results. I don't know of a way to view those results in Eclipse.
Download Emma plugin from the internet. Place in your eclipse dropins folder. Restart the eclipse. Emma is used for Generating code coverage report. For this you need to write JunitTest cases.
Write few Junit test cases for you classs. After restarting Eclipse ( after dropping plugin), you can see one icon on eclipse near to debugger icon. Click on that icon, you will get the drop down of your Junit class what you have runned previously.