Key Information

Register
Submit
The challenge is finished.

Challenge Overview

This component is a new plug-in for Eclipse 3.5.x which helps a Java developer to identify and change legacy Java code to take advantage of Java Generics which were introduced in Java 1.5.  This plug-in will find un-typed Java Collections and return results in a Search Results View, and when the individual results are double-clicked, the Java file will open in an editor with the editor auto-scrolled to the selected result.

This design uses the regular expression to search the un-typed collections. A new context menu command is added, while the Eclipse existing file search facility is re-used to actually perform the search and show the results.

The following are the advantages and limitations identified for this design.

Advantages:

The design utilizes the Eclipse existing file search facility, thus the search results will be shown as the standard search feature of Eclipse, which means:

  • All the user-friendly features for handling the search results mentioned in the requirement are already supported and are directly re-used by this component.
  • Development effort for building the custom views and search result processing will be saved.

Limitations:

In order to use the existing text search facility, regular expression is used for the searching. It means that there will be some inaccuracies, for example:

  • If in a Java file there’s a quoted String containing the collection names in a context similar to an un-typed collection, it will be also included in the search results.
  • If custom classes have the same names as the JDK collection classes, they will also be checked and may be included in the search results.
  • If developers declare variables, fields, or methods with the same names as the JDK collection classes, they will be included in the search results. But this shouldn’t happen as it violates the Java convention.

NOTE: The regular expression fragments are externalized as preferences, thus it is convenient to improve the searching accuracy by changing the regular expression fragments.



Final Submission Guidelines

N/A

ELIGIBLE EVENTS:

2012 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30019885