### Egor's blog

By Egor, 6 years ago, translation, ,
1. Installation
You need to download plug-in and configuration. Plug-in should go to %home_dir%\.IntelliJIdea10\config\plugins (if directory plugins is absent you need to create it), also you should include chelper.jar to class path of your project (Project Structure -> Dependencies -> Add Single Entry Module Library...). After that you need to edit configuration (see next section) and put it in project root. That's it — you are all set. For TopCoder you would need moj plugin for Arena, manual and download link is here

2. Configuration
As a general note, if some property in configuration represents a folder you must enter relative path from project root (using / instead of )
inputClass - full qualified name of class used for input (like java.util.Scanner). This class should implement method next that returns String — next token from input — and it should have constructor that takes InputStream as only argument
outputClass - full qualified name of class used for output (like java.io.PrintWriter). Ouput class shoud has constructor, that take OuputStream and one that take Writer as parameter and also method close.
excludePackages - comma separated list of package prefixes. Classes from such packages would not be inlined but rather imported. In most cases you should leave it as is
outputDirectory - directory where full source code would be stored. Should be under source and in default package (for example, if you create standart idea project, "src" spould be ok)
author - content of @author tag in. If empty no author tag would be created
archiveDirectory - directory where tasks would be archived. Should not be under source
defaultDirectory - direcory where tasks would be created by default. Should be under source in non-default package (for example src/my/package)
topcoderDirectory - directory where moj puts its TopCoder stubs. Should be under source in default package (e.g. src)
enableUnitTests - should be true if you want unit tests to be created and false otherwise
testDirectory - directory where tests would be stored. Shoud be under source
After configuration change you need to reload project for changes to take effect

3. Actions
I would recommend to add following actions on main toolbar (Customize Menus and Toolbars... from context menu of toolbar, actions are in Plug-ins->CHelper): New Task, Edit Tests, Archive Task, Delete Task, Create Codeforces Tasks.

New Task (Alt+F2) — creates new task in defaultDirectory
Edit Tests (Alt+F5) — opens test editor

Archive Task (Alt+F6) — archives task (deletes all it files and stores them in archive, also creates unit tests if configured to do so)
Delete Task - deletes task and all associated files
Parse Contest - creates all tasks for particular contest (currently Codeforces, CodeChef, E-Olimp and Timus are supported).

Site Contest ID Problemset task ID Contest task ID
Codeforces contest_id (131) contest_id letter (131 A) contest_id letter (131 A)
CodeChef contest_code (NOV11) problem_code (GCD2) contest_code problem_code
(NOV11 DOMNOCUT)
Timus contest_id (101) problem_id (1000) contest_id problem_number (101 1)
Copy Source (Alt+F8) — copies content of Main.java to clipboard. This is useful for judges that do not support submission of file

4. New Task dialog

Name - task class name
Test type - type of tests — either single test per file, number of tests and then tests themselves or just some tests until some condition is met. You need to throw UnknownError in last case to indicate that there would be no more tests
Input type/Output type - input/output type. Standard — stdin/stdout, Task_id — file input/output with file names %Name%.toLowerCase() + ".in"/".out", Custom — just file input/output, names provided in separate text fields
Heap memory - memory limit
Stack memory - stack size limit (defaults are same as codeforces)

For each task 2 files is creates. In main task class there is one method:
void solve(int testNumber, %input% in, %output% out)
testNumber — 1-based index of test in file
In checker class there are 3 methods:
String check(%input% input, %input% expected, %input% actual)
should return null if answer is correct, non empty string if answer is wrong and empty string to run default checker
double getCertainty()
returns certainty for double comparision in default checker
Collection<? extends Test> generateTests()

For TopCoder tasks the only class would contain method from problem statement. Task would be created automatically when you opens problem in TopCoder client (if moj properly configured)

•
• +29
•

 6 years ago, # |   0 Can I use IntelliJIdea to code in C++ ? Are there some plug-in to do that ?
•  6 years ago, # ^ |   0 Unfortunately, noThere is Objective-C IDE form JetBrains which in beta test yet AFAIR
•  6 years ago, # ^ |   0
•  3 years ago, # ^ |   0 Try CLion by JetBrains, same company that produce IntelliJIdea. Currently it is in Early Access Preview.
•  7 months ago, # ^ |   0 You can try CLion.
•  7 months ago, # ^ |   0 It was created years after I made that comment :)Anyway thanks
•  7 months ago, # ^ |   0 You are welcome.
 6 years ago, # |   0 I have a problem,when go add actions , not show me plugin chelper :(,
•  6 years ago, # ^ |   +1 You either had not copied it to correct folder or had not restarted Idea since
•  6 years ago, # ^ |   0 thanks :=) is cool !
•  4 years ago, # ^ |   0 I installed CHelper from Browse Repository and Restarted the IDE after that I Added All CHelper Icons after Main Toolbar From Menus and Toolbars and I opened Edit Project Settings And When I parse Contest And Press OK NullPointerException And Message null is generated I am not be able install It Correctly plz help me...sorry for my English
•  4 years ago, # ^ |   0 Do you have any project open when you click on "Edit Project Settings"?
•  4 years ago, # ^ |   0 Yes i have one project open which i created ...
•  3 years ago, # ^ |   0 I have had the same problem till I right clicked main directory (Default Folder) and marked it as source, then everything now works. The project originally had only src folder marked as source as it was generated with the commandline project template in intelliJ
•  18 months ago, # ^ |   0 This solved it for me. Thanks
•  3 years ago, # ^ |   0 I have the same problem with IntelliJIdea 14.0.3 and CHelper 3.94. Here is the Stack trace :null java.lang.NullPointerException at java.lang.String.replace(String.java:2227) at net.egork.chelper.util.CodeGenerationUtilities.createStub(CodeGenerationUtilities.java:277) at net.egork.chelper.util.FileUtilities.createTaskClass(FileUtilities.java:302) at net.egork.chelper.util.FileUtilities.createIfNeeded(FileUtilities.java:346) at net.egork.chelper.ui.ParseDialog$1.onOk(ParseDialog.java:69) at net.egork.chelper.ui.OkCancelPanel$1.actionPerformed(OkCancelPanel.java:16) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6525) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6290) at java.awt.Container.processEvent(Container.java:2234) at java.awt.Component.dispatchEventImpl(Component.java:4881) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) at java.awt.Container.dispatchEventImpl(Container.java:2278) at java.awt.Window.dispatchEventImpl(Window.java:2739) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:748) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:573) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227) at java.awt.Dialog.show(Dialog.java:1084) at java.awt.Component.show(Component.java:1654) at java.awt.Component.setVisible(Component.java:1606) at java.awt.Window.setVisible(Window.java:1014) at java.awt.Dialog.setVisible(Dialog.java:1005) at net.egork.chelper.ui.ParseDialog.(ParseDialog.java:221) at net.egork.chelper.ui.ParseDialog.parseContest(ParseDialog.java:266) at net.egork.chelper.actions.ParseContestAction.actionPerformed(ParseContestAction.java:23) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164) at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:169) at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:133) at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:312) at java.awt.Component.processEvent(Component.java:6290) at java.awt.Container.processEvent(Container.java:2234) at java.awt.Component.dispatchEventImpl(Component.java:4881) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) at java.awt.Container.dispatchEventImpl(Container.java:2278) at java.awt.Window.dispatchEventImpl(Window.java:2739) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:748) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:573) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
 » 6 years ago, # |   0 So, Egor, you are using IntelliJ IDEA as your main IDE for contests ?Thx :D
 » 6 years ago, # | ← Rev. 2 →   0 I have some problems with your CHelper - plugin :-?I've tried it with both IntelliJ IDEA 11 and 10, and I can't get it workingI did it in order :1. Install IntelliJ IDEA 102. Copy chelper2.33.jar to config/plugins directory3. Add CHelper's actions to the toolbar4. Create new Java Module project (with src directory)5. Copy chelper.properties to src directory6. Add chelper2.33.jar to the new project's classpath7. Try the Chelper's actions ... and it didn't work ...Anybody has the same issue ?Thx alot :)
•  » » 6 years ago, # ^ |   0 Had you restarted Idea after copying chelper.properties?
•  » » » 6 years ago, # ^ |   0 yes, I had :(thx for your reply :D
•  » » » » 6 years ago, # ^ |   0 Just noticed - you copied chelper.properties to src directory, but it should be in project root
•  » » » » » 6 years ago, # ^ |   0 thank you for your support, it's working now :Doh, if i change my settings in chelper.properties, i will also restart the IDE too ?
•  » » » » » » 6 years ago, # ^ |   +3 Yep, would change it in next version
•  » » » » » » » 6 years ago, # ^ |   0 oh, can i have another question, please ?How can I define my own Input Class ? Is there any "template" feature ?
•  » » » » » » » » 6 years ago, # ^ |   +3 You just need to make sure that your class takes InputStream as argument and has method next, which returns next token from input as string. Everything else you can write as you like
•  » » » » » » » » » 6 years ago, # ^ |   0 I mean that how can I put my class definition automatically :-?Should I copy & paste it manually to the Main.java ?
•  » » » » » » » » » 6 years ago, # ^ |   0 You just need to write class and put it somewhere under your source (e.g. in src/nova directory) and then fill nova.MyInputClass under inputClass in chelper.properties
•  » » » » » » » » » 6 years ago, # ^ |   0 thx to your helping, i've got it working :Dalso thx for such an useful, and ... wow plug-in :D :D :D
•  » » » » » » » » » 6 years ago, # ^ | ← Rev. 2 →   0 deleted
•  » » » » » » » » » 3 years ago, # ^ |   0 I did the same thing as you suggested. I created a FastReader class under the src\myPackage folder and pointed the input class to "myPackage.FastReader". No complains from the configuration dialog box as intellisense worked, but the output I get is garbled as you can see in this gist I'm using IntelliJ 13
•  » » 6 years ago, # ^ |   0 I'll look into it
•  » » 6 years ago, # ^ |   0 I too faced the same problem in 531 Div2 -250.
•  » » 6 years ago, # ^ |   0 For SRM 531 D2 250 empty arrays were handled incorrectly. I will fix this ASAP As SRM 530 currently unavailable I'll look into that later
 » 6 years ago, # |   0 There is problem on creating ,parsing contest,none function work from toolbar
•  » » 6 years ago, # ^ |   0 Please help me
•  » » 6 years ago, # ^ |   0 Nothing is working or only contest parsing?
•  » » » 6 years ago, # ^ |   0 Now contest parsing work ,how will it generate automatically Main file,it is not working
•  » » » » 6 years ago, # ^ |   0 This is my chelper.properties file inputClass = java.util.Scanner outputClass = java.io.PrintWriter excludePackages = java.,javax.,com.sun. outputDirectory = src author = Vikash archiveDirectory = archive/unsorted defaultDirectory = src/My topcoderDirectory = topcoder testDirectory = lib/test enableUnitTests = false
•  » » » » 6 years ago, # ^ |   0 It should generate the Main file when you run or debug created configuration
•  » » » » » 6 years ago, # ^ |   0 When I select contest id 131(or any) in codeforces it doesn't generate any thing in default directory
•  » » » » » 5 years ago, # ^ | ← Rev. 2 →   0 Hi Egor. This is my configuration: default dir: src/main Archive dir: archive/unsorted Output dir: src Input class: net.egork.chelper.util.InputReader Output class: net.egork.chelper.util.OutputWriterWhen I click on Run the selected configuration, it successfully generates a Main.java file under src (so src/Main.java). The generated file includes the classes from your library but the methods are empty. This is what I get: class InputReader { public InputReader(java.io.InputStream stream) { /* compiled code */ } public int readInt() { /* compiled code */ } } So, I'm getting compile errors. I installed according to https://code.google.com/p/idea-chelper/wiki/MainPage Intellij IDEA 12.1.4 @ Windowsany hints?UPD: If I leave the output dir empty, it compiles correctly: - before compiling, it yields "outputDirectory should be under source and in default package". - it then generates the file on the project root directory (so, on the same level as the src directory). The file still has empty methods for your library classes with /* compiled code */ bodies. - I created a sample case and it correctly showed me the results on the intellij console.
 » 6 years ago, # |   0 Hi Egor, Can you tell me how the inline functions work...I cannot figure it out..Suppose I have a method isPrime(int) that returns whether the number is prime or not.I want to use it directly and not write the whole thing everytime.I think the inline code does exactly this.But I dont know how to use it.Could you tell me or better demonstrate it with an example???
•  » » 6 years ago, # ^ |   0 You need to create some class, like IntegerUtils and create static method isPrime. Then you can use it in your solutions
•  » » » 6 years ago, # ^ |   0 And where do I have to save that class??
•  » » » » 6 years ago, # ^ |   0 Anywhere it will be visible fromyour solution
•  » » » » » 6 years ago, # ^ |   0 I created a class algorithms in src and a static method isPrime(Object a) in that.Then I compiled it. After that when I go to a Task and write boolean check=algorithms.isPrime((Object)a) ,then it is shown in red .i.e. it cannot compile...What should I do...Should I have to restart??
•  » » » » » » 6 years ago, # ^ |   +2 Are you sure your method was public?
•  » » » » » » » 6 years ago, # ^ |   0 Yes it is public...Do I have to change something in the properties file or put the class in a directory under the src??
•  » » » » » » » » 6 years ago, # ^ |   +1 Well, it should be somewhere under source — just like for any Java project
•  » » » » » » » » » 6 years ago, # ^ |   0 Ok. now its working .When I created a new directory under src and put the class in it.Thanks for the replies and your time:-) The thing I dont like in this is that it is showing all the methods in that class even if it is not called but some other method of that class is called ..Can this be changed??
•  » » » » » » » » » 6 years ago, # ^ |   +1 In the created source (the one you will submit to the server) all unused methods will be removed
•  » » » » » » » » » 6 years ago, # ^ |   0 When I submitted a problem in topcoder SRM 535 using IntegerUtils class it gave an error regarding too much unused code.I think that inline code is not working..Its definatley not working on codechef where I can see my submitted solution
•  » » » » » » » » » 6 years ago, # ^ |   0 That is bug in TopCoder algorithm, I receive that warning quite regular, but never had my submission judged as UCR violation after I started to use Java. Can you point to your codechef submit where inlining/unused code removal had not worked?
•  » » » » » » » » » 6 years ago, # ^ |   0 I have messaged it to you.
•  » » » » » » » » » 6 years ago, # ^ |   0 Check emotionalBlind's comment at the bottom, maybe you have same problem
 » 6 years ago, # |   0 I was solving a problem of Light OJ, but seems unused codes are not removed in my Main File.Here is my code: http://ideone.com/gsgDbHere readLong is not removed, which is actually unused.
•  » » 6 years ago, # ^ |   0 Strange, not repetable on my computer By the way, you can use Test Type: MULTI_TEST, that's exactly why that type was created
•  » » » 6 years ago, # ^ |   0 Did you mean MULTI_NUMBER?BTW, do you suggest me to do anything to make unused code remove working? I'm using chelper2.33.
•  » » » » 6 years ago, # ^ | ← Rev. 2 →   0 YesIt seems for whatever reason Idea considers readLong method as used. Could you open your created source (i.e. Main.java) in Idea and see if method name is grayed out as unused or not?
•  » » » » » 6 years ago, # ^ |   0 Yes, it was grayed out.But problem is resolved now. I changed outputDirectory = src from outputDirectory = src/outputAnd now it's working. Sorry, I think I didn't read the instructions carefully.Thanks for this awesome software.
 » 6 years ago, # | ← Rev. 3 →   0 I changed the properties file and it does work for codeforces and codechef. And when I see my code at the topcoder practise arena it does indeed have the unused codes+every time I run the code for topcoder problems it gives a warning "OutPut directory should be under source and in defualt package " for only topcoder problems but then it runs...What should be done??
•  » » 6 years ago, # ^ |   0 I had the same problem but it seems I had not configured my directories correctly. Now, it's ok. My directories in properties are: outputDirectory = src, archiveDirectory = archive/unsorted, defaultDirectory = src/mypackage, topcoderDirectory = src And make sure moj outputs to your src directory. Thanks for the great plugin, Egor!
 » 6 years ago, # |   0 Thank you for your plugin. It's great.
 » 6 years ago, # | ← Rev. 3 →   0 Thank you for your great work! But I can't find the "%home_dir%.IntelliJIdea10configplugins" means, so I can't continue to set up this plugin in my PC corrcetly.. Help! Thank you!
•  » » 6 years ago, # ^ | ← Rev. 2 →   0 Launch IntelliJ and choose File -> Settings -> Plugins -> Install plugin from disk -> path_to_chelper2.41.jar
•  » » » 6 years ago, # ^ |   0 Thank you for your reply! But I mean I don't know where to mkdir the IntelliJIdea10configplugins, that means I don't what "“%home_dir%" mean. Is it the Home directory "~/"? Thank you!
•  » » » » 6 years ago, # ^ |   0 I fixed path that got broken after markdown introductionYes, that's home directory
•  » » » » » 6 years ago, # ^ |   0 Oh, got it! Thanks all~
•  » » » » » 6 years ago, # ^ |   0 BTW, in the Checker file, there are some imports I can not find in the project.. They are "import net.egork.chelper.task.Test; import net.egork.chelper.tester.Verdict;" And my config is " inputClass = lozy.InputReader outputClass = java.io.PrintWriter excludePackages = java.,javax.,com.sun. outputDirectory = src author = Lozy archiveDirectory = archive/unsorted defaultDirectory = src/cf topcoderDirectory = topcoder testDirectory = lib/test enableUnitTests = false " Is there any problem in my config file or should I do some other works? Thanks a lot!
•  » » » » » » 6 years ago, # ^ |   0 "...also you should include chelper.jar to class path of your project (Project Structure -> Dependencies -> Add Single Entry Module Library…)"
•  » » » » » » » 6 years ago, # ^ | ← Rev. 2 →   0 Sorry for my carelessness... I didn't see the word "also"... Thank you for your reply and your time!
 » 5 years ago, # |   0 how can i use chelper in eclipse IDE ?
•  » » 5 years ago, # ^ |   0 Idea plugins are incompatible with Eclipse
 » 5 years ago, # | ← Rev. 3 →   0 Google That’s an error. Request not allowed from your country That’s all we know. Why? UPD: Fixed!I downloaded it whit VPN. :)
 » 5 years ago, # |   0 Why I can't open and Install ? I have installed Java before !
•  » » 5 years ago, # ^ |   0 You do not need to download anything from Google actually. Just use IntelliJ Idea Plugin repository (and you do understand that this is plugin for IntelliJ Idea, right?)
•  » » » 5 years ago, # ^ |   0 "You need to download plug-in and configuration. " plug-in : http://code.google.com/p/idea-chelper/downloads/detail?name=chelper2.4.jar!
•  » » » » 5 years ago, # ^ |   0 That's old information. Refer to manual on plugin web site
•  » » » » » 6 weeks ago, # ^ |   0 can you share the link?
 » 5 years ago, # |   0 When I use static imports in Task class it will not appear in the generated Main class which will produce some compilation errors. Is there a fix (a way to have a predefined Main class)?
•  » » 5 years ago, # ^ |   +3 Static imports are currently not supported
•  » » » 5 years ago, # ^ |   0 Thanks.Is there a way to add permanently import static java.lang.Math.*; import static java.util.Arrays.*; at the beginning of generated Main class?
•  » » » » 5 years ago, # ^ |   0 Currently no
 » 4 years ago, # |   0 Great plugin !
 » 4 years ago, # |   -8 Egor How Can I change the template code that generates automatically in the main? solver class name?
•  » » 4 years ago, # ^ |   -8 You can change solver class name (Main class name), but unable to change generated code
•  » » » 4 years ago, # ^ |   -8 some of the problem's input file is terminated by EOF. How can I handled those problem with CHelper regular test types? I've chose "Number of tests unknown" but it gives me RE :(
•  » » » » 4 years ago, # ^ |   -8 you should throw UnknownError when there's no more test.
•  » » » » » 4 years ago, # ^ |   -8 thank you man, it works...
 » 4 years ago, # | ← Rev. 2 →   0 Egor, great thanks for your plugin, it makes me efficient! I use it on IDEA 12 on MacOS and I have 2 questions: Every time When I submit a task I have to change i/o streams otherwise, I receive next error during submission: java.lang.RuntimeException: java.io.FileNotFoundException: ÑÑÐ°Ð½Ð´Ð°ÑÑÐ½ÑÐ¹ Ð²Ð²Ð¾Ð´ (The system cannot find the file specified) at Main.main(Main.java:22) Sometimes during compilation I receive next error, only main.java removal fixes that: 17:48:32 IllegalStateException: Attempt to modify PSI for non-committed Document!: Attempt to modify PSI for non-committed Document! Thank you for help!
•  » » 4 years ago, # ^ |   0 Well, if judge uses stdin/stdout you should specify those in your task as well I need a look at you chelper.properties
•  » » » 4 years ago, # ^ | ← Rev. 3 →   0 Can you give an example where it is better to do? I change only void solve method. My chelper.properties: inputClass = my.InputReader outputClass = java.io.PrintWriter excludePackages = java.,javax.,com.sun. outputDirectory = src author = MatFack archiveDirectory = archive/unsorted defaultDirectory = src/my topcoderDirectory = topcoder testDirectory = lib/test enableUnitTests = false Thank you a lot for help!
•  » » » » 4 years ago, # ^ |   0 On the first point you need to select "Standard stream" for input/output when you creating task. If you are parsing those should be correct automaticallyOn second point — if you use up to date Idea/plugin — I just don't know what could be wrong
•  » » » » » 4 years ago, # ^ |   0 Ok. I will update and double check. P.S. I am using IDEA 13.
 » 4 years ago, # |   +5 In IDEA 13.1.1 I get the following exception when running a task:17:20:01 IncorrectOperationException: Must not change document outside command or undo-transparent action. See com.intellij.openapi.command.WriteCommandAction or com.intellij.openapi.command.CommandProcessor: Must not change document outside command or undo-transparent action. See com.intellij.openapi.command.WriteCommandAction or com.intellij.openapi.command.CommandProcessorWorks OK in 13.0.
 » 4 years ago, # |   0 When i run the codeforces programm using chelper , I get null pointer exception net.egork.chelper.util.CodeGenerationUtilities\$InlineVisitor.addClass(CodeGenerationUtilities.java:534)My configuration file is: inputClass = net.egork.chelper.util.InputReader outputClass = net.egork.chelper.util.OutputWriter excludePackages = java.,javax.,com.sun. outputDirectory = src/output author = Himalay archiveDirectory = archive/unsorted defaultDirectory = src/main/mypackage topcoderDirectory = topcoder testDirectory = lib/test enableUnitTests = false
•  » » 4 years ago, # ^ |   0 It is not able to create Main.java file
 » 4 years ago, # |   +10 Is the plugin supposed to work for GCJ 2014? I am getting the following error when I try to parse a task:7:37:09 PM CHelper: Unable to parse task B — Cookie Clicker Alpha. Connection problems or format change
•  » » 4 years ago, # ^ |   0 Seems like there was internal format change. Should have checked beforehand but forgot
 » 4 years ago, # |   0 Do you have any plans to update source code at https://code.google.com/p/idea-chelper/? It seems to be pretty outdated.
•  » » 4 years ago, # ^ |   0 For some reason actual code is in trunk brink, but it still need push from me
•  » » 4 years ago, # ^ |   0 And actual code should be in trunk branch now (through I'm planning to fix GCJ support soon)
 » 4 years ago, # |   0 Hello, thanks for the plugin ;) It makes some good, but, for me, it works only with TopCoder (not with contest with io).I have described my problem (notSuchMethodException) here: http://stackoverflow.com/questions/23383595/chelper-plugin-nosuchmethodexception-errorCould you please look and help to track the problem?
•  » » 4 years ago, # ^ |   0 Your output writer class should have constructor that takes writer as parameter (and relays output there). You can use PrintWriter as output class
•  » » » 4 years ago, # ^ |   0 It actually had, but after reinstalling plugin from scratch, un-cache-ing idea and doing other random stuff it started working, so sorry for disturbing and thanks again!
 » 4 years ago, # |   0 I have just started using Chelper , it works perfect with topcoder but with code forces it always don't take the first number in input if contains number i.e ( if input like this 5 4 1 1 1 1 it begins reading from 4 not 5 !!) any help please, i am using scanner for input
•  » » 4 years ago, # ^ |   +3 Are you sure you do not select "Number of test known" when parsing tasks?
•  » » » 4 years ago, # ^ |   0 oh yes i changed it to single test ... it works now thanks!
 » 4 years ago, # | ← Rev. 4 →   0 Hi Egor, I just configure CHelper plugin, everything is working good. But when i tried to Archive the files, its showing error that "Configuration not selected or selected configuration not supported". Can you please give your input about what could be the reason.chelper.properties content: smartTesting=true archiveDirectory=archieve defaultDirectory=src/codeforces extensionProposed=true outputClass=java.io.PrintWriter excludePackages=java.,javax.,com.sun. outputDirectory=output author= libraryMigrated=true failOnIntegerOverflowForNewTasks=true inputClass=java.util.Scanner enableUnitTests=true testDirectory=lib/test
 » 3 years ago, # | ← Rev. 2 →   -8 Exception in thread "main" java.lang.IllegalAccessException: Class net.egork.chelper.tester.NewTester can not access a member of class InputReader with modifiers "public"This is what I am getting after executing the debug code option. Any suggestions ..? Note : I am using InputReader and OutputWriter class from your code. @Egor
•  » » 3 years ago, # ^ |   -8 Try full versions here
•  » » » 3 years ago, # ^ |   -8 Thank you so much sir!!! It finally worked!!! Saves the day for me!!!
 » 3 years ago, # |   +2 Does anybody have any insight into how to speed up running the task in Intellij? Right now I am using Egor's library (which is very helpful btw), and that seems to slow it down as it the compiler links things together I suppose. Overall it take between 15-25 seconds for solution to run for me right now, which is not terribly long but for competitions would be nice if it was a bit faster. I already removed all of my unused plugins and increased stack space but it doesn't seem to make a lot of difference. Has anyone found a way of speeding up Intellij?
•  » » 3 years ago, # ^ |   +3 Your computer must be very old, since on my 7-years-old Core 2 Duo E6600 the project with Egor's library compiles pretty fast, in about 5 seconds. The same speed is shown by my primitive types collections library (see in my blog). But I once tried to use Trove library and got 15-20 seconds, they have quite large code with lots of abstract classes, which slows down code generation. These numbers are for IDEA 13, maybe your IDE is too old?
•  » » » 3 years ago, # ^ | ← Rev. 2 →   0 Hm I am not sure if that is the case. I am using a 2012 Macbook Pro Retina, with IDEA 14, with all updates I think. Before installing Egor's library I was getting something like that with around 5 seconds. But anyway thanks for the response, maybe there is some setting that I accidentally enabled or something. Also I am using Java 8, I don't know if that makes a difference. I forget exactly but maybe with Java 7 it was faster.
•  » » 3 years ago, # ^ | ← Rev. 7 →   -8 So just another thing I was wondering about is it fine to have the yaal library under the src folder? I would think that it does not make a difference, but just want to make sure that it does not force some additional recompile or something of the library. Just additional bit of information is that when say I compile topcoder task that does not call from the library (topcoder because codeforces always uses input/output from library) it takes about 1-2 seconds. However as soon as I call a method it can increase to as much as 20 seconds. Just wanted to make sure that this directory setup with the library and everything is the same way that everybody else is doing it. And also another question because I just noticed this but what does the number 4 by the Chelper project folder mean? Thanks!
•  » » » 3 years ago, # ^ |   0 You should try marking your archive folder as excluded ;)
 » 3 years ago, # |   0 @Egor The last update did work for me. But I would like to know how to reach EOF without compilation error with this plugin or what would be the proper way to reach EOF.
 » 3 years ago, # |   0 I get this when trying to create tasks by parsing contests on Codeforces"NotificationException: Task file not found: Seems your task is in inconsistent state"
 » 2 years ago, # | ← Rev. 2 →   0 Hi Egor , All tools [Create Task , Parse Contest ,all] not working. please help to solve following error : NoSuchMethodError: com.intellij.psi.JavaPsiFacade.findClass(Ljava/lang/String;)Lcom/intellij/psi/PsiClass; Screenshot https://drive.google.com/file/d/0B13U1Ij8LVrFUzY1MmhUalBadDQ/view?usp=sharingThanks for nice plugin.
 » 22 months ago, # | ← Rev. 2 →   0 Would be cool if it worked. When creating a "new task" without parsing, i'm only getting the class file. No .task file is created so I can't run the files or the tests. Remember this working a year or so back with an older version.I just had a new setup. With src\default as my default directory on IntelliJ Idea 15.0.2However, when I do "parse task", it's getting created.
 » 13 months ago, # | ← Rev. 2 →   0 I am not able to parse Contest of Hackerrank, Codechef, Atcoder and Hackerearth. Will these be added later? I don't like to use Scanner class but CHelper have default as Scanner. How to change it? P.S. I am using CHelper 4.1.7(available on Repositories of JetBrains)
•  » » 13 months ago, # ^ |   0 Those sites are parsed using chrome extension, you can find it in chrome storeAs for changing input class you can read wiki on github for instructions
•  » » » 13 months ago, # ^ |   0 How to parse the task using Chrome Extension. I have clicked in + button many times but nothing is happening. Neither the IntelliJ is affected nor the other things.
•  » » » » 13 months ago, # ^ |   0 Do you have a project with CHelper configuration opened in Idea? Also it may be that Hackerrank changed their DOM structure once again. Is there anything in Idea log?
•  » » » » » 13 months ago, # ^ |   0 Yes, I have a project opened in Idea with CHelper config. And I ma trying the plugin fro Codechef.
•  » » » » » » 13 months ago, # ^ |   0 Can you tell me instructions I have to follow after clicking on parse Task in Google Chrome for any practice question on Codechef or ZCO contest of Codechef. I am assuming my Idea is closed.
•  » » » » » » » 13 months ago, # ^ |   0 Idea should be running. New task dialog should show up when you click on plus in chrome
•  » » » » » » » » 13 months ago, # ^ |   0 new task dialog is not showing up.
•  » » » » » » » » » 13 months ago, # ^ |   0 Event Log is showing : CHelper: Unable to parse task from codechef
•  » » » » » » » » » 13 months ago, # ^ |   0 That means that CHelper can't parse this particular task from codechef — they do not have any fixed format
•  » » » » » » » » » 13 months ago, # ^ | ← Rev. 2 →   0 Ok. Got it. Thanks for the replies, sir. Parse task is working on Hackerrank and AtCoder. Not on Hackerearth,CSAcademy and Codechef. Please look into the issue.
•  » » » » » » » » 13 months ago, # ^ |   0 New Update is amazing. We can parse task in Codechef Contest, Hackerearth and CSAcademy too. But still can't parse Codechef Practice Problems.
•  » » » 6 weeks ago, # ^ | ← Rev. 2 →   0 Egor Can you share the wiki link you mentioned above for instructions?
 » 12 months ago, # | ← Rev. 2 →   0 Here is a video tutorial for the installation of CHelperLink
•  » » 5 months ago, # ^ |   0 Hi I followed your tutorial. My code runs fine the IDE but on submission, it gives a timeout.Did you face this issue before? Here is the link:http://codeforces.com/contest/598/submission/32818599
 » 12 months ago, # | ← Rev. 2 →   0 Where to add the configuration file? Also, is the plugin only for topcoder or codeforces too?
 » 7 months ago, # |   0 Are there any plugin like CHelper for C++ in CLion IDE?
•  » » 7 months ago, # ^ |   +1
•  » » » 7 months ago, # ^ |   0 Thank you very much!
 » 5 months ago, # |   0 Anyone faced a timeout error while submitting on CF. The ide gives that the test cases passed but the online judge shows error on submitting the mail fileHere is the link:http://codeforces.com/contest/598/submission/32818599
 » 4 months ago, # |   0 I am not understanding how to generate own test cases for tasks like those Petr uses in his livestreams. Can anyone please help me out?
 » 7 weeks ago, # |   0 I think the new "Copy" feature has caused some problems in parsing the task's Test Cases.
•  » » 7 weeks ago, # ^ |   0 I highlighted the very same issue here. Got no response till now.
•  » » 7 weeks ago, # ^ |   0 I would recommend to use parsing from within idea until I deploy fix, it still works
 » 7 weeks ago, # | ← Rev. 2 →   0 In my case google chrome extension does not work. I can parse a contest from intellij and even problem too. But when I try to parse a particular problem from codeforces by pressing the + icon, nothing works[ even Event log does not show any action]. Here is link to my intellij ide screenshot. Please help me Egor. Thanks in advance.
 » 6 weeks ago, # | ← Rev. 4 →   0 One question and one feedback! EgorQ: How to use precision for double comparisons? I assume in the advanced settings, I need to put something for "checker properties" field, but what to put?? Any manual page explaining that?Feedback: when checking whether all input class and output class methods are implemented, it doesn't look for the necessary methods in super class. So it complains whereas the method exists in super class.
 » 4 weeks ago, # |   0 Please someone help me with using Test Class for creating custom input for my Java code.