コード例 #1
0
 @NotNull
 @Override
 protected String getToString(AuthenticationRequest obj) {
   return "Click to fix. Not logged In to Subversion '"
       + obj.getRealm()
       + "' ("
       + obj.getUrl().toDecodedString()
       + ")";
 }
コード例 #2
0
 @NotNull
 @Override
 protected String getNotificationContent(AuthenticationRequest obj) {
   return "<a href=\"\">Click to fix.</a> Not logged In to Subversion '"
       + obj.getRealm()
       + "' ("
       + obj.getUrl().toDecodedString()
       + ")";
 }
コード例 #3
0
  private void onStateChangedToSuccess(final AuthenticationRequest obj) {
    myCopiesPassiveResults.put(getKey(obj), true);
    myVcs.invokeRefreshSvnRoots(false);

    final List<SVNURL> outdatedRequests = new LinkedList<SVNURL>();
    final Collection<SVNURL> keys = getAllCurrentKeys();
    for (SVNURL key : keys) {
      final SVNURL commonURLAncestor = SVNURLUtil.getCommonURLAncestor(key, obj.getUrl());
      if ((commonURLAncestor != null)
          && (!StringUtil.isEmptyOrSpaces(commonURLAncestor.getHost()))
          && (!StringUtil.isEmptyOrSpaces(commonURLAncestor.getPath()))) {
        // final AuthenticationRequest currObj = getObj(key);
        // if ((currObj != null) && passiveValidation(myVcs.getProject(), key, true,
        // currObj.getRealm(), currObj.getKind())) {
        outdatedRequests.add(key);
        // }
      }
    }
    log("on state changed ");
    ApplicationManager.getApplication()
        .invokeLater(
            new Runnable() {
              public void run() {
                for (SVNURL key : outdatedRequests) {
                  removeLazyNotificationByKey(key);
                }
              }
            },
            ModalityState.NON_MODAL);
  }
コード例 #4
0
  @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();
  }
コード例 #5
0
 @NotNull
 @Override
 public SVNURL getKey(final AuthenticationRequest obj) {
   // !!! wc's URL
   return obj.getWcUrl();
 }