Search in sources :

Example 81 with MessageBusConnection

use of com.intellij.util.messages.MessageBusConnection in project intellij-plugins by JetBrains.

the class OsmorcProjectComponent method initComponent.

@Override
public void initComponent() {
    MessageBusConnection connection = myProject.getMessageBus().connect();
    connection.subscribe(FrameworkDefinitionListener.TOPIC, new MyFrameworkDefinitionListener());
    connection.subscribe(ProjectTopics.MODULES, new MyModuleRenameHandler());
    Workspace workspace = BndProjectImporter.findWorkspace(myProject);
    if (workspace != null) {
        connection.subscribe(VirtualFileManager.VFS_CHANGES, new MyVfsListener());
    }
}
Also used : MessageBusConnection(com.intellij.util.messages.MessageBusConnection) Workspace(aQute.bnd.build.Workspace)

Aggregations

MessageBusConnection (com.intellij.util.messages.MessageBusConnection)81 Project (com.intellij.openapi.project.Project)16 NotNull (org.jetbrains.annotations.NotNull)15 Module (com.intellij.openapi.module.Module)11 ModuleRootEvent (com.intellij.openapi.roots.ModuleRootEvent)10 ModuleListener (com.intellij.openapi.project.ModuleListener)8 ModuleRootListener (com.intellij.openapi.roots.ModuleRootListener)8 VirtualFile (com.intellij.openapi.vfs.VirtualFile)7 Disposable (com.intellij.openapi.Disposable)6 Document (com.intellij.openapi.editor.Document)6 VFileEvent (com.intellij.openapi.vfs.newvfs.events.VFileEvent)5 Update (com.intellij.util.ui.update.Update)5 ApplicationManager (com.intellij.openapi.application.ApplicationManager)4 StringUtil (com.intellij.openapi.util.text.StringUtil)4 ProcessHandler (com.intellij.execution.process.ProcessHandler)3 Application (com.intellij.openapi.application.Application)3 FileDocumentManagerAdapter (com.intellij.openapi.fileEditor.FileDocumentManagerAdapter)3 ModuleRootAdapter (com.intellij.openapi.roots.ModuleRootAdapter)3 VFileCreateEvent (com.intellij.openapi.vfs.newvfs.events.VFileCreateEvent)3 File (java.io.File)3