gpt4 book ai didi

java - 如何在 IntelliJ 上设置 CHelper 并进行配置?

转载 作者:行者123 更新时间:2023-12-01 18:09:46 25 4
gpt4 key购买 nike

我尝试了两天。但我总是一片空白。我在设置项目、添加依赖项以及创建任务时遇到了麻烦 - 它总是显示一些错误或其他错误。

我按照 here 的指示进行操作创建了一个象牙,当我尝试运行它时,最终出现了这个异常

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)

因此,如果有人目前正​​在使用它,并从头到尾给我一个逐步的完整说明,不仅包括设置,还包括如何正确配置,我将不胜感激。

最佳答案

我已经安装了 chelper,现在它可以正常工作了。我使用的是 ubuntu 16.04 并使用 intelliJ IDEA 16.2.2

步骤:

选择菜单项文件->设置...,在IDE设置中选择插件,按浏览存储库... 按钮,右键单击CHelper并选择下载并安装(不要安装测试版)。单击确定应用重新启动

右键单击主工具栏,选择自定义菜单和工具栏...,选择要列出操作的位置(可能主工具栏的末尾比较好) ,点击在...之后添加,选择插件->CHelper并添加您感兴趣的操作(可能是除任务之外的所有操作)

之后,打开或创建要与插件一起使用的项目,然后单击工具栏上的编辑项目设置以设置项目目录。

这是最适合我的项目设置。

enter image description here

现在,为了进行测试,您可以从工具栏解析竞赛解析竞赛或问题表。解析一个问题。您将在 src/code 文件夹中找到问题(任务),编译后源代码将在项目下的 test 目录中创建。文件名为Main.java,您也可以从菜单中复制源代码。

浏览此wiki page , 了解更多信息。

关于java - 如何在 IntelliJ 上设置 CHelper 并进行配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33913106/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com