EclipseCoder

About

EclipseCoder is an Eclipse plug-in to be used while competing or practicing at the TopCoder online algorithm competition. Its main features are:

NOTE: Eclipse together with the embedded TopCoder applet is memory hungry - eclipse will need more memory allocated than the default value, or crashes and slow-downs can be expected. See e.g. http://blog.xam.dk/archives/68-Eclipse-and-memory-settings.html.

Screenshot of EclipseCoder in action

News

2008-10-01 - Fix for double[] return type in generated java unit tests
Plugin versions:
  • net.fornwall.eclipsecoder.javasupport 0.2.6
2008-06-13 - Tweaks, cleanups, C# and Python support
  • Lots of clean-up and minor tweaks - fix error log entries, improve thread safety, more robust error handling.
  • Fix code generation of test cases in some corner cases.
  • Do an initial launch of test cases in all languages (just as java did) upon project creation.
  • Add support for C# and Python (see requirements).
  • Add support for creating variants of projects.
  • Require eclipse version 3.3 or newer - 3.2 is no longer supported.
Plugin versions:
  • net.fornwall.eclipsecoder 0.3.4
  • net.fornwall.eclipsecoder.archive 0.3.3
  • net.fornwall.eclipsecoder.javasupport 0.2.5
  • net.fornwall.eclipsecoder.csharpsupport 0.2.0
  • net.fornwall.eclipsecoder.ccsupport 0.2.3
  • net.fornwall.eclipsecoder.pythonsupport 0.2.1
2008-01-06 - Fix auto-logon and error dialog
Plugin versions:
  • net.fornwall.eclipsecoder 0.3.3
2007-12-04 - Store contest applet jar file outside workspace and do not modify contestapplet.conf
  • The TopCoder contest applet jar file was previously stored in the workspace, forcing a new download after each switch to a new workspace. The jar file is now stored in ~/.eclipsecoder if possible.
  • Previously the contestapplet.conf file containing the contest applet preferences was overwritten by EclipseCoder. This is no longer true and one can now switch between normal arena applet and EclipseCoder without applet settings being messed with.
Plugin versions:
  • net.fornwall.eclipsecoder 0.3.2

Show older news

Requirements

EclipseCoder requires Eclipse version 3.3 or newer as well as a Java Runtime Environment version 1.5 or newer. Each language support plug-in has additional requirements:

Installing

Use the following update site to install EclipseCoder:

Note that, besides the core plug-in, a plug-in supporting at least one of the TopCoder-supported languages is needed in order to make any use of EclipseCoder with the contest applet.

Updating

For updates to work correctly, the setting "Valid updates" under the "Install/Update" section of the Preferences page needs to be changed to "compatible" to allow minor version increments. The below screenshot shows the correct setting:

Valid updates needs to be set to 'compatible'

Competing in the contest applet

Follow the steps outlined below to use EclipseCoder with the TopCoder contest applet for competing:

  1. Start up Eclipse.
  2. Show the Problem Statement view (WindowShow ViewOtherEclipseCoderProblem Statement).
  3. Start the TopCoder contest applet from inside Eclipse by pressing the TopCoder logo (TopCoder logotype) in the toolbar of the above view.
  4. Open a problem statement in the contest applet. Note that EclipseCoder only supports using C++ and Java inside the applet, and that the corresponding language support plug-in needs to be installed.
  5. The problem statement will now be sent to Eclipse which will generate a project containing both a source file consisting of a solution stub (which should be fleshed out before submitting) and a test suite file which can be run to test the solution. If java is used, an initial JUnit test run will also be made - use the Ctrl+F11 shortcut to run it again.
  6. Submit the solution by using the normal TopCoder arena applet controls (Compile and Submit).
Showing the EclipseCoder problem statement view

Create variant of a project

Using the Create new project icon (Create new project icon) a variant of the current project can be created - useful for trying out a different approach or another language.

The EclipseCoder Create new project dialog

Configuring

EclipseCoder has basic code template support. The code template can be edited through an Eclipse preference page (WindowPreferencesEclipseCoder and then either C++ or Java). The code template editor should now be shown.

The supported tags are the ones used in the default code template:

$CLASSNAME$
Expands to the class name of the problem.
$RETURNTYPE$
Expands to the return type of the problem.
$METHODNAME$
Expands to the problem method name.
$METHODPARAMS$
Expands to the problem method parameters.
$DUMMYRETURN$
Expands to a dummy return value for the problem method. May be used so that the generated source will initially compile.
Configuring the EclipseCoder code template

As seen above the timeouts in the generated JUnit test cases can be disabled since they may interfere with debugging.

Viewing old submissions

Follow the steps outlined below to use EclipseCoder to view old submissions:

  1. Once only: Enter your TopCoder member account username and password under WindowPreferencesEclipseCoder.
  2. Show the Problem Archive view (WindowShow ViewOtherEclipseCoderProblem Archive) if it is not already visible.
  3. To download the problem statement list from the TopCoder problem archive, choose the Update list action in the pull down menu of the view. This update can also be done later to fetch newer problems.
  4. Double click or right click on a problem to download the list of submissions.
  5. Double click on a submission in the Submission List view to view a submission.
The EclipseCoder problem archive view listing old TopCoder problems

Source code

The source code is available under the Apache License 2.0 through the project subversion repository.

Feedback

Comments, ideas and bug reports can be sent to fredrik.fornwall@gmail.com or filed at the issue tracker at Google Code. The Arena Plugins Discussion forum at TopCoder is available for both general TopCoder and specific EclipseCoder issues.