I would really appreciate any new ideas of what new features to add
I would also appreciate donations: Yandex.Money, PayPal
Seems like no one tried beta verion — I would really appreciate feedback
4.4.3b3
- All supported sites are updated
- New Google Code Jam is now supported
- You can now inline any file (feature best used for DCJ, which is not here this year, but I hope will return)
4.4.1b2
Support for interactive tasks added. By default you would interact using user input, but you can write your own interractor
4.3.1
Task format is changes to JSON. I would recomment backing up your project before updating
4.2.2
- Critical bug fix
- CHelper Beta is no longer supported. You can select Beta channel of CHelper to continue receiving beta versions (you would need to add https://plugins.jetbrains.com/plugins/beta/list as custom repository)
4.2.1
- New Code Jam site support
- Fixes
4.1.8
- All parsers are up to date
- GCJ and Kattis are now only parsable from Chrome extension
4.1.5
- Added parsing for AtCoder and CSAcademy
- Fixed parsing for HackerRank
- Fixed enums in switches
4.1.3
- Various fixes for code generation
4.1.2
- Cojac version update. If you use Cojac for your own configurations update agent parameters as follows:
-Cints -Clongs -Ccasts -Cmath
- Cleanup
- Switched to Java 1.8
- Timus parser fix
- Kattis parser fix
- Include all Kattis sites
4.1.1
HackerEarth support
4.0.11
Fixed issue with using method as functional interface
4.0.10
Fix for USACO parsing. Currently on beta channel
What was the key to speedup, if it's not a secret?
Adding instead of removing
Thanks.
Long answer is previously I added everything that was imported from task class and everything in the same package, then everything that is imported from those classes and so on, and then removing unused code which is slow and cyclic references may remain. Now I only add what is actually referenced. Among other things now you can reference classes by fqn instead of importing them. Moreover naming conflict would be handled by constructing other names for classes
-_-
Thanks you very much, your plugin is very helpful. :D
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Hi Egor, I got this error after update CHelper and run my task. Can you give me an advise?
NoSuchMethodError: com.intellij.psi.PsiType.getTypeByName(Ljava/lang/String;Lcom/intellij/openapi/project/Project;Lcom/intellij/psi/search/GlobalSearchScope;)Lcom/intellij/psi/PsiClassType;: com.intellij.psi.PsiType.getTypeByName(Ljava/lang/String;Lcom/intellij/openapi/project/Project;Lcom/intellij/psi/search/GlobalSearchScope;)Lcom/intellij/psi/PsiClassType;
What is the version of Intellij Idea that you use?
I use version 13.1.6.
Well, I'll tag next build as only compatible with 14+ then. I recommend to update
-_-
e-olimp support is broken?
Yes, they redesigned. I am not sure I am inclined to fix it myself, but if anyone willing I gladly accept PR
and Kattis also? :(
Kattis is working for me
Strange, it's not working for me. I just get the "Nothing to show" message in the problem list. I already hit the "Refresh" button a few times and waited for a few minutes. The other judges work OK. Any hints?
I have IDEA 14, CHelper 4.0.1, running in Fedora 20 with Oracle JDK, in case it helps.
Probably fix to suppress certificate warnings is not working on Fedora. You can just use Chrome plugin instead
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Hello,
I recently tried to run TopCoder on C-Helper. However, when I try to run in Intellij Idea, it gives me an null pointer exception, and I can't compile it on Topcoder Arena. Is there anything I have to install other than CHelper and Arena? There error I've got in Idea is:
null java.lang.NullPointerException at net.egork.chelper.codegeneration.SolutionGenerator.shouldAddElement(SolutionGenerator.java:338) at net.egork.chelper.codegeneration.SolutionGenerator.processElement(SolutionGenerator.java:314) at net.egork.chelper.codegeneration.SolutionGenerator.createInlinedSource(SolutionGenerator.java:63) at net.egork.chelper.codegeneration.SolutionGenerator$4.run(SolutionGenerator.java:502) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:931) at net.egork.chelper.codegeneration.SolutionGenerator.createSourceFile(SolutionGenerator.java:496) at net.egork.chelper.configurations.TopCoderConfiguration.getState(TopCoderConfiguration.java:63) at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:201) at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:58) at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31) at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:53) at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31) at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:94) at com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:396) at com.intellij.execution.impl.ExecutionManagerImpl.access$400(ExecutionManagerImpl.java:61) at com.intellij.execution.impl.ExecutionManagerImpl$5.run(ExecutionManagerImpl.java:384) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.Alarm$Request$1.run(Alarm.java:351) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:702) at java.awt.EventQueue$3.run(EventQueue.java:696) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:719) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382) 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)
I'm really sorry for writing here. It seems like not a right location to post. Any help is appreciated. Thank you.
Can you zip your project with task in question and send to egor at egork dot net?
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Can you change archive directory's structure to something simple like this:
Topcoder
Codeforce
Probably I'll add customizeable archive structure in some future version
На CF, тимусе и др. сайтах обычно размер стека равен 64 МБ. Но JAVA прожорлива, и иногда этого не хватает.
CHelper автоматически генерирует для задач типа "single test" такой код.
Где и как можно настроить этот шаблон, чтобы код в функции main автоматически "обёртывался" такой штучкой:
Пока никак. С удовольствием приму патч добавляющий такую настройку
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Совместима ли последняя версия CHelper с IDEA 2016.1? Можно ли обновиться или пока лучше не стоит?
Кубок мы написали без проблем. В остальном ничего не могу сказать
ОК, спасибо! Попробую тоже испытать удачу :)
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Where can I download v4 ? I can only find v3 here ?
You can install it through Jetbrains plugin repository
Can you please update CHelper to 4.1.5 on GitHub? I am using a modified version of CHelper (changed the codegen template slightly), that's why I need the source code for update.
Done
Two issues(version 4.1.5): (1) Codechef not listed in Parse Contest dialog. (2) Problem parsing broken for codechef. Getting "Connection problems or format change".
I was able to fix (1) by adding codechef parser to Parser.PARSERS. Please help for (2). Trying codechef november long challenge 2016.
Hi, Egor, When the Test Type is 'Number of tests known', Can I use separate threads to run every single test? Thanks for the amazing plugin.
No. You can use this template though
It works! Thanks Egor.
codechef is not showing up in parse contest
Codechef can be parsed through chrome extension
but some problems are still unable to parse in competitions, and problems in domains can't be parsed through plugin
Because codechef has no fixed format for problem statements. So I use set of heurystics, which not laways work
Hi! Can I manually create Topcoder task by using CHelper? Thanks :D
Unfortunately no
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Egor — Unfortunately, I've had some trouble using the parser. You can see my directory and my settings here:
When I attempt to parse a contest, I'm met with the "Nothing to show" screen found here:
When I try to parse an individual problem using the Chrome extension, I see the circle animation on Chrome, but nothing happens on IDEA. (IDEA is open and the project is loaded.)
Do you have any idea what could cause this issue? Many thanks for any response.
Well, not being aboe to parse from idea seems like idea do not have access to internet. Not being able to parse with chrome is likely something to do with idea not able to connect on localhost port. Do idea runs in some kind of sandbox?
That sounds like a likely cause of the issue. IDEA is running on a basic Windows installation. I've tweaked the firewall a bit but haven't had any luck there. Any ideas about what could be causing the issue? Is it possible that the wi-fi configuration is at fault?
Thanks for the assistance!
Just posting a quick reminder since it's been a couple days since last response. No worries if we can't figure it out, but any thoughts you could provide would be much appreciated. I tested it on a different computer without the same firewall software, so I have to imagine that it's somehow related to the wi-fi.
Thanks for any assistance!
I really have no idea what's wrong
Understood, I'll see what I can do. I'll post here if I find a solution in the hope that any others with the same problem can benefit.
For anyone else with the same issue, I managed to fix it by updating IntelliJ to the latest version. I searched around and found some errors related to an IntelliJ TransactionGuard class, and in case the class was broken, I updated IntelliJ, after which the program worked.
Many thanks for your assistance and for creating the plugin.
I see there's an option to parse entire contest in Idea plugin, but the Chrome extension seems to activate only on a single problem page. Am I missing something or the extension doesn't support contest parsing? That looks weird.
Chrome parser only works with single page so it just can't parse whole contest at once. One exception is Google Code Jam because all problems presented in what is basically single page
Why when I use global array: "int in[] = new int[1000000 + 1];"
CHelper changes it to: "int in = new int[1000000 + 1];" ?
try using
int[] in = new int[...]
Because this notation is present in Java only to faciliate back compatibility with c and it would be pain to make it work
One more question — Is it possible to use stress testing with CHelper (writing an algorithm to automatically generate small test cases and their correct answers and printing the first one for which the main algorithm fails)? Also, is there any way to modify the template for the output class? I've checked through all of the templates in the project and haven't been able to find it. (It's given me a few issues with some online judges, most notably the USACO training pages.)
It is possible to stress test. If you look in task properties there is "Test class" if you push Advanced
It is possible to use whatever output class you want as long as it has close method. You just need to update preferences
I'm trying to use your parsers, and class Task raises some questions. It contains all necessary information about the problem except time and memory limit, while they are usually very easily parsed. On the other hand, it contains your plugin-specific data like mainClass, truncate, includeLocale etc.
Did you think about extracting the parsers into a separate library with more general interface, independent of the plugin implementation?
I thought about it and decided I do not have time to do it right for now.
Memory limit is actually parsed and put into VM arguments
Tasks from CSAcademy Rounds are not being parsed. I think their new update is causing problem with the C-Helper Chrome Extension.
I'm afraid that'll have to wait until after World Finals (unless someone want to propose a pull request of course)
Sir, can you update the CHelper for CSAcademy now? Tasks are not parsing at that site due to their upgradation of website.
Hi guys. I have no problem running my code on Google Code Jam Pretest. When it time to download the input file from Google, where should I store the input file. Does the script support generating the output file to upload to Google server, if yes , can someone advice me how? Thanks in advance for the great script.
You just put it in "work directory" (as defined by run configuration, usually project root) and run Main class
Hey Egor, now that this post is back to business, is it possible to have a feature where we can submit directly from the IntelliJ. That is we dont have to go back to the problem page, browse for our solution and get the result. The plugin would do all of this for me and return me the status of the solution. Even if you could do this for codeforces (because nowadays I just participate here), that would be great :)
I want to introduce this functionality sometime, but I need API to do this as I would not want to hack my way through
Unable to parse task from AtCoder :( Anyone here facing the same issue?
Can anybody tell me how to fix this issue?
I hooe to deploy fix next week
Tests were not parsing in today's contest. Can you please fix it?
Chelper parser is not working. Every time I click on the plugin, nothing happens.
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
On clicking + button on chrome, screen for adding the task pop up. But after pressing ok, task is not being added in IntelliJ(Facing issue while parsing task on Codeforces and CSAcademy). Please fix it.
Well, I do not experience this issue, so I need more to try to fix it. Can you record short video with this issue?
Can you suggest me how to record using screen recorder? I haven't used one till now.
You can use OBS Studio
I have recorded it. You can watch it here.
I'll look into it tomorrow
Thank you for reporting, I located the issue and new version should be available shortly
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Thank you for the new Code Jam parser! Are you planning to support parsing of the whole contest at once?
Previously I parsed everything at once because web page actually had all the problems. New web page only has single problem statement
The link in section 4.2.2 https://plugins.jetbrains.com/plugins/beta/list is broken, it redirects me to https://plugins.jetbrains.com/plugins/list?channel=beta&pr_productId=.
It is not a link, it is repository you need to add to idea plugin repositories in order to use beta versions of CHelper
Can you add parse task for old GCJ system too?
As Google Kickstart uses the same interface as of old GCJ system. Due to plugin update, I am unable to parse task in Kickstart :(
I had not removed support, you should still be able to parse from old system with Chrome extension
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
What's the limitation of CHelper's inlining abilities. Can pull data structures from say, google common collections/gauva?
Only lomitation is source size limit really
I couldn't get it to work with gauva. Anything special I need to do? It doesn't inline all the classes needed to MultiHashMap work.
I'll look it up tomorrow
Any luck?
was busy, sorry
Seems like annotations are the cause of problem. Next beta version removes all annotations just to be on the safe side
But multiset add about 800 lines and 30 kilobytes of code, so use resposibly
Thanks!
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Test cases were not parsed in contest 1028 and 1029 but they are if I pick one task from the problem set (in particular task 1029F). I use IntelliJ IDEA 2018.2.1 and CHelper 4.4.2 on Ubuntu 16.04.
Is it a known issue? Any workaround/fix?
Hey Egor, have you thought of updating plugin after recent changes in AtCoder platform. It will be very helpful. As now task are not being parsed after UI improvements.
I am a bit occupied with work/other projects atm. You can try Competitive Companion Chrome extension for parsing tasks
Hey, so there is one more problem in creating test class for the task. Can you please fix the issue? Following error lines are being shown.
Hi . I installed Idea Intellij 2018.3.5 version and added Chelper plugin to it from store plugins and configured the default directory. Restarted the ide and now when i parse a task test cases are not automatically added. Can someone please help me. Below are the urls to view screenshots of my project and configuration
Settings Image
Test cases not added
Project Config
Please help. I tried a lot and i am stuck now . thanks
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
Are you going to update the source code on github with new parsers?
Done
Hi Egor, after i create task with 4.4.3b3, I could not see the task.json. And I see this error not long after i created task:
java.lang.Throwable: AWT events are not allowed inside write action: sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.lwawt.LWCursorManager$1@241e3273,notifier=null,catchExceptions=false,when=1556816838691] on dialog2 at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134) at com.intellij.openapi.application.impl.NoSwingUnderWriteAction.lambda$watchForEvents$0(NoSwingUnderWriteAction.java:36) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:374) 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:190) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233) at java.awt.Dialog.show(Dialog.java:1077) at java.awt.Component.show(Component.java:1685) at java.awt.Component.setVisible(Component.java:1637) at java.awt.Window.setVisible(Window.java:1014) at java.awt.Dialog.setVisible(Dialog.java:998) at net.egork.chelper.ui.CreateTaskDialog.setVisible(CreateTaskDialog.java:109) at net.egork.chelper.ui.CreateTaskDialog.showDialog(CreateTaskDialog.java:91) at net.egork.chelper.actions.NewTaskAction.createTask(NewTaskAction.java:38) at net.egork.chelper.actions.NewTaskDefaultAction.createTaskInDefaultDirectory(NewTaskDefaultAction.java:45) at net.egork.chelper.ChromeParser$1$1.run(ChromeParser.java:118) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1057) at net.egork.chelper.util.ExecuteUtils$2.run(ExecuteUtils.java:38) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315) at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:156) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:732) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:668) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363) 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)
What’s your idea version?
Hi I installed the plugin through Intellij marketplace. But i'm unable to build any task. Error: Error: Could not find or load main class net.egork.chelper.tester.NewTester Caused by: java.lang.ClassNotFoundException: net.egork.chelper.tester.NewTester
Did anyone else see it? Is there any setup instructions that I missed?
Also, when trying to run topcoder arena by clicking on the topcoder icon in the plugin toolbar, i get an error 'javaws' file not found. Have tried several things with no luck.
Using Intellij Community 2020.1
Yes. I am getting the same error (Error: Could not find or load main class net.egork.chelper.tester.NewTeste). Could Egor please look into this?
EDIT: The issue has been fixed. See here for a complete fix.
When I don't use a task and just let it sit there, the configuration for the task is set to build the project multiple times before launching. This clearly is unnecessary and slows running the task by a lot (due to the excessive build time). Is there any fix for this (without having to archive the task)?
Hi Egor,
I have made the chelper IDE configurations gradle-based, so that I could easily change laptops and wouldn't need too much Intellij configuration of the plugin (other than installing the plugin). My
build.gradle
dependencies sections looks like this:Two of the dependencies are not versioned and I guess don't have Maven coordinates — (
cojac.jar
andchelper.jar
).While running the Task, I get a bunch of errors (seemingly, related to
cojac.jar
) and are too much and annoying. In the end, the tests are run fine, however those errors take up all the output, sometimes hard to find the real, useful outputs.Same error here...
I don't quite remember how I solved it. But try turning off Fail on integer overflow.. setting.
Yes
Hello all,
I've made some updates and released a 4.5.0 version which support IntelliJ 2024.1+
https://github.com/zuochao1322/idea-chelperx