• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CommittedChangeList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SvnChangeList

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public SvnChangeList(@NotNull final List<CommittedChangeList> lists, @NotNull final SvnRepositoryLocation location) {

    final SvnChangeList sample = (SvnChangeList) lists.get(0);
    myVcs = sample.myVcs;
    myLocation = location;
    setRevision(sample.myRevision);
    myAuthor = sample.myAuthor;
    myDate = sample.myDate;
    myMessage = sample.myMessage;
    myRepositoryRoot = sample.myRepositoryRoot;
    myCommonPathSearcher = new CommonPathSearcher();

    for (CommittedChangeList list : lists) {
      final SvnChangeList svnList = (SvnChangeList) list;
      myChangedPaths.addAll(svnList.myChangedPaths);
      myAddedPaths.addAll(svnList.myAddedPaths);
      myDeletedPaths.addAll(svnList.myDeletedPaths);
      myReplacedPaths.addAll(svnList.myReplacedPaths);
    }
    myKnownAsDirectories = new HashSet<String>(0);
  }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:SvnChangeList.java


示例2: selectMergeItems

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
@NotNull
@Override
public SelectMergeItemsResult selectMergeItems(List<CommittedChangeList> lists, String mergeTitle, MergeChecker mergeChecker) {
  final ToBeMergedDialog dialog = new ToBeMergedDialog(myProject, lists, mergeTitle, mergeChecker, null);
  dialog.show();
  return new SelectMergeItemsResult() {
    @Override
    public QuickMergeContentsVariants getResultCode() {
      final int code = dialog.getExitCode();
      if (ToBeMergedDialog.MERGE_ALL_CODE == code) {
        return QuickMergeContentsVariants.all;
      }
      return DialogWrapper.OK_EXIT_CODE == code ? QuickMergeContentsVariants.select : QuickMergeContentsVariants.cancel;
    }

    @Override
    public List<CommittedChangeList> getSelectedLists() {
      return dialog.getSelected();
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:QuickMergeInteractionImpl.java


示例3: loadCommittedChanges

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
@Override
public void loadCommittedChanges(ChangeBrowserSettings changeBrowserSettings,
                                 RepositoryLocation repositoryLocation,
                                 int maxCount,
                                 final AsynchConsumer<CommittedChangeList> consumer) throws VcsException {

  try {
    List<CommittedChangeList> results = getCommittedChanges(changeBrowserSettings, repositoryLocation, maxCount);
    for (CommittedChangeList result : results) {
      consumer.consume(result);
    }
  }
  finally {
    consumer.finished();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:HgCachingCommittedChangesProvider.java


示例4: zip

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public CommittedChangeList zip(final RepositoryLocationGroup group, final List<CommittedChangeList> lists) {
  if (lists.size() == 1) {
    return lists.get(0);
  }
  final CommittedChangeList result = lists.get(0);
  for (int i = 1; i < lists.size(); i++) {
    final CommittedChangeList list = lists.get(i);
    for (Change change : list.getChanges()) {
      final Collection<Change> resultChanges = result.getChanges();
      if (! resultChanges.contains(change)) {
        resultChanges.add(change);
      }
    }
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:VcsCommittedListsZipperAdapter.java


示例5: loadCommittedChanges

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public void loadCommittedChanges(@NotNull ChangeBrowserSettings settings,
                                 @NotNull RepositoryLocation location,
                                 int maxCount,
                                 @NotNull final AsynchConsumer<CommittedChangeList> consumer) throws VcsException {
  try {
    final SvnRepositoryLocation svnLocation = (SvnRepositoryLocation) location;
    final String repositoryRoot = getRepositoryRoot(svnLocation);
    final ChangeBrowserSettings.Filter filter = settings.createFilter();

    getCommittedChangesImpl(settings, svnLocation, maxCount, new Consumer<LogEntry>() {
      public void consume(final LogEntry svnLogEntry) {
        final SvnChangeList cl = new SvnChangeList(myVcs, svnLocation, svnLogEntry, repositoryRoot);
        if (filter.accepts(cl)) {
          consumer.consume(cl);
        }
      }
    }, false, true);
  }
  finally {
    consumer.finished();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:SvnCommittedChangesProvider.java


示例6: passCachedListsToListener

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public void passCachedListsToListener(final VcsConfigurationChangeListener.DetailedNotification notification,
                                      final Project project, final VirtualFile root) {
  final LinkedList<CommittedChangeList> resultList = new LinkedList<CommittedChangeList>();
  myBrowser.reportLoadedLists(new CommittedChangeListsListener() {
    public void onBeforeStartReport() {
    }
    public boolean report(CommittedChangeList list) {
      resultList.add(list);
      return false;
    }
    public void onAfterEndReport() {
      if (! resultList.isEmpty()) {
        notification.execute(project, root, resultList);
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:CommittedChangesPanel.java


示例7: setChangeLists

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public void setChangeLists(final List<CommittedChangeList> receivedChanges) {
  final boolean hasEmptyCaches = CommittedChangesCache.getInstance(myProject).hasEmptyCaches();

  ApplicationManager.getApplication().invokeLater(new Runnable() {
    public void run() {
      if (myLoadingChangeListsLabel != null) {
        remove(myLoadingChangeListsLabel);
        myLoadingChangeListsLabel = null;
      }
      myCommittedChangeLists = receivedChanges;
      myTreeBrowser.setItems(myCommittedChangeLists, CommittedChangesBrowserUseCase.UPDATE);
      if (hasEmptyCaches) {
        final StatusText statusText = myTreeBrowser.getEmptyText();
        statusText.clear();
        statusText.appendText("Click ")
          .appendText("Refresh", SimpleTextAttributes.LINK_ATTRIBUTES, new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
              RefreshIncomingChangesAction.doRefresh(myProject);
            }
          })
          .appendText(" to initialize repository changes cache");
      }
    }
  }, myProject.getDisposed());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:UpdateInfoTree.java


示例8: split

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
@NotNull
private static List<List<CommittedChangeList>> split(final List<CommittedChangeList> list, final int size) {
  final int listSize = list.size();
  if (listSize < size) {
    return Collections.singletonList(list);
  }
  final int first = listSize % size;

  int start = 0;
  int end = (first == 0) ? (Math.min(listSize, size)) : first;
  final List<List<CommittedChangeList>> result = new ArrayList<List<CommittedChangeList>>(listSize / size + 1);
  while (start < listSize) {
    result.add(list.subList(start, end));
    start = end;
    end += size;
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:LoadedRevisionsCache.java


示例9: readChangesInterval

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
private List<CommittedChangeList> readChangesInterval(final long indexOffset, final int number) throws IOException {
  openStreams();

  try {
    IndexEntry[] entries = readIndexEntriesByOffset(indexOffset, number);
    if (entries.length == 0) {
      return Collections.emptyList();
    }

    final List<CommittedChangeList> result = new ArrayList<CommittedChangeList>();
    for (IndexEntry entry : entries) {
      final CommittedChangeList changeList = loadChangeListAt(entry.offset);
      result.add(changeList);
    }
    return result;
  } finally {
    closeStreams();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ChangesCacheFile.java


示例10: processUpdatedFiles

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public boolean processUpdatedFiles(UpdatedFiles updatedFiles, Collection<CommittedChangeList> receivedChanges) throws IOException {
  boolean haveUnaccountedUpdatedFiles = false;
  openStreams();
  loadHeader();
  ReceivedChangeListTracker tracker = new ReceivedChangeListTracker();
  try {
    final List<IncomingChangeListData> incomingData = loadIncomingChangeListData();
    for(FileGroup group: updatedFiles.getTopLevelGroups()) {
      haveUnaccountedUpdatedFiles |= processGroup(group, incomingData, tracker);
    }
    if (!haveUnaccountedUpdatedFiles) {
      for(IncomingChangeListData data: incomingData) {
        saveIncoming(data, false);
      }
      writeHeader();
    }
  }
  finally {
    closeStreams();
  }
  receivedChanges.addAll(tracker.getChangeLists());
  return haveUnaccountedUpdatedFiles;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:ChangesCacheFile.java


示例11: insertPathsChanges

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
private void insertPathsChanges(Map<String, Long> paths, CommittedChangeList list, long listId) throws VcsException {
  final PreparedStatement insert = myConnection.getOrCreatePreparedStatement(SqliteTables.PREPARED_INSERT_PATH_2_REVS,
    new ThrowableConvertor<Connection, PreparedStatement, SQLException>() {
      @Override
      public PreparedStatement convert(Connection connection) throws SQLException {
        return connection.prepareStatement("INSERT INTO " + SqliteTables.PATHS_2_REVS.TABLE_NAME +
          " ( " + StringUtil.join(Arrays.asList(SqliteTables.PATHS_2_REVS.PATH_FK, SqliteTables.PATHS_2_REVS.REVISION_FK,
          SqliteTables.PATHS_2_REVS.TYPE, SqliteTables.PATHS_2_REVS.COPY_PATH_ID, SqliteTables.PATHS_2_REVS.DELETE_PATH_ID,
          SqliteTables.PATHS_2_REVS.VISIBLE), " , ") +
          ") VALUES (?,?,?,?,?,?)", Statement.RETURN_GENERATED_KEYS);
      }
    });
  try {
    insert.setLong(2, listId);
    final Collection<Change> withMoved = list.getChangesWithMovedTrees();
    final Set<Change> simple = new HashSet<Change>(list.getChanges());
    for (Change change : withMoved) {
      insertOneChange(paths, insert, change, simple.contains(change));
    }
  }
  catch (SQLException e) {
    throw new VcsException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:VcsSqliteLayer.java


示例12: createLogHandler

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
@NotNull
private LogEntryConsumer createLogHandler(final SVNRevision fromIncluding,
                                             final SVNRevision toIncluding,
                                             final boolean includingYoungest,
                                             final boolean includeOldest, final List<CommittedChangeList> result) {
  return new LogEntryConsumer() {
    @Override
    public void consume(LogEntry logEntry) {
      if (myProject.isDisposed()) throw new ProcessCanceledException();
      final ProgressIndicator progress = ProgressManager.getInstance().getProgressIndicator();
      if (progress != null) {
        progress.setText2(SvnBundle.message("progress.text2.processing.revision", logEntry.getRevision()));
        progress.checkCanceled();
      }
      if ((!includingYoungest) && (logEntry.getRevision() == fromIncluding.getNumber())) {
        return;
      }
      if ((!includeOldest) && (logEntry.getRevision() == toIncluding.getNumber())) {
        return;
      }
      result.add(new SvnChangeList(myVcs, myLocation, logEntry, myRepositoryRoot.toString()));
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:SvnLogUtil.java


示例13: update

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public void update(final AnActionEvent e) {
  final Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
  final Presentation presentation = e.getPresentation();

  if (project == null) {
    presentation.setEnabled(false);
    presentation.setVisible(false);
    return;
  }

  presentation.setText(SvnBundle.message("configure.branches.item"));
  presentation.setDescription(SvnBundle.message("configure.branches.item"));
  presentation.setIcon(SvnIcons.ConfigureBranches);

  presentation.setVisible(true);
  
  final ChangeList[] cls = e.getData(VcsDataKeys.CHANGE_LISTS);
  presentation.setEnabled((cls != null) && (cls.length > 0) &&
                          (SvnVcs.getInstance(project).getName().equals(((CommittedChangeList) cls[0]).getVcs().getName())) &&
                          (((SvnChangeList) cls[0]).getRoot() != null));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ConfigureBranchesAction.java


示例14: mergeLocationGroupChangeLists

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
@NotNull
private List<CommittedChangeList> mergeLocationGroupChangeLists(@NotNull RepositoryLocationGroup group) {
  List<CommittedChangeList> result = ContainerUtil.newArrayList();
  List<CommittedChangeList> equalLists = ContainerUtil.newArrayList();
  CommittedChangeList previousList = null;

  for (CommittedChangeList list : Iterables.mergeSorted(collectChangeLists(group.getLocations()), myComparator)) {
    if (previousList != null && myComparator.compare(previousList, list) != 0) {
      result.add(zip(group, equalLists));
      equalLists.clear();
    }
    equalLists.add(list);
    previousList = list;
  }
  if (!equalLists.isEmpty()) {
    result.add(zip(group, equalLists));
  }

  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:CommittedListsSequencesZipper.java


示例15: run

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
@Override
public void run(ContinuationContext context) {
  QuickMergeInteraction.SelectMergeItemsResult result = myInteraction.selectMergeItems(myChangeLists, myMergeTitle, myMergeChecker);

  switch (result.getResultCode()) {
    case cancel:
      context.cancelEverything();
      break;
    case all:
      context.next(getMergeAllTasks());
      break;
    default:
      List<CommittedChangeList> lists = result.getSelectedLists();

      if (!lists.isEmpty()) {
        runChangeListsMerge(context, lists, myCopyPoint, myMergeTitle);
      }
      break;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:MergeCalculatorTask.java


示例16: zip

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
@Override
public CommittedChangeList zip(final RepositoryLocationGroup group, final List<CommittedChangeList> lists) {
  if (lists.size() == 1) {
    return lists.get(0);
  }
  final CommittedChangeList victim = ReceivedChangeList.unwrap(lists.get(0));
  final ReceivedChangeList result = new ReceivedChangeList(victim);
  result.setForcePartial(false);
  final Set<Change> baseChanges = new HashSet<Change>();

  for (CommittedChangeList list : lists) {
    baseChanges.addAll(ReceivedChangeList.unwrap(list).getChanges());

    final Collection<Change> changes = list.getChanges();
    for (Change change : changes) {
      if (! result.getChanges().contains(change)) {
        result.addChange(change);
      }
    }
  }
  result.setForcePartial(baseChanges.size() != result.getChanges().size());
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:CommittedChangesCache.java


示例17: commitMessageChanged

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public void commitMessageChanged(final AbstractVcs vcs,
                                 final RepositoryLocation location, final long number, final String newMessage) {
  myTaskQueue.run(new Runnable() {
    @Override
    public void run() {
      final ChangesCacheFile file = myCachesHolder.haveCache(location);
      if (file != null) {
        try {
          if (file.isEmpty()) return;
          file.editChangelist(number, newMessage);
          loadIncomingChanges(true);
          fireChangesLoaded(location, Collections.<CommittedChangeList>emptyList());
        }
        catch (IOException e) {
          VcsBalloonProblemNotifier.showOverChangesView(myProject, "Didn't update Repository changes with new message due to error: " + e.getMessage(),
                                                        MessageType.ERROR);
        }
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:CommittedChangesCache.java


示例18: ToBeMergedDialog

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public ToBeMergedDialog(final Project project,
                        final List<CommittedChangeList> lists,
                        final String title,
                        final MergeChecker mergeChecker,
                        final PairConsumer<Long, MergeDialogI> moreLoader) {
  super(project, true);
  myMoreLoader = moreLoader;
  myEverythingLoaded = moreLoader == null;
  myStatusMap = Collections.synchronizedMap(new HashMap<Long, ListMergeStatus>());
  myMergeChecker = mergeChecker;
  myAlreadyCalculatedState = moreLoader == null;
  setTitle(title);
  myProject = project;

  // Paging is not used - "Load Xxx" buttons load corresponding new elements and add them to the end of the table. Single (first) page is
  // always used.
  myListsEngine = new BasePageEngine<CommittedChangeList>(lists, lists.size());

  myPanel = new JPanel(new BorderLayout());
  myWiseSelection = new QuantitySelection<Long>(myEverythingLoaded);
  myAlreadyMerged = new HashSet<Change>();
  setOKButtonText("Merge Selected");
  initUI();
  init();
  enableMore();

  myAlarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD, getDisposable());
  if (! myAlreadyCalculatedState) {
    refreshListStatus(lists);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:ToBeMergedDialog.java


示例19: loadRevisions

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
@Nullable
public CommittedChangeList loadRevisions(final VirtualFile vf, final VcsRevisionNumber number) {
  final CommittedChangeList[] list = new CommittedChangeList[1];
  final ThrowableRunnable<VcsException> runnable = new ThrowableRunnable<VcsException>() {
    @Override
    public void run() throws VcsException {
      final Pair<CommittedChangeList, FilePath> pair =
        getCommittedChangesProvider().getOneList(vf, number);
      if (pair != null) {
        list[0] = pair.getFirst();
      }
    }
  };
  return VcsSynchronousProgressWrapper.wrap(runnable, getProject(), "Load revision contents") ? list[0] : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:AbstractVcs.java


示例20: getComparator

import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; //导入依赖的package包/类
public Comparator<CommittedChangeList> getComparator() {
  // TODO: CommittedChangeListByDateComparator could be utilized here. But currently it is placed in vcs-impl.
  // TODO: Think of either moving these ChangeListColumn instances to vcs-impl or move comparator to vcs-api.
  return new Comparator<CommittedChangeList>() {
    public int compare(final CommittedChangeList o1, final CommittedChangeList o2) {
      return o1.getCommitDate().compareTo(o2.getCommitDate());
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ChangeListColumn.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XSContentTypeFunction类代码示例发布时间:2022-05-23
下一篇:
Java FifoPriorityThreadPoolExecutor类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap