Here is an early alpha version of Contest helper plug-in for Intelli Idea
What this plug-in does:
- Inline classes from your library into single file
- Eliminates unused code from it
- Stores tests and then you can test your solution on all of them with one click
Known bugs:
- Sometimes "Delete task" do not delete .task file. You can do taht manually
- Do not removes unused methods that are cyclically called
- Never removes method that implements interface/overriding super method if class is retained and super class is retained
- Never removes main method no matter what signature it has
- Do not supports static imports
Plug-in is supplied with project that has structure needed for this plug-in. It also contains 3 sample tasks - 2 plain and 1 TopCoder style
How to use:
- Add plug-in buttons on main toolbar (Customize Menus and Toolbars -> Main Toolbar -> Add after... -> Plug-ins -> Contest helper)
- Press "New Task".
- New class will be created where you must implement solve interface. Arguments for this interface are test case index (1 based), InputReader and PrintWriter. You may extend capabilities of InputReader by editing corresponding class in utils module
- "Edit test" allows you to add and edit tests for current task
- When you want to run or debug code on your tests push "Run Task" button. After it finish it work you may run one of predifined configurations (Run - for running created file from module test and Debug - for debugging in module main/lib. Same with Tester runs/debugs on tests you enetered)
- You need to do "Run Task" every time you entered new test/before submitting to server (it is advised to do it after each change to avoid forgetting doing it before submitting)
- You need to submit file "Main.java" from module test to server
Your library classes must be in module library in non-default package.
Links for download:
Source code is here. It is pretty dirty
Any feedback appretiated
Update: installation - put plug-in file to dirrectory %user dir%\.IntelliJIdea10\config\plugins and restart Idea
Update 2: Next version released. If you allready downloaded prohect you only need to copy files main/Tester.java, test/Tester.java и utils/main/net/egork/utils/checker/Checker.java
Changes:
Button Restore Task restroes choosen task from package unsorted
Task file is synchronised with disk before Run Task
You can add tests from code using generateTests method of checker
You can test only on subset of tests - pass their number as command line arguments
Update 3: Small uncritical fix released. You only need to update plug-in, no changes to project
but I do not know how to use it .... does it can use as a normal TopCoder Plug-in?.
... or a Tools ..in other way..
and does it has a cpp version ..?