use of com.intellij.util.messages.MessageBusConnection in project go-lang-idea-plugin by go-lang-plugin-org.
the class GoBuildTagsUI method initPanel.
public void initPanel(@NotNull Module module) {
if (!module.isDisposed()) {
MessageBusConnection connection = module.getMessageBus().connect(this);
connection.subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() {
@Override
public void rootsChanged(ModuleRootEvent event) {
initComboValues(module);
}
});
initComboValues(module);
}
}
use of com.intellij.util.messages.MessageBusConnection in project intellij-community by JetBrains.
the class CompilerManagerImpl method addCompilationStatusListener.
public void addCompilationStatusListener(@NotNull final CompilationStatusListener listener) {
final MessageBusConnection connection = myProject.getMessageBus().connect();
myListenerAdapters.put(listener, connection);
connection.subscribe(CompilerTopics.COMPILATION_STATUS, listener);
}
use of com.intellij.util.messages.MessageBusConnection in project android by JetBrains.
the class AndroidStudioUsageTracker method subscribeToEvents.
private static void subscribeToEvents() {
Application app = ApplicationManager.getApplication();
MessageBusConnection connection = app.getMessageBus().connect();
connection.subscribe(ProjectLifecycleListener.TOPIC, new ProjectLifecycleTracker());
}
use of com.intellij.util.messages.MessageBusConnection in project android by JetBrains.
the class GradleSpecificInitializer method registerAppClosing.
// Registers a callback that gets notified when the IDE is closing.
private static void registerAppClosing() {
Application app = ApplicationManager.getApplication();
MessageBusConnection connection = app.getMessageBus().connect(app);
connection.subscribe(AppLifecycleListener.TOPIC, new AppLifecycleListener() {
@Override
public void appClosing() {
try {
DefaultGradleConnector.close();
} catch (RuntimeException e) {
LOG.info("Failed to stop Gradle daemons during IDE shutdown", e);
}
}
});
}
use of com.intellij.util.messages.MessageBusConnection in project android by JetBrains.
the class NdkFacet method initFacet.
@Override
public void initFacet() {
MessageBusConnection connection = getModule().getMessageBus().connect(this);
connection.subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootListener() {
@Override
public void rootsChanged(ModuleRootEvent event) {
ApplicationManager.getApplication().invokeLater(() -> {
if (!isDisposed()) {
PsiDocumentManager.getInstance(getModule().getProject()).commitAllDocuments();
updateConfiguration();
}
});
}
});
updateConfiguration();
}
Aggregations