EclipseCoder
EclipseCoder is an Eclipse plug-in to be used while competing or practicing at the TopCoder online algorithm competition. Its main features are:
- Embedding of the contest applet inside eclipse.
- Eclipse project generation from problem statements.
- Support for code templates.
- Generation of test code into a separate unit test file.
- Support for C++, C# and Java while competing or practising.
- Support for Python while practising by converting projects.
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.
- 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
Hide older news
- 2007-12-04 - Add option to disable timeouts in generated test cases
-
- Since the timeouts used in generated JUnit test cases may prevent debugging, an option was added to the EclipseCoder java preference page to disable them.
Plugin versions:
- net.fornwall.eclipsecoder.javasupport 0.2.4
- 2007-11-01 - JUnit 4, assertions
-
- Use JUnit 4 for generated tests and launch configuration. This allows timeouts to be used: @Test(timeout=2000).
- Enable assertions (-ea as VM arg) when creating the launch configuration for the generated tests.
- Thanks to Javier Kohen for input and help.
Plugin versions:
- net.fornwall.eclipsecoder.javasupport 0.2.3
- 2007-08-06 - Two small fixes
-
- Replace & with & when viewing problem submissions - (thanks pinting).
- Do not post-process (remove comments and System.out.println() calls) java source code on submission. It confuses people and there seems to be a problem with it (thanks Igor).
Plugin versions:
- net.fornwall.eclipsecoder.archive 0.3.1
- net.fornwall.eclipsecoder.javasupport 0.2.2
- 2007-07-24 - Bugfixes for download and login problems
- Two bugs have been fixed:
- Failed or aborted downloads could in some cases prevent a new download.
- Problems at login time ("could not verify..").
Plugin versions:
- net.fornwall.eclipsecoder 0.3.1
- 2007-06-25 - Removal of features & applet distribution changes
- According to TopCoder wishes, the following changes have been made:
- Applet distribution: The applet is no longer distributed with the plug-in but downloaded on first use and thereafter updated on demand - this solves the issue with the applet version lagging behind.
- Task automation: For fairness, the single-click submission from inside eclipse has been removed. Submission should now be done from inside the arena applet just as with any editor plug-in.
- Problem archive: It is no longer possible to download problem statements from the online problem archive.
Plugin versions:
- net.fornwall.eclipsecoder 0.3.0
- net.fornwall.eclipsecoder.archive 0.3.0
- net.fornwall.eclipsecoder.contestapplet - this plug-in is no longer used and should be removed
- 2007-06-02 - Applet update
- After being broken for a while the plug-in should work again by updating the below plug-ins.
- net.fornwall.eclipsecoder 0.2.8
- net.fornwall.eclipsecoder.contestapplet 5.48.0
- 2007-03-30 - Problem archive updating fix
-
The parsing of the problem list in the problem archive plug-in has been made more robust which makes downloading the problem list from the TopCoder problem archive work again. A minor optimizations for this operation has also been made.
- net.fornwall.eclipsecoder 0.2.7
- net.fornwall.eclipsecoder.archive 0.2.2
- 2007-03-25 - HTTP tunneling fix
-
The HTTP tunneling option specified in the applet login screen was broken until now. Also, the bundled version of the contest applet was synced to version 5.43.
- net.fornwall.eclipsecoder 0.2.6
- 2007-03-22 - Java project generation improvements
-
The way the JUnit dependency was specified in generated projects has been updated since the previous way is deprecated in eclipse 3.3. JUnit 4 is now used. Also, the java build settings (compiler and JRE version) in the generated projects is now set to 1.5 since that is what TopCoder currently uses.
- net.fornwall.eclipsecoder.javasupport 0.2.1
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:
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.
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:
Follow the steps outlined below to use EclipseCoder with the TopCoder contest applet for competing:
- Start up Eclipse.
- Show the Problem Statement view (Window → Show View → Other → EclipseCoder → Problem Statement).
- Start the TopCoder contest applet from inside Eclipse by pressing the TopCoder logo (
) in the toolbar of the above view.
- 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.
- 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.
- Submit the solution by using the normal TopCoder arena applet controls (Compile and Submit).
Using the Create new project icon (
) a variant of the current project can be created - useful for trying out a different approach or another language.
EclipseCoder has basic code template support. The code template can be edited through an Eclipse preference page (Window → Preferences → EclipseCoder 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.
As seen above the timeouts in the generated JUnit test cases can be disabled since they may interfere with debugging.
Follow the steps outlined below to use EclipseCoder to view old submissions:
- Once only: Enter your TopCoder member account username and password under Window → Preferences → EclipseCoder.
- Show the Problem Archive view (Window → Show View → Other → EclipseCoder → Problem Archive) if it is not already visible.
- 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.
- Double click or right click on a problem to download the list of submissions.
- Double click on a submission in the Submission List view to view a submission.
The source code is available under the Apache License 2.0 through the project subversion repository.
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.