have IntelliJ IDEA refresh the project and detect

2019-01-21 19:14发布

I'm using Eclipse for development because of all the things IntelliJ can't do (e.g. highlight all instances of a variable) and because IntelliJ is dog slow over a remote connection. But because I still don't have Maven integrated completely into Eclipse, I have to switch back to IntelliJ to compile and run my project using Tomcat.

How can I tell IntelliJ to detect all files that have changed on the file system and recompile them? (I don't want to manually open each changed file to get IntelliJ to detect the change.) In Eclipse I would just Refresh the project tree [1]...

Footnotes:

  1. Eclipse has a feature (named "Refresh Using native hooks or polling") which you can enable to automatically detect changes and synchronise the perspective when any underlying changes are detected in the filesystem (see images below). This is quite handy and eliminates the need to manually refresh the project when using build tools - where files/directories get created in the project directory structure.

Is there anything similar for Intellij (explicit setting or otherwise) that eliminates having to click a button to synchronize the view with filesystem changes?

'Refresh Using native hooks or polling' setting

5条回答
劫难
2楼-- · 2019-01-21 19:43

You can use the "synchronize" button (two yellow arrows) or in short Ctrl+Alt+Y

查看更多
Rolldiameter
3楼-- · 2019-01-21 19:54

Intellij can highlight variable instances, you just need to enable it . Further, if you invoke compile project, Intellij will just compile changed files (and hotswap when possible, if you are in debug mode & deploying to e.g. tomcat)

查看更多
The star\"
4楼-- · 2019-01-21 19:57

I know this question was posted a few years ago, but maybe this info will help someone in the future. I was actually looking into a similar issue, and doing the following worked for me:

Go to Settings > Build, Execution, Deployment > Compiler and make sure "Make project automatically" is checked.

查看更多
迷人小祖宗
5楼-- · 2019-01-21 19:59

Click File>Synchronize (or) shortcut ctrl+Alt+Y

查看更多
闹够了就滚
6楼-- · 2019-01-21 20:04

Right click on your Project in the left pane and click on "Synchronize"

You can see the status in the round circling icon at the bottom left of the IDE

查看更多
登录 后发表回答