Java

Very Useful Shortcuts for Eclipse

Who uses eclipse already knows how fantastic this great IDE is. Here I want to provide a table with the shortcuts I use almost ever when I develop in Java. Action Shortcut Toggle Comment Ctrl+7 Show Tooltip F2 Format Code Ctrl+Shift+F Indent Line Ctrl+I Duplicate Lines Down Ctrl+Alt+Down Arrow Duplicate Lines Up Ctrl+Alt+Up Arrow Delete Next Line And Move Below Code Up Ctrl+D Delete Next Word Ctrl+Delete Delete Previous Word Ctrl+Backspace Delete Line Ctrl+Shift+Delete Insert Line Above The Current One Ctrl+Shift+Enter Insert Line Below The Current One Shift+Enter Move Lines Down Alt+Down Arrow Move Lines Up Alt+Up Arrow Next Word Ctrl+Right Arrow Previous Word Ctrl+Left Arrow To Upper Case Ctrl+Shift+X To Lower Case Ctrl+Shift+Y Shortcut for System.

How to attach source or Javadoc to Java Enterprise Edition API in Eclipse

Eclipse is a great IDE. When you hover your mouse over a class name or method of the Java SE API you get a contextual help for that class or method. However if you do the same thing over a Java EE class, such as HttpServletRequest you might not get the same effect. This is because there’s is no source or Javadoc attached to that class. To attach the documentation to your J2EE class as well you can follow these steps:

How to exclude subversion hidden directories (.svn) using Ant

Many Java developers already know that Ant is a great build tool. Besides a build tool you also need a good version control system to manage the various versions of your code. For this purpose I often use Subversion. Now, there might be time when you need to exclude the Subversion hidden directories from, for example, a backup Ant target you built. To do that you just need to use the following attribute to your zipfileset or other directory-based task: