Java IntelliJ 中的 Eclipse 工作区等效吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30463738/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse workspace equivalent in IntelliJ?
提问by Dims
It is said in IntelliJ IDEA Q&A for Eclipse Usersthat Eclipse Workspace is equivalent to "project" in IntelliJ
terms, while Eclipse's project is equivalent to IntelliJ's module.
这是在说IntelliJ IDEA的Q&A为Eclipse用户了Eclipse工作区是等同于“工程”IntelliJ
方面,而Eclipse的项目等同于的IntelliJ的模块。
But after I created a project untitled
and then created module untitled2
I got the following picture
但是在我创建了一个项目untitled
然后创建了模块之后untitled2
我得到了下面的图片
I would think untitled
is a project and untitled2
is a module, but both has src
subfolders and listed in
我认为untitled
是一个项目并且untitled2
是一个模块,但两者都有src
子文件夹并列在
so, both are modules of different level. Is this correct?
所以,两者都是不同级别的模块。这样对吗?
Is it possible to create module untitled3
at the same level as untitled
?
是否可以创建untitled3
与 相同级别的模块untitled
?
How to create several modules of the same level without topmost one?
如何在没有最顶层的情况下创建多个相同级别的模块?
采纳答案by Darek Kay
If you want to simulate the Eclipse workflow, you should create an empty project (~ workspace) first:
如果要模拟 Eclipse 工作流,应先创建一个空项目(~工作区):
New Project > Empty Project
New Project > Empty Project
Now you can create separate modules (~ projects) to be shown exactly like you want:
现在您可以创建单独的模块(〜项目)以完全按照您的需要显示:
You could also select untitled2
, press F6(Refactor > Move
) and move it one level up in your directory. While creating untitled3
you can specify the folder for your module (use IdeaProjects
instead of untitled
).
您也可以选择untitled2
,按F6( Refactor > Move
) 并将其在您的目录中向上移动一级。在创建时,untitled3
您可以为您的模块指定文件夹(使用IdeaProjects
而不是untitled
)。
回答by hitz
The workspace equivalent term refers to Project Window in intellij. It will consists of modules which are equivalent of individual projects in Eclipse.
工作区等效术语是指 intellij 中的项目窗口。它将由相当于 Eclipse 中单个项目的模块组成。
EDIT:You can right click on untitled
module and go to Open Module Settings
. And select Modules
in project settings. With +
sign you can choose to create new module. This should create new module on same level as untitled
编辑:您可以右键单击untitled
模块并转到Open Module Settings
. 并Modules
在项目设置中选择。有了+
标志,您可以选择创建新模块。这应该创建与相同级别的新模块untitled
回答by Andrew Tobilko
回答by Meo
Modules can be created on any level and any location, regardless the project location. You can safely remove the "parent" module.
无论项目位置如何,都可以在任何级别和任何位置创建模块。您可以安全地删除“父”模块。