我可以启动 Intellij IDEA 索引作为夜间构建的最后一步吗?
在夜间构建期间,我们从多站点源代码控制存储库中提取最新提交的签入,并在顶部合并本地源代码更改并编译/构建。这给我们留下了许多文件的修改日期和内容。当我第二天早上到达并单击 Intellij IDEA 窗口时,IDEA 会重建源文件的索引。使用 Intellij IDEA 10,这会在后台发生,并且速度应该会好得多。在等待期间,我可以对源进行许多(但不是全部)操作。
在后台进行索引很棒,但是我可以运行命令来使 Intellij IDEA 重新索引文件,作为夜间构建的最后一步吗?这样,在我到达办公室之前,重新索引就已完成并准备就绪。
我想杀死并重新启动 IDEA 会起作用,但似乎有点苛刻,而且我想确定当时没有未保存的编辑。仅供参考,在 Debian Linux 上运行。
谢谢, 艾伦
During our nightly builds, we pull down the latest committed checkins from a multi-site source control repository and merge our local source changes on top and compile/build. This leaves us with modified dates and content on many files. When I arrive the next morning and click in my Intellij IDEA window, IDEA rebuilds the index over the source files. With Intellij IDEA 10, this happens in the background and the speed is supposed to be much better. While waiting, I can do many (but not all) operations on the source.
Doing the indexing in the background is great, but can I run a command to make Intellij IDEA reindex the file, as the last step of my nightly build? That way, the reindexing is complete and ready before I get to the office.
I suppose killing and restarting IDEA would work, but seems a bit harsh, and I'd want to be certain no edits were unsaved at the time. FYI, running on Debian Linux.
Thanks,
Alan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上IDEA应该通过fsnotifier自动检测外部更改并对修改的文件执行索引。如果没有发生,您可以使用 File |同步。还有设置|一般|启用此选项时,在框架激活时同步文件、最小化和恢复 IDEA 窗口应强制文件同步。
外部工具将找到 IDEA 窗口,最小化它并恢复它,这将强制同步,将其作为最后一个构建步骤运行。
您还可以编写一个简单的 IDEA 插件,它将侦听某个 TCP 端口并调用同步操作。然后制作一个连接到该端口并发送一些命令以在 IDEA 外部强制同步的工具。运行此工具作为最后一个构建步骤。
有了这样的插件,您将可以更好地控制 IDEA,并且可以在必要时调用其他操作,例如重新启动 IDEA、打开项目等。
Actually IDEA should detect external changes automatically via fsnotifier and perform indexing of the modified files. If it doesn't happen you can use File | Synchronize. There is also Settings | General | Synchronize files on frame activation, minimizing and restoring IDEA window should force files synchronization when this option is enabled.
External tool which will find IDEA window, minimize it and restore it will force synchronization, run it as your last build step.
You can also write a simple IDEA plug-in which will listen on some TCP port and invoke Synchronize action. Then make a tool which connects to this port and sends some command to force synchronization outside of IDEA. Run this tool as the last build step.
With such plug-in you will have more control over IDEA and it would be possible to invoke other actions if necessary, like restart IDEA, open project, etc.