简体   繁体   English

IntelliJ-1个项目中的多个模块

[英]IntelliJ - Multiple modules in 1 project

Background 背景

So I recently have migrated over to Intellij from heavy use of Eclipse. 因此,最近我已从大量使用Eclipse迁移到Intellij。 My goal is to make IntelliJ (currently v14 as of posting) my primary Java IDE. 我的目标是使IntelliJ(当前为发布时的v14)成为我的主要Java IDE。 Now, I've been learning what I can over the past couple of days about IntelliJ and it's differences when compared to Eclipse so that I can move mindsets. 现在,我已经在过去的几天中学习了有关IntelliJ的知识,与Eclipse相比,它的不同之处在于我可以改变思维方式。 Things like workspace -> project, and project -> module. 诸如工作区->项目和项目->模块之类的东西。

Problem 问题

I want to have multiple modules in a project and simply group them. 我想在一个项目中有多个模块,然后简单地将它们分组。 I do not want multiple windows of IntelliJ open and have to work on multiple projects. 我不想打开IntelliJ的多个窗口,而必须在多个项目上工作。 I much prefer 1 project with many groupings of modules so that I can easily move between modules. 我更喜欢1个项目,其中包含许多模块分组,因此我可以轻松地在模块之间移动。 This was working, I starting importing/creating modules and proceeded to add them to a grouping (I had to change the view thingy to another and back for it to update. This thing: http://i.imgur.com/rOlh31h.png?1 ). 这是可行的,我开始导入/创建模块,然后将它们添加到分组中(我不得不将viewy更改为另一个视图,然后再返回以进行更新。该操作: http : //i.imgur.com/rOlh31h。 png?1 )。 Odd, but okay, it was working. 奇怪,但好的,它正在工作。 Then I was importing a module but some reason it popped up saying do I want to open a new project window, or replace the current project window, I clicked X because I wanted to cancel but it replaced my current project window. 然后,我正在导入一个模块,但是由于某种原因弹出该对话框,说我要打开一个新的项目窗口,还是替换当前的项目窗口,我单击X是因为我想取消但它替换了当前的项目窗口。 Now I've lost all the imported modules. 现在,我丢失了所有导入的模块。

Question

How can I make a project view persistent? 如何使项目视图持久化? This would be either a way to save a project and then load it later perhaps. 这可能是保存项目然后稍后再加载它的一种方式。 It's becoming quite annoying losing all my groupings of modules. 失去我所有的模块分组变得非常烦人。

There's no way to overwrite the current project's window through importing modules (as far as I know). 据我所知,无法通过导入模块覆盖当前项目的窗口。 Although, when one were to accidentally import a project (thinking they were importing a module) it would surely overwrite the project window if when prompted they chose to open in current window. 虽然,当一个人不小心导入一个项目时(认为他们正在导入一个模块),如果提示他们选择在当前窗口中打开,它肯定会覆盖项目窗口。

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

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