@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; }
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(); }
@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; }
public void updateMixedRevisionsForPanel() { myPanel.setMixedRevisions( myMergeInfoCache.isMixedRevisions(myPanel.getWcInfo(), myPanel.getLocalBranch())); }