How can I reload the project after adding a new file?
Hello,
I´m creating a new file in the root directory, but it´s not showing up until I refresh the project.
Project project = event.getData(PlatformDataKeys.PROJECT); VirtualFile root = project.getProjectFile().getParent().getParent(); boolean result = FileUtil.createIfDoesntExist(new File(root.getPath() + "/notes.note"));
How can I do it programmatically?
Please sign in to leave a comment.
You need to "synchronize". Try the refresh() method in the VirtualFileManager.
You might wanna search the forum with "synchronize" as tag. You will get the answers you need.
Especially check the discussion thread "Synchronize a Folder" (http://devnet.jetbrains.com/message/5156789)