Optimizing Software Development
RSS icon Email icon Home icon
  • Code Quality in Eclipse

    Posted on January 11th, 2007 levent.gurses 3 comments

    Paul Duvall published a new article in developerWorks where he talks about a set of Eclipse plugins focussed on helping developers in key areas such as coding standards, code duplication, code coverage, dependency analysis and complexity monitoring. He outlines steps to download and install the plugins and provides visual step-by-step instructions on how to use them.

    Paul writes, “Using Eclipse plugins shouldn’t preclude you from using these inspection tools as part of the build process. In fact, you want to ensure that the rules followed using the Eclipse plugins are the same rules applied to your build process.” I would add to this that each Eclipse project file should be checked-in to your code repository and special care should be taken to make the project file machine and platform independent. The classpath in the project should reflect the same set of JARs as the ones used by your build system. This is not that difficult to maintain, but it is crucial that each developer uses both Eclipse and the build system before checking-in his/her changes.

    One more note. In addition to the plugins outlined in Paul’s article there are a few more interesting plugins that can help you get a different view of your code. One such plugins is Simian. You can follow the following steps to download and install Simian:

    1. From the Help menu in Eclipse, select Software Updates | Find and Install.
    2. Select Search for new features to install and click Next
    3. Click New Remote Site. In the dialog enter the name Integility and the URL http://www.integility.com/eclipse then click OK
    4. Ensure that the Integility entry in the list is ticked then click Next.
    5. Select the latest version of the Simian UI feature and click Next.
    6. Review the license agreement and (if you agree to) accept it and click Next.
    7. Choose the install location, this will usually be your main Eclipse directory. Click Finish.
    8. After downloading, Eclipse will show a warning about unsigned code. Click Install if you wish to proceed with installation.
    9. Restart the workbench when prompted.

    Another interesting plugin is the Code Analysis Plugin (CAP). It features:statsChart small

        • Data visualization
        • Package and class dependency analysis
        • Look and try to identifies weakness in the architecture
        • Analyze OO attributes such as:
          • Encapsulation
          • Architecture
          • Package structure
          • Reusability
          • Maintainability
        • Extendable (extend with your own plugins)