コード例 #1
0
  @Nullable
  public CommittedChangeListsListener createRefresher(boolean ignoreEnabled) {
    CommittedChangeListsListener result = null;

    if (refreshEnabled(ignoreEnabled)) {
      // on awt thread
      final MergeInfoCached state =
          myMergeInfoCache.getCachedState(myPanel.getWcInfo(), myPanel.getLocalBranch());
      myCachedMap.put(
          createKey(myPanel.getWcInfo(), myPanel.getBranch()),
          state != null ? state.copy() : new MergeInfoCached());
      myMergeInfoCache.clear(myPanel.getWcInfo(), myPanel.getLocalBranch());

      result = new MyRefresher();
    }

    return result;
  }
コード例 #2
0
 public MergeInfoHolder(
     @NotNull Project project,
     @NotNull DecoratorManager manager,
     @NotNull RootsAndBranches mainPanel,
     @NotNull SvnMergeInfoRootPanelManual panel) {
   myManager = manager;
   myMainPanel = mainPanel;
   myPanel = panel;
   myMergeInfoCache = SvnMergeInfoCache.getInstance(project);
   myCachedMap = ContainerUtil.newHashMap();
 }
コード例 #3
0
  @NotNull
  public ListMergeStatus check(final CommittedChangeList list, final boolean ignoreEnabled) {
    ListMergeStatus result;

    if (!isEnabledAndConfigured(ignoreEnabled) || !(list instanceof SvnChangeList)) {
      result = ListMergeStatus.ALIEN;
    } else {
      MergeInfoCached cachedState = getCurrentCache();
      MergeInfoCached state =
          myMergeInfoCache.getCachedState(myPanel.getWcInfo(), myPanel.getLocalBranch());

      result =
          cachedState != null
              ? check(list, cachedState, true)
              : state != null ? check(list, state, false) : refresh(ignoreEnabled);
    }

    return result;
  }
コード例 #4
0
 public void updateMixedRevisionsForPanel() {
   myPanel.setMixedRevisions(
       myMergeInfoCache.isMixedRevisions(myPanel.getWcInfo(), myPanel.getLocalBranch()));
 }