How can I reload the project after adding a new file?


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?

1 comment
Comment actions Permalink

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" (


Please sign in to leave a comment.