Implementing Trusted Project functionality


In my project, I support two build systems. I'm not using the External Systems API. I'm in the middle of implementing support for Package Search, and that is currently failing for me because the projects imported using my integrations aren't trusted. I've looked at how the External Systems API does it, and it looks like it calls TrustedProjects#confirmOpeningUntrustedProject() from the ProjectOpenProcessor. Is that all I have to do? I'm pretty sure there are project open and import flows that don't pass through the ProjectOpenProcessor - how are they handled?


Hi Colin. We're currently in the process of rewriting the Trusted Projects mechanics and API. We're going to make it easier for clients/subsystems/plugins in 2021.3.

Instead of postponing the "do you trust this project?" question until a potentially dangerous feature tries to execute, the IDE will show the Trusted Projects dialog on the first opening of any project. So there will be no "unknown" trusted state anymore, and your plugin will only need to check whether the project is trusted or not without asking any additional questions to the user. If the project is not trusted, i.e. is opened in the safe mode, you won't execute the dangerous procedure. If the project becomes trusted, then you should turn on the dangerous feature.

So I suggest you to wait for the new API to avoid changing the code twice. I think it will be ready within next couple of weeks.


Ok thanks Kirill, I'll wait for that then, and in the meantime just mark all projects as trusted. Having it available for 2021.3 will work for me since the thing that depends on it (package search) is also only going to be in 2021.3 in my plugin.


Please sign in to leave a comment.