简体   繁体   English

如何链接到intellij中的现有项目

[英]How to link to the existing project in intellij

Eclipse has a good feature that I can link to other project in the same workspace as a dependency specified in pom.xml. Eclipse具有一项很好的功能,即我可以与pom.xml中指定的依赖项链接到同一工作区中的其他项目。 Is it possible for me to do the same in intellij ? 我可以在intellij中做同样的事情吗?

Of-course you can do, I am doing a sbt project having dependencies of multiple projects. 当然可以,我正在做一个具有多个项目依赖项的sbt项目。 It will be easy to debug if you attach the dependent projects. 如果附加从属项目,则调试起来很容易。 It can be achieved easily by holding the ctrl and mouse clicking on any of the methods from the other projects in your current project. 通过按住ctrl和鼠标单击当前项目中其他项目中的任何方法,可以轻松实现此目标。 It will open the compiled code of the same. 它将打开相同的编译代码。 Then to the right top corner you can find Choose Sources... . 然后在右上角可以找到Choose Sources... Click that and in the explorer go to your dependency project and select the source. 单击该按钮,然后在资源管理器中转到您的依赖项项目,然后选择源。 There you can see other project in the same workspace. 在那里您可以看到同一工作区中的其他项目。

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

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