Search in sources :

Example 1 with MessageBus

use of com.intellij.util.messages.MessageBus in project intellij-community by JetBrains.

the class SvnBranchConfigurationManager method setConfiguration.

public void setConfiguration(final VirtualFile vcsRoot, final SvnBranchConfigurationNew configuration) {
    myBunch.updateForRoot(vcsRoot, new InfoStorage<>(configuration, InfoReliability.setByUser), true);
    SvnBranchMapperManager.getInstance().notifyBranchesChanged(myProject, vcsRoot, configuration);
    final MessageBus messageBus = myProject.getMessageBus();
    messageBus.syncPublisher(VcsConfigurationChangeListener.BRANCHES_CHANGED).execute(myProject, vcsRoot);
}
Also used : MessageBus(com.intellij.util.messages.MessageBus)

Example 2 with MessageBus

use of com.intellij.util.messages.MessageBus in project intellij-community by JetBrains.

the class HgCommitTypeCommand method executeInCurrentThread.

public void executeInCurrentThread() throws HgCommandException, VcsException {
    if (StringUtil.isEmptyOrSpaces(myMessage)) {
        throw new HgCommandException(HgVcsMessages.message("hg4idea.commit.error.messageEmpty"));
    }
    if (myFiles.isEmpty()) {
        executeChunked(Collections.<List<String>>emptyList());
    } else {
        List<String> relativePaths = ContainerUtil.map2List(myFiles, new Function<HgFile, String>() {

            @Override
            public String fun(HgFile file) {
                return file.getRelativePath();
            }
        });
        List<List<String>> chunkedCommits = VcsFileUtil.chunkArguments(relativePaths);
        executeChunked(chunkedCommits);
    }
    myRepository.update();
    final MessageBus messageBus = myProject.getMessageBus();
    messageBus.syncPublisher(HgVcs.REMOTE_TOPIC).update(myProject, null);
}
Also used : HgFile(org.zmlx.hg4idea.HgFile) MessageBus(com.intellij.util.messages.MessageBus) List(java.util.List) HgCommandException(org.zmlx.hg4idea.execution.HgCommandException)

Example 3 with MessageBus

use of com.intellij.util.messages.MessageBus in project intellij-community by JetBrains.

the class HgQNewCommand method executeChunked.

@Override
protected void executeChunked(@NotNull List<List<String>> chunkedCommits) throws HgCommandException, VcsException {
    if (chunkedCommits.isEmpty()) {
        executeQNewInCurrentThread(ContainerUtil.emptyList());
    } else {
        int size = chunkedCommits.size();
        int i = 0;
        if (!myAmend) {
            executeQNewInCurrentThread(chunkedCommits.get(0));
            i = 1;
        }
        for (; i < size; i++) {
            executeQRefreshInCurrentThread(chunkedCommits.get(i));
        }
    }
    myRepository.update();
    final MessageBus messageBus = myProject.getMessageBus();
    messageBus.syncPublisher(HgVcs.REMOTE_TOPIC).update(myProject, null);
}
Also used : MessageBus(com.intellij.util.messages.MessageBus)

Example 4 with MessageBus

use of com.intellij.util.messages.MessageBus in project intellij-community by JetBrains.

the class NoAccessDuringPsiEvents method isInsideEventProcessing.

public static boolean isInsideEventProcessing() {
    Application application = ApplicationManager.getApplication();
    if (!application.isWriteAccessAllowed())
        return false;
    MessageBus bus = application.getMessageBus();
    return bus.hasUndeliveredEvents(VirtualFileManager.VFS_CHANGES) || bus.hasUndeliveredEvents(PsiModificationTracker.TOPIC);
}
Also used : MessageBus(com.intellij.util.messages.MessageBus) Application(com.intellij.openapi.application.Application)

Example 5 with MessageBus

use of com.intellij.util.messages.MessageBus in project intellij-community by JetBrains.

the class EditorConfigConfigurable method apply.

@Override
public void apply(CodeStyleSettings settings) {
    boolean newValue = myEnabled.isSelected();
    settings.getCustomSettings(EditorConfigSettings.class).ENABLED = newValue;
    MessageBus bus = ApplicationManager.getApplication().getMessageBus();
    bus.syncPublisher(EditorConfigSettings.EDITOR_CONFIG_ENABLED_TOPIC).valueChanged(newValue);
}
Also used : MessageBus(com.intellij.util.messages.MessageBus)

Aggregations

MessageBus (com.intellij.util.messages.MessageBus)19 Project (com.intellij.openapi.project.Project)4 MessageBusConnection (com.intellij.util.messages.MessageBusConnection)3 Application (com.intellij.openapi.application.Application)2 InstanceInfo (com.almightyalpaca.jetbrains.plugins.discord.data.InstanceInfo)1 ReplicatedData (com.almightyalpaca.jetbrains.plugins.discord.data.ReplicatedData)1 BuildManager (com.intellij.compiler.server.BuildManager)1 DefaultMessageHandler (com.intellij.compiler.server.DefaultMessageHandler)1 MockLocalFileSystem (com.intellij.mock.MockLocalFileSystem)1 Notification (com.intellij.notification.Notification)1 NotificationAction (com.intellij.notification.NotificationAction)1 Disposable (com.intellij.openapi.Disposable)1 AnActionEvent (com.intellij.openapi.actionSystem.AnActionEvent)1 ApplicationActivationListener (com.intellij.openapi.application.ApplicationActivationListener)1 Editor (com.intellij.openapi.editor.Editor)1 EditorFactory (com.intellij.openapi.editor.EditorFactory)1 EditorEventMulticaster (com.intellij.openapi.editor.event.EditorEventMulticaster)1 ExtensionsArea (com.intellij.openapi.extensions.ExtensionsArea)1 ModuleManager (com.intellij.openapi.module.ModuleManager)1 ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)1