当我们右键单击并选择“新建"时,IntelliJ 不显示“类" [英] IntelliJ does not show 'Class' when we right click and select 'New'
问题描述
我们正在 IntelliJ 中创建一个新项目,一定有问题,因为当我们右键单击目录时,选择 New,然后获取上下文菜单,未显示基于 Java 的选项.当前获取诸如文件、一些 HTML 选项、XML 选项之类的内容.
We're creating a new project in IntelliJ and must have something wrong because when we right click on a directory, select New and then get the context menu, Java based options are not shown. Currently get things like File, some HTML options, XML options.
到目前为止,我们已经假设这是我们在项目/模块配置中没有正确配置的东西.我们正在谈论的新模块是多模块项目的一部分.我们使用 Maven 网络原型创建了它.
We have assumed so far it's something we haven't configured correctly in the Project/Module configuration. The new module we are talking about is part of a multi module project. We created it using a Maven web archetype.
对配置项目性质有帮助吗?
Any help configuring the project nature?
答案很基本: '当你意识到某些东西不起作用的那一刻,因为你没有点击'应用'...... :) 我们笑得很开心当我们发现这一点时我们自己'
推荐答案
目录或父目录之一必须标记为Source Root
(在这种情况下,它显示为蓝色).
The directory or one of the parent directories must be marked as Source Root
(In this case, it appears in blue).
如果不是这种情况,请右键单击您的根源目录 -> 标记为 -> 源根目录.
If this is not the case, right click your root source directory -> Mark As -> Source Root.
这篇关于当我们右键单击并选择“新建"时,IntelliJ 不显示“类"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!