当前位置: 首页>>代码示例>>Java>>正文


Java VcsNotifier.getInstance方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:GitUIUtil.java

示例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;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GitIntegrationEnabler.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:GitRebaseProcess.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:GitResetOperation.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:GitAbortRebaseProcess.java

示例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);
  }
}
 
开发者ID:zielu,项目名称:GitToolBox,代码行数:10,代码来源:GitPushTagsAction.java


注:本文中的com.intellij.openapi.vcs.VcsNotifier.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。