如何在intellij-idea中订购模块? [英] How to order modules in intellij-idea?

查看:197
本文介绍了如何在intellij-idea中订购模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我在Intellij-Idea中有很多模块的项目:

Say I have project with a lot of modules in Intellij-Idea:


  • A

  • B

    ...

  • Z

在特定时间我只需要使用2个或3个模块:A,M,Z。因此从项目浏览器中隐藏所有其他模块会非常方便。或重新订购包裹如:

In specific time I need to work with only 2 or 3 modules: A, M, Z. So it would be very convenient to hide all other modules from Project Browser. Or to reorder packages like:


  • A

  • M

  • Z

  • B

  • ...

  • A
  • M
  • Z
  • B
  • ...

有没有办法做到这一点?

Is there any way to do that?

更新:我不想删除非活动模块,我只想对我正在使用的模块进行分组。

UPDATE: I don't want to delete inactive modules, I just want to group modules I'm working with.

推荐答案

无法更改模块的顺序。但是有两种方法可以做你想要的。

There is no way to change the order of the modules. But there are two ways you could do what you want.


  1. 模块组

  1. Module Groups

转到文件>项目结构> [模块] ,创建一些模块组。通过选择一个或多个模块将模块移动到模块组,打开上下文菜单(即右键单击)并选择将模块移动到组。您可以创建一个新组,选择一个现有组,或将它们移到任何组之外:

Create some module groups by going to File > Project Structure > [Modules]. Move modules to a module group by selecting one of more modules, open the context menu (i.e. right click) and select Move Module to Group. You can create a new group, select an existing group, or move them outside any group:

然后在项目视图中,您可以使用不需要的模块折叠组专注在。所有模块仍然存在且可用(即没有模块被删除)。在帮助指南中搜索分组模块以获取更多信息。

Then in the project view, you can collapse the group(s) with the modules you do not want to focus on. All modules are still present and available (i.e. no modules are deleted). Search Grouping Modules in the help guide for more information.


  1. 范围视图

  1. Scope View

定义范围(设置>外观和行为>范围)只显示您感兴趣的模块。有关Scope语法和如何定义模块的信息,请参阅帮助页面。然后,在项目获取窗口中,选择范围视图:

Define a Scope (Settings > Appearance & Behavior > Scopes ) that will only show the modules you are interested in. See the Help page for information on Scope syntax and how to define modules. Then, in the project took window, select the scope view:

第一个选项可能更容易两个。

The first option is probably the easier of the two.

这篇关于如何在intellij-idea中订购模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆