EclipseCoder

NOTE: Eclipse together with the embedded TopCoder applet is memory hungry - eclipse will need more memory allocated than the default value, or crashes and slowdowns can be expected. See e.g. How do I increase the heap size available to Eclipse?.

About

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

Screenshot of EclipseCoder in action

Requirements

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

Installing

Use the following update site to install EclipseCoder (note that the trailing slash is important):

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.

News

2014-06-15 - Improved support for java 8
Java 8 is now also used when the feature patch for eclipse 4.3.2 is installed, and the check is done if eclipse knows about a VM installation instead of against the currently running one. Contributed by Francisco Moraes. Plugin version:
  • net.fornwall.eclipsecoder.javasupport 0.2.10
2014-06-02 - Support for java 8, and fixes to match editorial and submission fetching
Java 8 support requires eclipse 4.4 running in a java 8 VM. Plugin versions:
  • net.fornwall.eclipsecoder.javasupport 0.2.9
  • net.fornwall.eclipsecoder.archive 0.3.6
2014-03-31 - Update the python support plug-in to work with modern versions of PyDev
Plugin versions:
  • net.fornwall.eclipsecoder.pythonsupport 0.2.3

Show older news

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.

Feedback

Comments, ideas and bug reports can be sent to fredrik@fornwall.net 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.