简体   繁体   中英

Closing unused modules in intellij idea like in eclipse

As I know for now there is no any feature to do that in intellij idea. I dont know why but they dont support to do that, at least this is the result which I found with all my researching. Maybe some of us manage this problem with different ways. How do you work with multiple modules in intellij? How should I increase the performance while working with multiple projects?

Closing unused modules in intellij idea like in eclipse?

You can make that module directory as excluded from that project.

Right clicked on the directory, then goto Mark Directory As -> then click Excluded it

To Add a module back, click on Project Structure button, then goto Modules section, then you can add them back

在此输入图像描述

The Offline Module plugin let you disable or enable modules in project without deleting.

Click Disable Module in context menu in Project View, it disables the selected modules. Disabled Modules are shown in a group and can be add back by Load Module .

In Intellij 2017.2, you can easly load/unload modules or groups of modules :

  1. Right click in the "Project" view
  2. Select "Load/Unload modules"
  3. Select modules to load/unload and click OK button

加载/卸载模块截图

Warning : This is an "experimental" feature

Ref : jetbrains site

Projects in Eclipse are Modules in IntelliJ . I do not recommend using them the same way - ie importing unrelated projects as modules into one IntelliJ project.

Importing for example database project and application project into one is ok, or when working on one project means working on another. But when you import too many projects into one, you will have a problem with searching and "Go To File/Class" actions, and you will use too much heap space.

Generally, when you have a lot of opened projects, there are three problems

  • too much used heap -> GC pauses.
  • switching between them is hard
  • closing and reopening a lot of projects is hard

To solve this, I have made Frame Switcher plugin for easier switching between projects, and reopening closed ones. Also, when you have 32 bit Windows and have too many projects, then you need to start new IntelliJ instance, and Frame Switcher can integrate them.

There is also Missing Functionality plugin which lets you "Close All Other Projects".

Since the old "Offline Module" doesn't work, I made a plugin to utilize the mechanics of "Mark as Excluded" to quickly show/hide multiple modules.

Link to module here: https://plugins.jetbrains.com/plugin/7803?pr=idea

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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