Skip to content

Commit

Permalink
Replaced deprecated field ProjectTopics.MODULES with ModuleListener.T…
Browse files Browse the repository at this point in the history
…OPIC
  • Loading branch information
aparnamichael committed Jul 10, 2024
1 parent 41efb80 commit ae5ba83
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public MicroProfileProjectService(Project project) {
LibraryTablesRegistrar.getInstance().getLibraryTable(project).addListener(this, project);
connection = ApplicationManager.getApplication().getMessageBus().connect(project);
connection.subscribe(VirtualFileManager.VFS_CHANGES, this);
project.getMessageBus().connect().subscribe(ProjectTopics.MODULES, this);
project.getMessageBus().connect().subscribe(ModuleListener.TOPIC, this);
}

private void handleLibraryUpdate(Library library) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.ModuleListener;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.libraries.LibraryTablesRegistrar;
import com.intellij.openapi.util.Pair;
Expand Down Expand Up @@ -80,7 +81,7 @@ public ClasspathResourceChangedManager(Project project) {
// Track update of Psi Java, properties files
PsiManager.getInstance(project).addPsiTreeChangeListener(listener, project);
// Track modules changes
projectConnection.subscribe(ProjectTopics.MODULES, listener);
projectConnection.subscribe(ModuleListener.TOPIC, listener);
// Track delete, create, update of file
appConnection = ApplicationManager.getApplication().getMessageBus().connect(project);
appConnection.subscribe(VirtualFileManager.VFS_CHANGES, listener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private PsiMicroProfileProjectManager(Project project) {
microprofileProjectListener = new MicroProfileProjectListener();
connection = project.getMessageBus().connect(project);
connection.subscribe(ClasspathResourceChangedManager.TOPIC, microprofileProjectListener);
connection.subscribe(ProjectTopics.MODULES, microprofileProjectListener);
connection.subscribe(ModuleListener.TOPIC, microprofileProjectListener);
}

public PsiMicroProfileProject getMicroProfileProject(Module project) {
Expand Down

0 comments on commit ae5ba83

Please sign in to comment.