Is it possible to trigger events upon opening phpstorm?

One project I work on uploads via mapped drive. Is there any way I can setup phpstorm to map the drive upon opening and maybe unmap the drive when closing?

1
1 comment

Hi there,

On opening -- yes; Closing -- no.

https://www.jetbrains.com/help/phpstorm/2016.3/startup-tasks.html

  • For this you have to create Run/Debug Configuration and add it to the Startup Tasks list.
  • Usually it will be some Grunt/Gulp task.
  • These are per-project tasks .. so you cannot create some task that will be executed for random (any) project

 

But keep in mind -- AFAIK such task will be launched in background .. means that IDE will not wait until it finishes before start reading the project files/indexing them etc.

So if your project is all remote then this will not work well for you. For this you may try doing it differently -- create a batch file that will first mount the disk and then will launch PhpStorm and that particular project (just pass a full path to the project root folder as a parameter to PhpStorm.exe (or whatever you are using there -- could be PhpStorm64.exe etc). Then just use such batch file for that project - should work.

1

Please sign in to leave a comment.