当我们右键单击并选择“新建”时,IntelliJ不显示“类”

当我们右键单击并选择“新建”时,IntelliJ不显示“类”

问题描述:

我们在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?

编辑:答案是基本的: '当你意识到某些事情没有工作因为你没有点击'申请'时... ...当我们发现这个'时,我们对自己好笑/ em>

The answer is basic: 'That moment when you realise somethings not working because you haven't been clicking 'Apply'... :) We had a good laugh at ourselves when we discovered this'

目录或其中一个父目录必须标记为 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.