本文整理汇总了Java中com.intellij.openapi.vcs.VcsNotifier.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java VcsNotifier.getInstance方法的具体用法?Java VcsNotifier.getInstance怎么用?Java VcsNotifier.getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.vcs.VcsNotifier
的用法示例。
在下文中一共展示了VcsNotifier.getInstance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: notifyMessages
import com.intellij.openapi.vcs.VcsNotifier; //导入方法依赖的package包/类
public static void notifyMessages(@NotNull Project project,
@NotNull String title,
@Nullable String description,
boolean important,
@Nullable Collection<String> messages) {
String desc = (description != null ? description.replace("\n", "<br/>") : "");
if (messages != null && !messages.isEmpty()) {
desc += StringUtil.join(messages, "<hr/><br/>");
}
VcsNotifier notificator = VcsNotifier.getInstance(project);
if (important) {
notificator.notifyError(title, desc);
}
else {
notificator.notifyImportantWarning(title, desc, null);
}
}
示例2: initOrNotifyError
import com.intellij.openapi.vcs.VcsNotifier; //导入方法依赖的package包/类
protected boolean initOrNotifyError(@NotNull final VirtualFile projectDir) {
VcsNotifier vcsNotifier = VcsNotifier.getInstance(myProject);
GitCommandResult result = myGit.init(myProject, projectDir);
if (result.success()) {
refreshVcsDir(projectDir, GitUtil.DOT_GIT);
vcsNotifier.notifySuccess("Created Git repository in " + projectDir.getPresentableUrl());
return true;
}
else {
if (myVcs.getExecutableValidator().checkExecutableAndNotifyIfNeeded()) {
vcsNotifier.notifyError("Couldn't git init " + projectDir.getPresentableUrl(), result.getErrorOutputAsHtmlString());
LOG.info(result.getErrorOutputAsHtmlString());
}
return false;
}
}
示例3: GitRebaseProcess
import com.intellij.openapi.vcs.VcsNotifier; //导入方法依赖的package包/类
private GitRebaseProcess(@NotNull Project project,
@NotNull List<GitRepository> allRepositories,
@NotNull GitRebaseParams params,
@NotNull GitChangesSaver saver,
@NotNull MultiMap<GitRepository, GitRebaseUtils.CommitInfo> skippedCommits,
@NotNull Map<GitRepository, SuccessType> successfulRepositories) {
myProject = project;
myAllRepositories = allRepositories;
myParams = params;
mySaver = saver;
mySuccessfulRepositories = successfulRepositories;
myGit = ServiceManager.getService(Git.class);
myChangeListManager = ChangeListManager.getInstance(myProject);
myNotifier = VcsNotifier.getInstance(myProject);
myFacade = ServiceManager.getService(GitPlatformFacade.class);
myInitialHeadPositions = readInitialHeadPositions(myAllRepositories);
mySkippedCommits = skippedCommits;
}
示例4: GitResetOperation
import com.intellij.openapi.vcs.VcsNotifier; //导入方法依赖的package包/类
public GitResetOperation(@NotNull Project project, @NotNull Map<GitRepository, VcsFullCommitDetails> targetCommits,
@NotNull GitResetMode mode, @NotNull ProgressIndicator indicator) {
myProject = project;
myCommits = targetCommits;
myMode = mode;
myIndicator = indicator;
myGit = ServiceManager.getService(Git.class);
myNotifier = VcsNotifier.getInstance(project);
myFacade = ServiceManager.getService(GitPlatformFacade.class);
myUiHandler = new GitBranchUiHandlerImpl(myProject, myFacade, myGit, indicator);
}
示例5: GitAbortRebaseProcess
import com.intellij.openapi.vcs.VcsNotifier; //导入方法依赖的package包/类
GitAbortRebaseProcess(@NotNull Project project,
@Nullable GitRepository repositoryToAbort,
@NotNull Map<GitRepository, String> repositoriesToRollback,
@NotNull ProgressIndicator progressIndicator,
@Nullable GitChangesSaver changesSaver) {
myProject = project;
myRepositoryToAbort = repositoryToAbort;
myRepositoriesToRollback = repositoriesToRollback;
myIndicator = progressIndicator;
mySaver = changesSaver;
myGit = ServiceManager.getService(Git.class);
myNotifier = VcsNotifier.getInstance(myProject);
}
示例6: handleResult
import com.intellij.openapi.vcs.VcsNotifier; //导入方法依赖的package包/类
private void handleResult(Project project, GtPushResult pushResult) {
VcsNotifier vcsNotifier = VcsNotifier.getInstance(project);
if (pushResult.getType() == Type.SUCCESS) {
vcsNotifier.notifySuccess(ResBundle.getString("message.tags.pushed"));
} else {
errorResultHandlers.getOrDefault(pushResult.getType(), (notifier, result) -> { /*do nothing*/ })
.accept(vcsNotifier, pushResult);
}
}