Programmatically refresh the files list

Hi,

we are currently migrating the plugins from version 17 to 21.

We are facing a problem with the file list. As we add or remove a file in the project via the plugin.

In the previous version we just needed to open the project, call the activation on the project controller and on the files controller and the list was refreshed.

As from now, the same code doesn't refresh the list anymore, it is only refreshed if the user press F5 key.

Could anyone help me on that case as I cannot find a way to do it.

Sorry if it's the wrong place to post.

Regards,

Jean-François