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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations