Posts tagged with : eclipse

Change default author name for JavaDocs in Eclipse


The auto generated Java docs at the class level picks the user name from the system user. This could result in weird author names in your code files as in an organization usernames are usually as per organizational naming conventions. For example my user name that I use to login is something like SK0012345 and you will agree that it wouldn’t look good as an author name in a Java file and might not make any sense to most other viewers of the code.

/**
 * Test default author in JavaDocs
 * @author SK0012345
 */
public class TestClass {
}

Here is a quick way to change the default author name in your Eclipse projects. Simply edit your eclipse.ini file found in the root directory where you placed Eclipse. I have Eclipse at C:\devtools\development\eclipse, so my path would be C:\devtools\development\eclipse\eclipse.ini. Once editing this file add the following line and save.

More...


Remote debugging in Eclipse


To debug your application on JBOSS server you would need to enable the debugging on your JBOSS application server. By default it is turned off. In order to set jboss app server to be running in debugging mode, you should uncomment following line in “jboss-5.1.0.GA/jboss/bin/run.conf”

like this:

#Sample JPDA settings for remote socket debugging
JAVA_OPTS=”$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,serve 

Once done you can configure your eclipse remote application debugger on port 8787 and start debugging your application.

Happy debugging !!


Skip over certain classes when using Step Into(F5) in Eclipse’s debugger


Whenever I use the Step Into feature (F5) in Eclipse’s debugger, I’m mainly interested in stepping through code in my own classes, not the ones from external libraries or even Java classes.

For example, there’s almost no reason to ever want to step into Spring’s code or proxy classes (other than to learn more about them or maybe debug a potential bug in Spring). And normally I’m not interested in Java util classes (eg. ArrayList). This also goes for Hibernate, Apache Commons, Google and many other external libraries.

Fortunately, Eclipse makes it easy to specify which classes to skip by allowing step filters. This makes it easier to focus on your own code and also keeps your editor area clean since Eclipse won’t be opening classes in separate editors all the time.

More...


Using Eclipse effectively


To ensure that the code that you write is always clean and complaint to your project specific coding standards and guidelines, it is important that you configure your eclipse to effectively use its compiler settings, Formatter, CheckStyle and related built in features. Most developers wouldn’t bother to do so but trust me that it is huge time saver in long run and shall always keep your code quality under check.

Following spread sheet has the configuration that we use in our current projects. You can customize these settings according to your development standards and needs.

Also ideally your Eclipse should be configured with your “code formatter” and “CheckStyle” XML configurations.

More...


Troubleshooting eclipse issues


Following are some tips that shall help you in avoiding potential issues and for being a little more productive while working with eclipse.

  • Avoid installation problems

    Never install a new version of Eclipse on top of an older version. Rename the old one first to move it out of the way, and let the new version be unpacked in a clean directory.

  • Recovering your messed up workspace

    Corrupted workspace is a common occurrence and troublemaker for many developers. So If your Eclipse installation has startup errors or a corrupted configuration, it might be time to get a fresh start. Start Eclipse with the –clean option, and all cached framework and runtime data will be cleared out. This often helps fix plug-in issues and improve general stability.

More...


Visit the archives!