Is there a way to refresh a directory in a project?
已回答
If I add a file outside the project it doesn't show up in the project directory structure and there is no refresh option nor does the Synchronize button work (because I believe it only works on "existing" files).
Additionally, there's no right-click menu option for refreshing a directory.
Any one know how to have Intellij either manually or automatically monitor a directory for new files?
Thanks,
--a
请先登录再写评论。
Does File | Synchronize work.
Do you have File | Settings | General | Synchronize files on frame activation enabled?
And BTW which version of IDEA and on a which OS do you use?
Which IDEA version?
> Does File | Synchronize work.
Negative. Is this option different from the Synchronize button on the toolbar? I tried both.
> Do you have File | Settings | General | Synchronize files on frame activation enabled?
Yes.
> And BTW which version of IDEA and on a which OS do you use?
10.5.2, Ubuntu 11.04 (natty)
Thanks,
--a
Which IDEA version?
10.5.2 Ubuntu 11.04 (natty)
Does your project live in a network-mounted directory?
Do you have any symlinks in a full path to your project?
Nope. Local drive/directory. No symlinks.
Do you have a fsnotifier and fsnotifier64 files in a bin/ directory?
Does it make any difference if you stop IDEA, move these files someweher (or rename them) and start IDEA?
I restarted my Linux box yesterday and now it seems to be working. I don't know what I did or didn't do. Thanks for your time.
I'd like to find if this is possible too.. I just added a new META-INF directory with a context.xml file at the root of my project (actually Idea created the folder + context file by using the steps outlined here).. Unfortunately after it created the directory + context file neither would show up in the project structure.. I tried using the synchronize feature under the File menu but no dice.. I also restarted Idea -- no change. I even moved to the latest version of Idea 12.01 released today -- no change.. Any ideas on how to get this directory to show up as part of my project?
I'm using Idea Ultimate 12.01 on the Mac platform -- all file structures are local -- no network mounts..
I created a new project from existing sources as my last test -- with that directory containing the earlier mentioned META-INF folder and Idea still skips it -- all other files are accounted for.. I'm confused!!
Please make sure that META-INF is not listed in Settings | File Types | Files and folders to ignore.
I checked and the following are listed as file types to ignore...
Any other thoughts/suggestions to try would be greatly appreciated..
Ah, actually it's a different thing. Your META-INF directory is not displayed because it's not under a content root of any module. You should create it under a module content root ot create a module for which the project root directory will be the content root.
You are correct... Once I created a module and ensured that the META-INF directory was in that module it shows up just fine! Thanks.. I think I understand Idea a bit better now! Thanks for the help!
You can use "Ctrl + Alt + Y" shortcut to synchronize. this is default shortcut. you can change it in " Options > Keymap > Main Menu > Files > Synchronize"
hope it helps
Try File => Reload All from Disk