Блог пользователя Egor

Автор Egor, 12 лет назад, По-русски
1. Установка
Надо скачать файл плагина и файл конфигурации. Файл плагина надо положить в %home_dir%\.IntelliJIdea10\config\plugins (если папки plugins нету — создать ее), а так же добавить в качестве библиотеки к модулям своего проекта (делается через Project Structure -> Dependencies -> Add Single Entry Module Library...). Затем поправить конфигурацию согласно своим нуждам, положить ее в корень проекта — и все, можно использовать. Для работы с TopCoder необходим плагин moj для арены, инструкции и ссылка — здесь, инструкция на русском — здесь


2. Конфигурация
В конфигурации надо задать несколько директорий. Директория задается путем от корня проекта с заменой \ на /. Пройдемся по пунктам:
inputClass - полное имя класса, используемого для ввода (полное имя — имя пакета + имя класса). Этот класс должен иметь метод next() возвращающей String — следующий токен (как у Scanner) и конструктор, принимающий InputStream. Собственно, Scanner подходит, но он довольно медленный
outputClass - полное имя класса, используемого для ввода (полное имя — имя пакета + имя класса). Соответствующий класс должен иметь 2 конструктора от OuputStream и от Writer и иметь метод close. По умолчанию — java.io.PrintWriter
excludePackages - перечисленные через запятую префиксы пакетов, которые вы не хотите включать в итоговый код, потому что они являются частью окружения на сервере). В большинстве случаев менять значение не надо
outputDirectory - папка, куда складывается итоговый исходный файл (который потом посылается на сервер для проверки). Должна находится в source директории какого-либо модуля в пакете по умолчанию. В проекте, создаваемым idea по умолчанию можно указать папку src
author - содержание тега @author в итоговом файле. В случае пустого значения тег не ставится
archiveDirectory - папка, куда исходники складываются при архивировании. Не рекомендуется, чтобы эта папка была частью source какого-либо модуля. Можно оставить по умолчанию, тогда при первом архивировании эта папка будет создана
defaultDirectory - папка, где будут создаваться автоматически созданные задания. Должна быть в исходном коде какого-либо модуля, но не в пакете по умолчанию. В проекте, созданном по умолчанию, должна быть вида src/package path, например, src/my/package
topcoderDirectory - папка, куда TopCoder плагин moj складывает созданные исходники. Правила те же, что и для outputDirectory. Если не участвуете в TopCoder — можно не беспокоится о значении этой настройки
enableUnitTests - если вы хотите, чтобы на основе ваших заданий создавались юнит тесты, то надо установить в true
testDirectory - если вы не установили значение предыдущей настройки в true, то может иметь любое значение. Иначе должна находится в исходном коде любого модуля, который может видеть те же классы, что и defaultDirectory (собственно, может быть в том же модуле)
Вот и все. Стоит заметить, что после смены конфигурации, чтобы изменения вступили в силу, надо перезагрузить проект

3. Использование
Добавьте себе на главную панель инструментов (Customize Menus and Toolbars... в контекстом меню панели инструментов) из Plug-ins->CHelper следующие кнопки: New Task, Edit Tests, Archive Task, Delete Task, Create Codeforces Tasks.



New Task (Alt+F2) — создает новое задание в defaultDirectory и выбирает его в качестве активного.
Edit Tests (Alt+F5) — открывает редактор тестов (в том числе для TopCoder)

Archive Task (Alt+F6) — удаляет задание, сохраняя код в archiveDirectory и, если включено, создавая unit test в testDirectory
Delete Task - удаляет задание и все его файлы
Parse Contest - создает все задания для определенного соревнование (пока поддерживаются Codeforces, CodeChef, E-Olimp и Timus).

Parse Task - то же самое, что и предыдущий пункт, но создает только одно задание.

Название сайта ID соревнования ID задачи из архива 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) — копирует содержимое Main.java в буфер обмена. Полезно для сайтов, которые не поддерживают отправку файла

4. Меню настройки новой таски

Name - имя класса для задания. Если используются файлы .in/.out, то стоит использовать такое имя, которое при переводе в нижний регистр совпадает с именем входного/выходного файла (без расширения)
Test type - каким образом идут тесты — по одному на файл, сначала количество тестов, а потом сами тесты или тесты прекращаются по какому-то условию (скажем, вход из нулей). В последнем случае основной метод должен кидать UnknownError когда условие выхода выполнилось)
Input type/Output type - тип ввода/вывода. Standard — через стандартный поток, Task_id — см. Name, Custom — имя файла задается в появившемся поле
Heap memory - ограничение на размер памяти
Stack memory - ограничение на размер стека

5. Созданные файлы
В основном файле задания есть один единственный метод - void solve(int testNumber, %input% in, %output% out)
testNumber — номер теста в файле начиная с 1
В файле чекера есть 3 метода:
String check(%input% input, %input% expected, %input% actual)
возвращает null, если ответ правильный, не пустую строку если неправильный, пустую строку для запуска чекера по умолчанию (потокенное сравнение)
double getCertainty()
возвращает точность сравнения даблов для чекера по умолчанию. Если 0, то будут сравниваться как токены
Collection<? extends Test> generateTests()
возвращает набор дополнительных тестов, которые генерируются программно
  • Проголосовать: нравится
  • +29
  • Проголосовать: не нравится

12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
Can I use IntelliJIdea to code in C++ ? Are there some plug-in to do that ?
12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
I have a problem,when go add actions , not show me plugin chelper :(,
  • 12 лет назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится
    You either had not copied it to correct folder or had not restarted Idea since
    • 12 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится
      thanks :=) is cool !
    • 10 лет назад, # ^ |
        Проголосовать: нравится 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

      • 10 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Do you have any project open when you click on "Edit Project Settings"?

        • 10 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Yes i have one project open which i created ...

          • 9 лет назад, # ^ |
              Проголосовать: нравится 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

12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
Поменяй ссылочку на файл, она ведет на страничку со старой версией.
»
12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
So, Egor, you are using IntelliJ IDEA as your main IDE for contests ?
Thx :D
»
12 лет назад, # |
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 working
I did it in order :
1. Install IntelliJ IDEA 10
2. Copy chelper2.33.jar to config/plugins directory
3. Add CHelper's actions to the toolbar
4. Create new Java Module project (with src directory)
5. Copy chelper.properties to src directory
6. Add chelper2.33.jar to the new project's classpath
7. Try the Chelper's actions ... and it didn't work ...

Anybody has the same issue ?

Thx alot :)
  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится
    Had you restarted Idea after copying chelper.properties?
    • »
      »
      »
      12 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится
      yes, I had :(

      thx for your reply :D
      • »
        »
        »
        »
        12 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится
        Just noticed - you copied chelper.properties to src directory, but it should be in project root
        • »
          »
          »
          »
          »
          12 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится
          thank you for your support, it's working now :D

          oh, if i change my settings in chelper.properties, i will also restart the IDE too ?
          • »
            »
            »
            »
            »
            »
            12 лет назад, # ^ |
              Проголосовать: нравится +3 Проголосовать: не нравится
            Yep, would change it in next version
            • »
              »
              »
              »
              »
              »
              »
              12 лет назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится
              oh, can i have another question, please ?

              How can I define my own Input Class ? Is there any "template" feature ?
              • »
                »
                »
                »
                »
                »
                »
                »
                12 лет назад, # ^ |
                  Проголосовать: нравится +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
                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится
                  I mean that how can I put my class definition automatically :-?

                  Should I copy & paste it manually to the Main.java ?
                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                    Проголосовать: нравится 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
                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится
                  thx to your helping, i've got it working :D

                  also thx for such an useful, and ... wow plug-in :D :D :D
                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                  Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

                  deleted

»
12 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

To Egor,

Your plugin have a few "bugs" with Topcoder SRM Task :D. I've used it on SRM 530 and 531 and found some issues :D

  1. CHelper can't "parse" the task. When I open a task, there is only moj created code file and it isn't parsed into CHelper's TopCoder Task. I had this issue with task UnsortedSequence (SRM 531 — Div 2 — 250 Task), another tasks just work fine :)

  2. Wrong example input/output parsed. I'm not sure it's CHelper's problem or just moj's :-?. Had this issue with task GogoXCake (SRM 530 — Div 2 — 500 Task), another tasks just work fine :)

Just a "report" for you :D, hope you will see and fix them soon :D

Again, thanks for such an useful plugin :D

»
12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

There is problem on creating ,parsing contest,none function work from toolbar

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Nothing is working or only contest parsing?

    • »
      »
      »
      12 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Now contest parsing work ,how will it generate automatically Main file,it is not working

      • »
        »
        »
        »
        12 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        It should generate the Main file when you run or debug created configuration

        • »
          »
          »
          »
          »
          11 лет назад, # ^ |
          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.OutputWriter

          When 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 @ Windows

          any 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.
»
12 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

При беглом осмотре кода я заметил, что классы исходников очень хардкорно парсятся... Я так понимаю, что если у меня в утилитах будет что-то типа:

/**
* This class contains very usefull methods.
*/
public class MyCoolUtilClass {
//...
}

то заинлайнится какая-то некомпилируемая хрень, типа:

public class Main {
}
class contains very usefull methods.
*/
public class MyCoolUtilClass {
//...
}

А если у меня будет:

public class
MyCoolUtilClass {
//...
}

то, мне кажется, оно вообще забудет его заинлайнить (т.к. после class нет пробела).

А если мой Utils-класс содержит static import-ы?

А если единственная ссылка на мой класс будет внутри generic-типа?

Т.о., если мой стиль оформления кода немного отличается от Вашего, то я могу быть неприятно разочарован во время контеста.

Я правильно понимаю? Тогда об этом стоит предупреждать. ;)

P.S. Но сама идея плагина для генерации одного файла по зависимостям и удаления неиспользуемого кода прикольна. :)

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Проблема. Буду думать, как ее решать А так — нет предупреждения потому, что я об этом не задумывался, а никто другой не наткнулся

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Ах да, про static импорты (так же как обращение по fqn) вроде было где-то написано, но могло потерятся в процессе

»
12 лет назад, # |
  Проголосовать: нравится 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???

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    You need to create some class, like IntegerUtils and create static method isPrime. Then you can use it in your solutions

    • »
      »
      »
      12 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      And where do I have to save that class??

      • »
        »
        »
        »
        12 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Anywhere it will be visible fromyour solution

        • »
          »
          »
          »
          »
          12 лет назад, # ^ |
            Проголосовать: нравится 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??

          • »
            »
            »
            »
            »
            »
            12 лет назад, # ^ |
              Проголосовать: нравится +2 Проголосовать: не нравится

            Are you sure your method was public?

            • »
              »
              »
              »
              »
              »
              »
              12 лет назад, # ^ |
                Проголосовать: нравится 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??

              • »
                »
                »
                »
                »
                »
                »
                »
                12 лет назад, # ^ |
                  Проголосовать: нравится +1 Проголосовать: не нравится

                Well, it should be somewhere under source — just like for any Java project

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                    Проголосовать: нравится 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??

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                    Проголосовать: нравится +1 Проголосовать: не нравится

                  In the created source (the one you will submit to the server) all unused methods will be removed

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                    Проголосовать: нравится 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

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                    Проголосовать: нравится 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?

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  I have messaged it to you.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  12 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  Check emo's comment at the bottom, maybe you have same problem

»
12 лет назад, # |
  Проголосовать: нравится 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/gsgDb

Here readLong is not removed, which is actually unused.

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 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

    • »
      »
      »
      12 лет назад, # ^ |
        Проголосовать: нравится 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.

      • »
        »
        »
        »
        12 лет назад, # ^ |
        Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

        Yes

        It 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?

        • »
          »
          »
          »
          »
          12 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Yes, it was grayed out.

          But problem is resolved now.

          I changed outputDirectory = src from outputDirectory = src/output

          And now it's working. Sorry, I think I didn't read the instructions carefully.

          Thanks for this awesome software.

»
12 лет назад, # |
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??

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 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!

»
12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Thank you for your plugin. It's great.

»
12 лет назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

Egor привет. При установке плагина на Ubuntu 12.04, IntelliJ IDEA CE 11.1 нет возможности добавить кнопки на панель меню.

Порядок действий:

  1. Закинуть плагин в папку /%username%/IntelliJIDEA/plugins/

  2. Перезагрузить IntelliJ

  3. Создать новый проект, добавить в него в dependencies CHelper, в корневой каталог проекта кинуть файл *.properties.

  4. Перезапустить IntelliJ

Собственно потом при выборе "Customize Menus and Toolbars..." пытался найти указанные в блоге опции для добавления, но там подобного нет.

Не подскажешь в чем может быть проблема?

Спасибо.

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    А в списке установленных плагинов он есть?

    • »
      »
      »
      12 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Есть.

      • »
        »
        »
        »
        12 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Нет идей и нет доступа к Ubuntu. У меня на 11.1.1 все работает

        • »
          »
          »
          »
          »
          12 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          А в каком подразделе вообще должен находится CHelper при добавлении меню? У меня там его нет вообще. То, что плагин новый добавлен — отобразилось и в списках есть он.

»
12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Вот такое получил:

Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(487,51),absolute(710,117),button=1,modifiers=Button1,clickCount=1] on dialog22
java.lang.NullPointerException
	at net.egork.chelper.ui.TopCoderEditTestsDialog.<init>(TopCoderEditTestsDialog.java:159)
	at net.egork.chelper.ui.TopCoderEditTestsDialog.editTests(TopCoderEditTestsDialog.java:229)
	at net.egork.chelper.ui.TopCoderConfigurationEditor$1.actionPerformed(TopCoderConfigurationEditor.java:39)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
	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:6505)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
	at java.awt.Component.processEvent(Component.java:6270)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4861)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
	at java.awt.Container.dispatchEventImpl(Container.java:2273)
	at java.awt.Window.dispatchEventImpl(Window.java:2713)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
	at java.awt.EventQueue.access$000(EventQueue.java:101)
	at java.awt.EventQueue$3.run(EventQueue.java:666)
	at java.awt.EventQueue$3.run(EventQueue.java:664)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:680)
	at java.awt.EventQueue$4.run(EventQueue.java:678)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
	at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:699)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:534)
	at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:420)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:378)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:121)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
	at java.awt.Dialog.show(Dialog.java:1072)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.a(DialogWrapperPeerImpl.java:742)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:738)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:426)
	at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1382)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1367)
	at com.intellij.execution.actions.EditRunConfigurationsAction.actionPerformed(EditRunConfigurationsAction.java:46)
	at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:619)
	at com.intellij.ui.popup.AbstractPopup$17.run(AbstractPopup.java:1162)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.a(FocusManagerImpl.java:615)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.g(FocusManagerImpl.java:596)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.e(FocusManagerImpl.java:566)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:55)
	at com.intellij.openapi.wm.impl.FocusManagerImpl$IdleRunnable.runEdt(FocusManagerImpl.java:102)
	at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:28)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
	at java.awt.EventQueue.access$000(EventQueue.java:101)
	at java.awt.EventQueue$3.run(EventQueue.java:666)
	at java.awt.EventQueue$3.run(EventQueue.java:664)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
	at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:699)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:538)
	at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:420)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:378)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

»
12 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Правака №2

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Да, в чем проблема? Ни один метод не используется, потому и вырезается

    Если внутри solve написать int x = in.RI(); по идее RI и next() должны остаться

»
12 лет назад, # |
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!

  • »
    »
    12 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    Launch IntelliJ and choose

    File -> Settings -> Plugins -> Install plugin from disk -> path_to_chelper2.41.jar

    • »
      »
      »
      12 лет назад, # ^ |
        Проголосовать: нравится 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!

      • »
        »
        »
        »
        12 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        I fixed path that got broken after markdown introduction

        Yes, that's home directory

        • »
          »
          »
          »
          »
          12 лет назад, # ^ |
            Проголосовать: нравится 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!

          • »
            »
            »
            »
            »
            »
            12 лет назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            "...also you should include chelper.jar to class path of your project (Project Structure -> Dependencies -> Add Single Entry Module Library…)"

»
12 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Поставил вот. Юзаю IDEA12 EAP
Есть код:

cf - spoiler(см. правку1)

Тут все хорошо.

Генерируется код:

cf - spoiler(см. правку1)

Собственно, не находится класс Array. По Alt+enter отлично находит.

»
12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Написано было:

abstract public class ...

он вставлялся в результат как не абстрактный. При замене на

public abstract class — нормально

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    Да, пока это, к сожалению, так. Когда у меня наконец появится свободное время я посмотрю что с этим можно сделать

  • »
    »
    9 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Пост апнули — случайно прочитал это сообщение. Вроде бы я забыдлофиксил это в своем репозитории. Может кому пригодится. Но там нет самых последних обновлений.

»
12 лет назад, # |
Rev. 6   Проголосовать: нравится 0 Проголосовать: не нравится

Пропало в версии 2.41. Зато теперь вылазит рандомный екзепшн периодически(на работу, кажется не влияет):

in Rev.5
»
12 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

<я не умею читать>

»
11 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

how can i use chelper in eclipse IDE ?

»
11 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Google

  1. That’s an error.

Request not allowed from your country That’s all we know.

Why? UPD: Fixed!I downloaded it whit VPN. :)

»
11 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Why I can't open and Install ? I have installed Java before !

»
11 лет назад, # |
  Проголосовать: нравится 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)?

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Great plugin !

»
10 лет назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

Egor How Can I change the template code that generates automatically in the main? solver class name?

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится -8 Проголосовать: не нравится

    You can change solver class name (Main class name), but unable to change generated code

    • »
      »
      »
      10 лет назад, # ^ |
        Проголосовать: нравится -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 :(

»
10 лет назад, # |
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:

  1. 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)

  2. 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!

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится
    1. Well, if judge uses stdin/stdout you should specify those in your task as well

    2. I need a look at you chelper.properties

    • »
      »
      »
      10 лет назад, # ^ |
      Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится
      1. Can you give an example where it is better to do? I change only void solve method.
      2. 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!

      • »
        »
        »
        »
        10 лет назад, # ^ |
          Проголосовать: нравится 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 automatically

        On second point — if you use up to date Idea/plugin — I just don't know what could be wrong

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Как соединить Topcoder Арену с IntelliJIdea c СHelperom?

Я установил плагин, но не могу конкретно разобраться что еще я не сделал?

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Надо запускать арену прямо из идеи — там соотвествующую кнопку на тулбар можно повесить

    • »
      »
      »
      10 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      ОК. Когда я нажимаю ничего не происходит

      • »
        »
        »
        »
        10 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        И в логе ничего нету? А проект — точно с chelper.properties (появляются если нажать кнопку edit project settings и заполнить все правильно)?

        • »
          »
          »
          »
          »
          10 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Значит вот что я сделал: 1) Установил IntelliJIdea 13.1 с community

          2) Сделал эти шаги: - Select menu item "File->Settings...", select "Plugins" in "IDE Settings", push "Browse repositories..." button, right click on CHelper and select "Download and Install". Click "Yes", "OK", "Apply" and "Restart". — Сделано

          • Right click on main toolbar, select "Customize Menus and Toolbars...", select location where you want actions to be listed (probably end of "Main Toolbar" is good), click "Add After...", select "Plug-ins->CHelper" and add actions you are interested in (probably all but "Task") — Сделано

          • After that open or create project that you want to use with plugin and click on "Edit Project Settings" to set-up project directories (more on this here) — Здесь я зашел в Project Structure и добавил Chelper в dependencies. Больше я ничего не делал. https://code.google.com/p/idea-chelper/wiki/EditProjectSettings — Эта картинка не высвечивалась

          • »
            »
            »
            »
            »
            »
            10 лет назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            То есть если нажать на кнопку Edit Project Settings с тулбара сеттинги не открываются?

            • »
              »
              »
              »
              »
              »
              »
              10 лет назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится

              Вы правы. Я нашел Edit Project Settings.

              • Добавил свое имя(Author)
              • Остальное оставил все также
              • Arena теперь запускается, только видимо проблема с default directory. Куда мне указать default directory в project settings?

              • »
                »
                »
                »
                »
                »
                »
                »
                10 лет назад, # ^ |
                  Проголосовать: нравится 0 Проголосовать: не нравится

                Скажем, src/ferrumit (создав соотвествующую папку). А output — src

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  10 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  Создал так.

                  Arena открылась и задачи открылись.

                  Правда как нужно тестить и сдавать сами решения.

                  Я нажал кнопку Run и вышло

                  Exception in thread "main" java.lang.NoSuchMethodError: net.egork.chelper.task.TopCoderTask.load(Lnet/egork/chelper/util/InputReader;)Lnet/egork/chelper/task/TopCoderTask; at net.egork.chelper.tester.NewTopCoderTester.test(NewTopCoderTester.java:45) at net.egork.chelper.tester.NewTopCoderTester.main(NewTopCoderTester.java:24)

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  10 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  В первый раз такое вижу. Можно попробовать удалить добавленные библиотеки из проекта и нажать edit project setting/ok еще раз

»
10 лет назад, # |
  Проголосовать: нравится +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.CommandProcessor

Works OK in 13.0.

»
10 лет назад, # |
  Проголосовать: нравится 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

»
10 лет назад, # |
  Проголосовать: нравится +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

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Seems like there was internal format change. Should have checked beforehand but forgot

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Do you have any plans to update source code at https://code.google.com/p/idea-chelper/? It seems to be pretty outdated.

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    For some reason actual code is in trunk brink, but it still need push from me

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    And actual code should be in trunk branch now (through I'm planning to fix GCJ support soon)

»
10 лет назад, # |
  Проголосовать: нравится 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-error

Could you please look and help to track the problem?

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Your output writer class should have constructor that takes writer as parameter (and relays output there). You can use PrintWriter as output class

    • »
      »
      »
      10 лет назад, # ^ |
        Проголосовать: нравится 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!

»
10 лет назад, # |
  Проголосовать: нравится 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

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Are you sure you do not select "Number of test known" when parsing tasks?

»
9 лет назад, # |
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

»
9 лет назад, # |
  Проголосовать: нравится +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?

  • »
    »
    9 лет назад, # ^ |
      Проголосовать: нравится +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?

    • »
      »
      »
      9 лет назад, # ^ |
      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.

  • »
    »
    9 лет назад, # ^ |
    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!

»
8 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Google Code скоро закрывается. Планируется ли переезд на другой хостинг?

UPD: пардон, нашёл.

»
8 лет назад, # |
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=sharing

Thanks for nice plugin.

»
7 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится
  1. I am not able to parse Contest of Hackerrank, Codechef, Atcoder and Hackerearth. Will these be added later?
  2. 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)
  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Those sites are parsed using chrome extension, you can find it in chrome store

    As for changing input class you can read wiki on github for instructions

    • »
      »
      »
      7 лет назад, # ^ |
        Проголосовать: нравится 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.

      • »
        »
        »
        »
        7 лет назад, # ^ |
          Проголосовать: нравится 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?

        • »
          »
          »
          »
          »
          7 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Yes, I have a project opened in Idea with CHelper config. And I ma trying the plugin fro Codechef.

          • »
            »
            »
            »
            »
            »
            7 лет назад, # ^ |
              Проголосовать: нравится 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.

            • »
              »
              »
              »
              »
              »
              »
              7 лет назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится

              Idea should be running. New task dialog should show up when you click on plus in chrome

              • »
                »
                »
                »
                »
                »
                »
                »
                7 лет назад, # ^ |
                  Проголосовать: нравится 0 Проголосовать: не нравится

                new task dialog is not showing up.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  7 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  Event Log is showing : CHelper: Unable to parse task from codechef

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  7 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  That means that CHelper can't parse this particular task from codechef — they do not have any fixed format

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  7 лет назад, # ^ |
                  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.

              • »
                »
                »
                »
                »
                »
                »
                »
                7 лет назад, # ^ |
                  Проголосовать: нравится 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 лет назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

      Egor Can you share the wiki link you mentioned above for instructions?

»
7 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Are there any plugin like CHelper for C++ in CLion IDE?

»
6 лет назад, # |
  Проголосовать: нравится 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?

»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I think the new "Copy" feature has caused some problems in parsing the task's Test Cases.

»
6 лет назад, # |
Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

One question and one feedback! Egor

Q: 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.

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Is there a list of supported sites for CHelper/CHelper Extension? I can't seem to find it anywhere.

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится -11 Проголосовать: не нравится

Did anyone else face the same issue? For multiple nested classes like _1000E.Bridges.edge, the code in output file converts to _1000E.edge.Bridges, which leads to compilation error.

»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Chelper not working after latest update of Intellij Idea
Exception in thread "main" java.lang.ClassNotFoundException: soln.TaskA at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at net.egork.chelper.tester.NewTester.test(NewTester.java:75) at net.egork.chelper.tester.NewTester.main(NewTester.java:28)

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I am working on this, but I am not sure I will finish before the round. You can install previous version temporarily

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Ok. Thank you. for temporary purpose when I run the tasks created before this update and then run newly created task , it works fine.

      • »
        »
        »
        »
        6 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        For some reason new version of idea skips on compiling before running corresponding configuration types. I fixed this, you can download new version from repository

        • »
          »
          »
          »
          »
          6 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Thanks man for such instant response. Love from java user.

        • »
          »
          »
          »
          »
          6 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Have you updated it in Plugins of IDEA. As this update is not showing there, so the problem still persists.

          • »
            »
            »
            »
            »
            »
            6 лет назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится
            • »
              »
              »
              »
              »
              »
              »
              6 лет назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится

              I'm still using version 4.3.1 because 4.4.2 doesn't work. I was unable to compete in 499 round just because i updated chelper as idea suggested me and after that i returned 4.3.1.

              • »
                »
                »
                »
                »
                »
                »
                »
                6 лет назад, # ^ |
                  Проголосовать: нравится 0 Проголосовать: не нравится

                How exactly it does not work? And what version of idea do you use?

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  I don't know if this is magic but I updated idea version from 2018.1 to 2018.2 and now it works. I'm sorry and thank you =).

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  It seems new version do not work with old versions of idea

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 лет назад, # ^ |
                    Проголосовать: нравится +3 Проголосовать: не нравится

                  Same occured with me. correctly parsing task after IDEA update. Everything is working again.

»
6 лет назад, # |
Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

CHelper Setup Steps: (as of July 2018)

  • Download and install the latest version of IntelliJ
  • Create a new empty java project
  • Copy the chelper.properties file to the root folder of the project
  • From the plugin browser install the latest version of CHelper (restart idea)
  • Do not copy any chelper jar manually anywhere, those instructions are deprecated
  • In the chelper.properties file make sure the paths assigned to archiveDirectory, defaultDirectory, outputDirectory and testDirectory are inside src/ or otherwise marked as source folders
  • Optionally "Edit Project Settings" and use InputReader and OutputWriter as in/out classes (the are part of the chelper library)
  • Optionally download https://github.com/EgorKulikov/yaal/tree/master/lib/main/net/egork to have access to a lot of implemented algorithms. Add it to the src/ folder
  • Optionally install the Competitive Companion chrome/firefox extension. It works magically
  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    archiveDirectory actually may not be in source, while it is not mandatory for outputDirectory to be a source one. Otherwise — sound advice

    • »
      »
      »
      5 лет назад, # ^ |
      Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

      I have followed the advice above. I can generate some files using "Parse Contest" button, but:

      • tests are not parsed (when I click Edit Tests, it's empty)
      • Google Chrome plugin doesn't work (nothing happens when I open Codeforces page)
      • also, when Main.java is generated, it doesn't contain implementation of the InputReader and OutputWriter (in the project settings, I've specified net.egork.chelper.util.InputReader and net.egork.chelper.util.OutputWriter). Instead, it contains this:
          static class InputReader extends InputStream {
              InputReader;
      
              int read();
      
              int readInt();
      
              String readString();
      
          }
      
          static class OutputWriter {
              OutputWriter;
      
              void print;
      
              void close();
      
          }
      

      Any idea what I may be missing?

      I use

      • macOS Mojave Version 10.14.5
      • IntelliJ IDEA 2019.1.3 (Community Edition)
      • IDEA Plugin v4.4.2
      • Google Chrome Version 75.0.3770.100 (Official Build) (64-bit)
      • Chrome CHelper extension 4.4.3.1
      • »
        »
        »
        »
        5 лет назад, # ^ |
        Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

        OK, I kinda made it work by the following actions:

        1. Switched to Windows 10 instead of macOS
        2. I realized that the reason why InputReader and OutputWriter implementations were missing was that the plugin had nowhere to take the source code from. So, I downloaded the library from https://github.com/EgorKulikov/yaal/tree/master/lib/main/net/egork and in the settings, changed net.egork.chelper.util.InputReader and net.egork.chelper.util.OutputWriter to net.egork.io.InputReader and net.egork.io.OutputWriter, respectively.
        3. Added IDEA to the firewall exceptions

        Now:

        1. Main.java is generated and compiled successfully
        2. Competitive Companion chrome extension works (I didn't try CHelper extension on Windows)
        3. Tests are parsed when I add a task through the Chrome extension

        However:

        1. Tests are not parsed when I add a task through "Parse Contest" button in IDEA
        2. I cannot find out how to generate JUnit tests. I have checked the "Enable Unit Tests" checkbox in the project settings and made sure Test directory is correct. But, nothing happens
        3. I would still love to make it work on Mac, so any advice is appreciated
»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Installed Chelper from the repository in idea and then restarted idea.But none of the action is working. Also nothing opens when parse a problem from the browser. (Using Ubuntu operating system)

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Had you configured project as described one comment up from yours?

»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

where to find the chelper.properties file

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Hi Egor, when parsing Codeforces tasks in IDEA, tests are not created.

CHelper version: 4.4.2
IDEA version: 2018.2.3

CHelper Chrome extension stopped working for Codeforces as well.

CHelper extension version: 4.2.1.1
Chrome version: 69.0.3497.81
»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hi Egor , All tools [Create Task , Parse Contest ,all] everything is working well except the one small issue. The Parser is not working properly (It parses the problem correctly ,but not able to parse Sample TC , mention in the problem).

( IntelliJ Version 2018 2.5. CHelper Version 4.4.2 Window 10 )

Tried most of possible sol , Still not getting desirable result.

Anybody has the same issue ?

Thx alot :)

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +10 Проголосовать: не нравится

    Lol. Forget about using the built-in parser for CHelper. Use Competitive Companion (link). This is a much more well-developed and better supported parser and works with CHelper.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Решил таки попробовать заменить плагин Competitive Companion для хрома на CHelper extension, но столкнулся с одной странностью: в каталоге расширений присутствуют две копии этого плагина, у первого есть 30 оценок и 665 пользователей, его версия 4.2.1.1, в то же время у второго нет оценок, всего 16 пользователей, но его версия повыше — 4.3.1.1.

Является ли вторая копия бета-версией или это вышло случайно? Я так вижу, они не одновременно с самим плагином обновляются, потому что версия плагина сейчас 4.4.2.

»
5 лет назад, # |
Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

Hey I am getting this error while running the code!!

java.lang.NullPointerException at net.egork.chelper.codegeneration.CodeGenerationUtilities.getSimpleName(CodeGenerationUtilities.java:410) at net.egork.chelper.codegeneration.SolutionGenerator.createMainClassTemplate(SolutionGenerator.java:498) at net.egork.chelper.codegeneration.SolutionGenerator$3.run(SolutionGenerator.java:574) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1057) at net.egork.chelper.codegeneration.SolutionGenerator.createSourceFile(SolutionGenerator.java:557) at net.egork.chelper.util.TaskUtilities.createSourceFile(TaskUtilities.java:21) at net.egork.chelper.configurations.TaskConfiguration.getState(TaskConfiguration.java:73) at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:158) at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:55) at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:50) at com.intellij.execution.ProgramRunnerUtil.executeConfigurationAsync(ProgramRunnerUtil.java:92) at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:41) at com.intellij.execution.impl.ExecutionManagerImpl.restart(ExecutionManagerImpl.java:93) at com.intellij.execution.impl.ExecutionManagerImpl.access$300(ExecutionManagerImpl.java:44) at com.intellij.execution.impl.ExecutionManagerImpl$3.run(ExecutionManagerImpl.java:442) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:232) at com.intellij.util.Alarm$Request.runSafely(Alarm.java:356) at com.intellij.util.Alarm$Request.run(Alarm.java:343) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:228) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315) 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)

Egor can anyone help me out??

I am using intellij 2018.3.3 verion and chelper 4.4.2v

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Please help.

I am getting this error on IntelliJ IDEA 2018.1.3 with CHelper 4.4.2 and jdk1.8.0_181 Error:

Exception in thread "main" java.lang.ClassNotFoundException: codes.TaskD
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at net.egork.chelper.tester.NewTester.test(NewTester.java:81)
	at net.egork.chelper.tester.NewTester.main(NewTester.java:34)

Image of Project structure and chelper.properties file

»
5 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

I installed idea Intellij and also added the chelper plugin but when i parse a task from codeforces its not adding the testcases automatically.. Rest all are working correctly. can anyone help. I added the plugin from idea intellij store as well as tried downloading the plugin and loading from disk. can anyone please help . I am using Idea Intellij 2018.3.3 version. Test cases are not being parsed. please help.

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Egor Not Compatible with Latest Intellij Idea.

Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper at net.egork.chelper.tester.NewTester.(NewTester.java:24) Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) Please update

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

I have tried installing plugin from File -> Settings... -> Plugins. I kept receiving an error:

Error: Could not find or load main class net.egork.chelper.tester.NewTester

Probably, that was due to absence of the chelper.jar on the classpath. So I tried downloading the plugin from the Intellij IDEA site, and after unzipping it, I have selected the bunch of jars in the File -> Project Structure -> Libraries -> + -> Java -> <path_to_the_bunch_of_chelper_jars>. For a brief period, it helped me, and the tests started to run when I run the problem task. But after some changes, which I cannot reproduce exactly, things went yet another way wrong. Now I keep receiving the following error:

Error running 'A - <task_header>': com/github/cojac/CojacAgent

Despite the fact, the library cojac.jar is on the classpath along with chelper.jar. What could be done here?

UPD: The problem has been solved. If you experience a similar problem, please try to update everything you have. Install plugin of the previous version and then update it when Intellij IDEA advises you to do so.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Hey, I am facing the exact same issue. Can you elaborate a little more how to solve this issue? Waylesange Thanks

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      OK, just try to keep it simple. I suggest you update Intellij IDEA to the latest version. Secondly, you go to File -> Settings... -> Plugins and search for the chelper plugin. It is required to run the task run configurations, and it supplies you with the buttons on the toolbar, too. After you have done that, you should be getting the error about impossibility to find and load class from net.egork... Now you go to the jetbrains plugin site, search for chelper plugin there, and download the latest zip archive. After unzipping it, go to File -> Project Structure... -> Libraries -> + -> Java, select recursively the folder you just unzipped until you get to a bunch of jars that contain that missing class in the error. After you have added those jars to your classpath, along with JDK, it should be enough to parse a problem from codeforces site using Google Chrome plugin. Thus, you get the tests inherent to the problem as well, whereas if you are importing the problem from within Parse contest menu of chelper, you won't get the tests, which is sad and needs to be fixed by Egor Kulikov. I hope my experience helps you!

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I have installed the latest IDE and Chelper 4.4.2.
And I have also manually added all jar files using the Project Settings option. Although everything is working fine, i.e test cases are running and showing results, there are exceptions arising between the test cases on the console.

COJAC-AGENT EXCEPTION FOR CLASS jdk/net/ExtendedSocketOptions java.lang.IllegalArgumentException


Such COJAC-AGENT EXCEPTION is being shown for multiple classes even for InputReader and OutputWriter.
Can someone help on how to get rid of those exceptions?
Although they are not crashing anything, they are frustrating as they are visible in between the test case lines.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It is showing "All test passed" inspite of a wrong solution. How to resolve it?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    Which parsing tool had you used? As you can see there were no tests

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Yeah me too facing the same problem but i didn't used any parsing tool. I parsed the contest using the contest parser of chelper.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        You should use Competitive Companion. CHelper parser is rather outdated.

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          how to parse using Competitive Companion. Is there any good video's teaching that.

          • »
            »
            »
            »
            »
            »
            4 года назад, # ^ |
            Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

            I don't think you need a video to do that. Let me give a brief explanation (assuming CHelper is already set up):
            1. Install Competitive Companion
            2. Restart Intellij IDEA
            3. Open up the page of a problem
            4. Click on Competitive Companion (the extension it should be a green plus)

            That should do it. Note that you don't have to repeat step 2 every time but it's important to do that upon installing Competitve Companion.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I have installed chelper plugin in Intellij ide.I was able to parse the contest questions but for every task it shows 0 test cases.Its not able to parse the sample test cases,how do i resolve this issue?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hello Egor,

When I parse a contest from CodeForces, it parses the tasks fine, but without tests.

CHelper version: 4.4.2

Intellij Idea Community Ed: 2020.1.2

I can also see the following exception (stacktrace) in the Idea logs:

java.lang.IncompatibleClassChangeError: Method 'com.intellij.openapi.roots.libraries.LibraryTable com.intellij.openapi.roots.impl.libraries.ProjectLibraryTable.getInstance(com.intellij.openapi.project.Project)' must be InterfaceMethodref constant
	at net.egork.chelper.util.Utilities$2.run(Utilities.java:108)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:976)
	at net.egork.chelper.util.Utilities.fixLibrary(Utilities.java:105)
	at net.egork.chelper.actions.EditProjectProperties.actionPerformed(EditProjectProperties.java:21)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:280)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:274)
	at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:184)
	at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:157)
	at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:442)
	at java.desktop/java.awt.Component.processEvent(Component.java:6415)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5025)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4857)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4857)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:974)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:912)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:844)
	at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:741)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    This is because Codeforces changed DOM structure of pages a little bit ago. You can use Competitive Companion extension for Chrome for now while I am working on major overhaul of CHelper

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Thank you for your response!

      Do you have any idea about the timeline of those changes?

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        You mean the overhaul? Not sure, even alpha is quite some time away. But Competitive Companion is really cool extension, you should try it

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Tried, works like a charm, thanks for that!!

          Once I have your attention, let me ask another question :) Recently, after a bit of break in competitive programming, I noticed that two of the great Java users — Petr and yourself have switched to GNU C++17 by preserving the coding styles. I'm wondering what the reason was behind switching to C++ after a long period of Java usage in competitive programming.

          PS. I have found the solutions by both of you useful and got some ideas to enrich my toolbox for CP. Thanks for that as well.

          • »
            »
            »
            »
            »
            »
            4 года назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            It sseems most authors stopped to even pretending they care about Java — no reference solutions, and hence — problems with tl

            • »
              »
              »
              »
              »
              »
              »
              15 месяцев назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится

              @Egor I am getting this error.My intellij Ide is not opeoning

              Internal error. Please refer to https://jb.gg/ide/critical-startup-errors

              com.intellij.diagnostic.PluginException: Fatal error initializing 'net.egork.chelper.CHelperMain' [Plugin: CHelper] at com.intellij.serviceContainer.ComponentManagerImpl.handleInitComponentError$intellij_platform_serviceContainer(ComponentManagerImpl.kt:571) at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:59) at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154) at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133) at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99) at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132) at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:92) at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:77) at com.intellij.serviceContainer.ComponentManagerImpl$createInitOldComponentsTask$1.invoke(ComponentManagerImpl.kt:394) at com.intellij.serviceContainer.ComponentManagerImpl$createInitOldComponentsTask$1.invoke(ComponentManagerImpl.kt:392) at com.intellij.idea.ApplicationLoader$initApplicationImpl$appInitializedListeners$1$1$2$1.invokeSuspend(ApplicationLoader.kt:139) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:389) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92) Caused by: java.lang.NoClassDefFoundError: com/sun/net/ssl/HostnameVerifier at net.egork.chelper.CHelperMain.initComponent(CHelperMain.java:17) at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:45) ... 25 more Caused by: java.lang.ClassNotFoundException: com.sun.net.ssl.HostnameVerifier PluginClassLoader(plugin=PluginDescriptor(name=CHelper, id=CHelper, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\IdeaIC2022.3\plugins\chelper, version=4.4.2, package=null, isBundled=false), packagePrefix=null, instanceId=107, state=active) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:217) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ... 27 more

              ----- Your JRE: 17.0.5+1-b653.25 amd64 (JetBrains s.r.o.) C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.2\jbr

              • »
                »
                »
                »
                »
                »
                »
                »
                15 месяцев назад, # ^ |
                  Проголосовать: нравится 0 Проголосовать: не нравится

                Yeah, sorry, it is not compatible with recent versions of idea

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  15 месяцев назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  That means We cant use Chelper .

                  Is there any alternative way to use Chelper?

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  15 месяцев назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  You can use it with older idea. I hope to sometime do next iteration, but atm I do not have time for it

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  15 месяцев назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  @Egor Why dont u add Chelper in MarkretPlace in intellij Idea

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  15 месяцев назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  It was there, I guess it got removed because it is no longer compatible with last version of idea

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Egor Getting the following error while try to run the program.

Error: Could not find or load main class net.egork.chelper.tester.NewTester Caused by: java.lang.ClassNotFoundException: net.egork.chelper.tester.NewTester

»
3 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I was able to resolve the most common errors while setting up chelper with competitive companion chrome extension. Tried to cover all possible errors in my video so that others don't have to read so many comments to solve the common bugs

Youtube Video Link

»
16 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hello,

After installing the CHelper plugin, Intellij Idea fails to start up.

IntelliJ Error stacktrace
  • »
    »
    15 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Same Problem here. How did you resolve your issue.

    • »
      »
      »
      15 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      The solution for me was to fork the original github repo of the plugin and remove those lines that are causing issues. Then build the project and use it. I find it easier to build it using gradle, so picked a fork of the project that's already migrated to gradle.

»
7 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Keeps crashing on start