How to listen to the library updates on Module?

已回答

I wanted to listen if user is adding a jar file to the module or not. Can we do it using PsiTreeChangeListener?

0

Just call project.getMessageBus().connect().subscribe(ProjectTopics.PROJECT_ROOTS, listener). See Javadocs of MessageBus and Topic for more details.

1

No, you need to use com.intellij.ProjectTopics#PROJECT_ROOTS instead.

0
Avatar
Permanently deleted user

How to use this class, how it works.. Could you please describe. There is no javadoc for this.

0
Avatar
Permanently deleted user

Thanks.

0

请先登录再写评论。