@Nullable public SVNURL getWcUrl(final AuthenticationRequest obj) { if (obj.isOutsideCopies()) return null; if (obj.getWcUrl() != null) return obj.getWcUrl(); final WorkingCopy copy = myRootsToWorkingCopies.getMatchingCopy(obj.getUrl()); if (copy != null) { obj.setOutsideCopies(false); obj.setWcUrl(copy.getUrl()); } else { obj.setOutsideCopies(true); } return copy == null ? null : copy.getUrl(); }
/** Bases on presence of notifications! */ public ThreeState isAuthenticatedFor(final VirtualFile vf) { final WorkingCopy wcCopy = myRootsToWorkingCopies.getWcRoot(vf); if (wcCopy == null) return ThreeState.UNSURE; // check there's no cancellation yet final boolean haveCancellation = getStateFor(wcCopy.getUrl()); if (haveCancellation) return ThreeState.NO; final Boolean keptResult = myCopiesPassiveResults.get(wcCopy.getUrl()); if (Boolean.TRUE.equals(keptResult)) return ThreeState.YES; if (Boolean.FALSE.equals(keptResult)) return ThreeState.NO; // check have credentials final boolean calculatedResult = passiveValidation(myVcs.getProject(), wcCopy.getUrl()); myCopiesPassiveResults.put(wcCopy.getUrl(), calculatedResult); return calculatedResult ? ThreeState.YES : ThreeState.NO; }