简体   繁体   English

如何设置CHelper和在IntelliJ上配置?

[英]How to setup CHelper and configure on IntelliJ?

I tried for last two days. 我尝试了最后两天。 But I always draw a blank. 但是我总是空白。 I have trouble in setting up the project, and adding dependencies - and creating tasks - it always shows some error or the other. 我在设置项目,添加依赖项以及创建任务时遇到麻烦,它总是显示一些错误或其他错误。

I followed instructions from here Created a tusk and when I tried to run it, ended up with this exceptions 我按照这里的说明创建了一个象牙,当我尝试运行它时,出现了此异常

java.lang.NullPointerException
at net.egork.chelper.codegeneration.CodeGenerationUtilities.getSimpleName(CodeGenerationUtilities.java:374)
at net.egork.chelper.codegeneration.SolutionGenerator.createMainClassTemplate(SolutionGenerator.java:432)
at net.egork.chelper.codegeneration.SolutionGenerator$3.run(SolutionGenerator.java:503)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:974)
at net.egork.chelper.codegeneration.SolutionGenerator.createSourceFile(SolutionGenerator.java:488)
at net.egork.chelper.util.TaskUtilities.createSourceFile(TaskUtilities.java:14)
at net.egork.chelper.configurations.TaskConfiguration.getState(TaskConfiguration.java:65)
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.a(ExecutionManagerImpl.java:375)
at com.intellij.execution.impl.ExecutionManagerImpl.access$400(ExecutionManagerImpl.java:60)
at com.intellij.execution.impl.ExecutionManagerImpl$4.run(ExecutionManagerImpl.java:368)
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:318)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:748)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

So I will appreciate if there is someone who is using it currently and give me a step by step full instruction form first to last, not only setup but also how to configure properly. 因此,如果有人当前正在使用它,请给我一个逐步完整的说明表格,从头至尾,不但设置而且正确配置,也将不胜感激。

I have installed chelper and now its working properly. 我已经安装了chelper,现在可以正常使用了。 I am on ubuntu 16.04 and using intelliJ IDEA 16.2.2 我在ubuntu 16.04上并使用智能IDEA 16.2.2

Steps: 脚步:

Select menu item File->Settings... , select Plugins in IDE Settings , push Browse repositories... button, right click on CHelper and select Download and Install (dont install the beta version). 选择菜单项“ 文件”->“设置...” ,在“ IDE设置”中选择“ 插件 ,按“ 浏览存储库...”按钮,右键单击CHelper并选择“ 下载并安装” (不要安装beta版本)。 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 ) 右键单击主工具栏,选择“ 自定义菜单和工具栏...” ,选择要列出操作的位置(“ 主工具栏”的结尾可能是好的),单击“ 添加之后...” ,选择“ 插件”->“ CHelper”并添加您感兴趣的动作(可能是Task以外的所有动作)

After that open or create project that you want to use with plugin and click on Edit Project Settings from toolbar to set-up project directories. 之后,打开或创建要与插件一起使用的项目,然后从工具栏单击“ 编辑项目设置”以设置项目目录。

This is the simplest project settings that works fine for me. 这是最简单的项目设置,适合我。

在此处输入图片说明

now for testing you can parse a contest or problem form Parse Contest from toolbar. 现在进行测试,您可以从工具栏解析竞赛或问题表“ 解析竞赛” parse a problem. 分析问题。 you will find the problem(task) in you src/code folder and and after compiling the source will be create in test directory under project. 您将在src/code文件夹中找到问题(任务),并且在编译后将在project下的test目录中创建源。 and the name of the file will be Main.java , You can also copy source form the menu. 文件名称为Main.java ,也可以从菜单复制源。

Browese this wiki page , for more information. 浏览此Wiki页面 ,以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM