Intellij Platform Plugin Listener when new project is created and built completely

Answered

I'm new in Intellij Platform Plugin Development. The required case is that i want a listener when a new project is created and built successfully (after all the required sources are created). I tried the following ones:

 - ProjectManagerListener
 - PostStartUpActivity
 - CompileTask

None of these work. The first two listeners are getting called as soon as the project is opened, i.e, before the build is finished and the files are created. But i need a listener after the build is finished so that i can access all the source folders and files. Is there any workaround for this case? 

0
6 comments

Hi,

Could you please clarify what build do you mean? Please also describe your use case if possible.

0

Hi,
I just want a listener once the new project is completely built and loaded with default files. The use case is i have to access the java and resource folders that are created initially. I can’t do it before the project is completely built and indexing are done. 

0

Hi,

It is still unclear to me what you mean.

What kind of projects do you mean? What kind of build system do you mean? Does a project use Maven, Gradle, other, or no external build system at all? Do you mean a project sync process or something else?

0

Hi, I am gonna use this plugin in Android Studio. So yes its an android project and it uses Gradle. But I’m mentioning the project sync process for the first time when a new Android Studio project is created.

0

Hi,
Thanks a lot. The GradleSyncListener just works fine. Been searching for it all along. Saved my day !!

0

Please sign in to leave a comment.