Posts

Showing posts with the label Eclipse

Download Java Dependent Jars using Maven

To add Java Sources and Javadocs to the maven repository (basically so that you can explore via Eclipse or other IDEs), please refer to: http://tedwise.com/2010/01/27/maven-micro-tip-get-sources-and-javadocs/

Android/Java Static Code Analysis Tools

Java/Android compilers in itself are very good and give very good warnings to inform about various issues/things done wrong. Just thought about trying free Static Code Analysis Tools and found the below: FindBugs PMD All have eclipse plugin urls, so you can add the URLs at the software site link and easily add the plugins. FindBugs Damn good tool. Install the plugin and then right click on a java/android project. You will find FindBugs Menu. Just click on FindBugs and it gives a very good overview of the review bugs in it's own perspective. Each of the bugs is categorized by the pattern (you can change the categorization in the toolbar) and it lists all the occurrence of that type in all files in the project under that.  Clicking on it, it gives a very very good description about what the error is and why that is considered to be an error. It indicates if its just a suggestion or performance issue or style issue.  Some of these were quite new f...

Copy logcat output

If you want to copy the message from logcat and not the other fields like Time, pid, Tag etc, then you can use the command line option. (Eclipse doesn't allow copy of the messages column alone). ./adb -s logcat -v raw raw removes all the information except the messages and prints it out.

Unknown error on eclipse android console

Not sure what the below means: local emulator[343] : kCGErrorIllegalArgument: CGSGetDisplayBounds (display 2b3c4d11) Googling doesn't return any worthwhile links too.

Eclipse: Removing Todo: Auto-Generated comments

When you use Eclipse menus to create new class, constructor, method or even add a try/catch, typically it not only generates the functionality but also adds a TODO. This is good to indicate that the comment has to be replaced with a proper functionality. However in a team environment, it's not easy to make people delete the line and add the code. Task remains and it becomes difficult to delete it at the end. To remove the auto addition of that comment line, you have to follow the below steps: Goto Window -> Preferences -> Java -> Code Style -> Code Templates Click on Method Body. Click Edit. Remove the commented line. (Something like: // ${todo} Auto-generated method stub) Click Apply. Repeat the steps for other elements. Click save.

Eclipse: Removing Todo: Auto-Generated comments

When you use Eclipse menus to create new class, constructor, method or even add a try/catch, typically it not only generates the functionality but also adds a TODO. This is good to indicate that the comment has to be replaced with a proper functionality. However in a team environment, it's not easy to make people delete the line and add the code. Task remains and it becomes difficult to delete it at the end. To remove the auto addition of that comment line, you have to follow the below steps: Goto Window -> Preferences -> Java -> Code Style -> Code Templates Click on Method Body. Click Edit. Remove the commented line. (Something like: // ${todo} Auto-generated method stub) Click Apply. Repeat the steps for other elements. Click save.

Open javadoc in external browser - Eclipse

Solution: http://stackoverflow.com/questions/4413883/how-to-open-attached-javadoc-in-external-browser Should we do this for each workspace?

Opening multiple instances of Eclipse on mac.

Double clicking on eclipse icon always opens the same instance on MAC. To solve this, you can open terminal (Command-Space to launch spotlight. Type in terminal and click on the top hit/Terminal link). Cd to the place where you unzipped eclipse. For .e.g,  Eclipse/Eclipse.app/Contents/MacOS/ Then run  eclipse &. (& makes sure you run eclipse in background, so that you can kill the terminal window.).