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?

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" (http://devnet.jetbrains.com/message/5156789)

0

Please sign in to leave a comment.