• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ChangeListManagerGate类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.intellij.openapi.vcs.changes.ChangeListManagerGate的典型用法代码示例。如果您正苦于以下问题:Java ChangeListManagerGate类的具体用法?Java ChangeListManagerGate怎么用?Java ChangeListManagerGate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ChangeListManagerGate类属于com.intellij.openapi.vcs.changes包,在下文中一共展示了ChangeListManagerGate类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getChanges

点赞 3

import com.intellij.openapi.vcs.changes.ChangeListManagerGate; //导入依赖的package包/类
public void getChanges(final VcsDirtyScope dirtyScope, final ChangelistBuilder builder, final ProgressIndicator progress,
                       final ChangeListManagerGate addGate)
  throws VcsException {
  synchronized (myLock) {
    if (myExecuteInsideUpdate == null) {
      return;
    }

    myLocked = true;
    myExecuteInsideUpdate.start();

    while (myLocked) {
      try {
        myLock.wait();
      }
      catch (InterruptedException e) {
        //
      }
    }
  }
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:22,
代码来源:MockDelayingChangeProvider.java

示例2: getChanges

点赞 2

import com.intellij.openapi.vcs.changes.ChangeListManagerGate; //导入依赖的package包/类
public void getChanges(@NotNull final VcsDirtyScope dirtyScope,
                       @NotNull final ChangelistBuilder builder,
                       @NotNull final ProgressIndicator progress,
                       @NotNull final ChangeListManagerGate addGate) throws VcsException {

    if (myProject.isDisposed()) {
        return;
    }
    if (builder == null) {
        return;
    }

    progress.setText("Processing changes");

    // process only roots, filter out child items since requests are recursive anyway
    RootsCollection.FilePathRootsCollection roots = new RootsCollection.FilePathRootsCollection();
    roots.addAll(dirtyScope.getRecursivelyDirtyDirectories());

    final ChangeListManager changeListManager = ChangeListManager.getInstance(myProject);
    for (FilePath dirtyFile : dirtyScope.getDirtyFiles()) {
        // workaround for IDEADEV-31511 and IDEADEV-31721
        if (dirtyFile.getVirtualFile() == null || !changeListManager.isIgnoredFile(dirtyFile.getVirtualFile())) {
            roots.add(dirtyFile);
        }
    }

    if (roots.isEmpty()) {
        return;
    }

    final ChangelistBuilderStatusVisitor changelistBuilderStatusVisitor = new ChangelistBuilderStatusVisitor(myProject, builder);

    for (final FilePath root : roots) {
        // if we get a change notification in the $tf folder, we need to just ignore it
        if (StringUtils.containsIgnoreCase(root.getPath(), "$tf") ||
                StringUtils.containsIgnoreCase(root.getPath(), ".tf")) {
            continue;
        }

        List<PendingChange> changes;
        try {
            // TODO: add the ability to pass multiple roots to the command line
            final Command<List<PendingChange>> command = new StatusCommand(null, root.getPath());
            changes = command.runSynchronously();
        } catch (final Throwable t) {
            logger.warn("Failed to get changes from command line. root=" + root.getPath(), t);
            changes = Collections.emptyList();
        }

        // for each change, find out the status of the changes and then add to the list
        for (final PendingChange change : changes) {
            try {
                StatusProvider.visitByStatus(changelistBuilderStatusVisitor, change);
            } catch (TfsException e) {
                throw new VcsException(e.getMessage(), e);
            }
        }
    }
}
 

开发者ID:Microsoft,
项目名称:vso-intellij,
代码行数:60,
代码来源:TFSChangeProvider.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)