简体   繁体   English

如何避免新项目自动链接到主项目?

[英]How to avoid a new project from being linked to the primary project automatically?

In PyCharm, I'd like that every new project will not be linked to the primary project automatically when I create it.在 PyCharm 中,我希望每个新项目在创建时不会自动链接到主项目。 Is there a way to do it properly?有没有办法正确地做到这一点?

When a new project is created and attached to the current window, it is automatically linked to the primary project:当创建一个新项目并附加到当前 window 时,它会自动链接到主项目:

截图新项目。

Is there a way to do it properly?有没有办法正确地做到这一点?

The simple answer is: No, this can't be done currently.简单的答案是:不,目前无法做到这一点。

If you select "Open projects in the same window" and "Attach", see Open multiple projects .如果您 select “在同一窗口中打开项目”和“附加”,请参阅打开多个项目 PyCharm's default behavior is linking the new projects as dependencies of the primary project. PyCharm 的默认行为是将新项目链接为主项目的依赖项。

There is no setting in the IDE to change this default behavior, if you want to remove the dependencies you'll have to do it manually in File > Project > Project Dependencies > Project depends on these projects . IDE 中没有设置来更改此默认行为,如果要删除依赖项,则必须在File > Project > Project Dependencies > Project depends on these projects中手动进行。



You can customize the "Project opening policy" at Appearance and Behavior > System Settings > Project but that only changes the dialogue, not the automatic setting of the dependency if opening in the same window.您可以在Appearance and Behavior > System Settings > Project中自定义“项目打开策略”,但这只会更改对话框,如果在同一个 window 中打开,则不会更改依赖项的自动设置。

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

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