Essential Plugin: Platform ‘Core Tools’

I wanted to mention another Essential Eclipse Plug-in: the Eclipse Platform Team’s ‘Core Tools’.  I consider it essential to my work based on its inclusion of a single tool: “Find Unreferenced Members”.

Armed with this tool and some unit tests, you can really clean up some code.

Plug-in developers are the primary audience for ‘Core Tools’.  It contributes tools for validating plug-ins/class loading and Eclipse metadata browsing.  You can find more info on its capabilities here: http://www.eclipse.org/eclipse/platform-core/downloads/tools/readme.html.

The essential tool to any Java developer is “Find Unreferenced Members”.

  • Right click on a project, package, or file.
  • Select “Find Unreferenced Members”.
  • A Search view appears with member candidates for removal.
  • Note the matches are only a good set of candidates.  The tool analyzes the Java code in your workspace to determine unused members.  There may be false candidates.  For example, a no-arg constructor might be unreferenced, but as any plug-in developer knows, it’s required if the class is instantiated via plug-in.

The update site is here: http://www.eclipse.org/eclipse/platform-core/downloads.php#updates.

Update: It’s now here:  http://eclipse.org/eclipse/platform-core/updates.

Advertisements

4 comments so far

  1. Chris Aniszczyk on

    I’ve also had some success using UCDetector with a variety of projects.

    http://www.ucdetector.org/

    I think FindBugs has some similar support too…

    • Scott Kellicker on

      Thanks Chris, I’ll check out UCDetector.

      Personally, I’ve found FindBugs a bit time consuming to set up and tune to get reasonable results. But it’s been several years since I tried it.

  2. Lars Vogel on

    A while ago I implemented a similiar feature. You find a description here: http://www.vogella.de/blog/2009/07/15/find-unused-methods/

    Can the the core tools run on a project level? If I remember correctly they did only work on individual class level.

    • Scott Kellicker on

      Thanks, Lars. I like the tutorial approach to presenting it too.

      BTW, the core tools do run on a project, package or class level.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: