コード例 #1
0
 public SvnAuthenticationManager getManager(final AuthManagerType type, final SvnVcs vcs) {
   if (AuthManagerType.active.equals(type)) {
     return getInteractiveManager(vcs);
   } else if (AuthManagerType.passive.equals(type)) {
     return getPassiveAuthenticationManager(vcs.getProject());
   } else if (AuthManagerType.usual.equals(type)) {
     return getAuthenticationManager(vcs);
   }
   throw new IllegalArgumentException();
 }
コード例 #2
0
 public void setIgnoreSpacesInAnnotate(final boolean value) {
   final boolean changed = IGNORE_SPACES_IN_ANNOTATE != value;
   IGNORE_SPACES_IN_ANNOTATE = value;
   if (changed) {
     myProject
         .getMessageBus()
         .syncPublisher(VcsAnnotationRefresher.LOCAL_CHANGES_CHANGED)
         .configurationChanged(SvnVcs.getKey());
   }
 }
コード例 #3
0
 public SvnAuthenticationManager getInteractiveManager(final SvnVcs svnVcs) {
   if (myInteractiveManager == null) {
     myInteractiveManager =
         new SvnAuthenticationManager(svnVcs.getProject(), new File(getConfigurationDirectory()));
     myInteractiveManager.setRuntimeStorage(RUNTIME_AUTH_CACHE);
     myInteractiveProvider =
         new SvnInteractiveAuthenticationProvider(svnVcs, myInteractiveManager);
     myInteractiveManager.setAuthenticationProvider(myInteractiveProvider);
   }
   return myInteractiveManager;
 }
コード例 #4
0
 public SvnAuthenticationManager getAuthenticationManager(final SvnVcs svnVcs) {
   if (myAuthManager == null) {
     // reloaded when configuration directory changes
     myAuthManager =
         new SvnAuthenticationManager(svnVcs.getProject(), new File(getConfigurationDirectory()));
     Disposer.register(
         svnVcs.getProject(),
         new Disposable() {
           @Override
           public void dispose() {
             myAuthManager = null;
           }
         });
     getInteractiveManager(svnVcs);
     // to init
     myAuthManager.setAuthenticationProvider(
         new SvnAuthenticationProvider(svnVcs, myInteractiveProvider, RUNTIME_AUTH_CACHE));
     myAuthManager.setRuntimeStorage(RUNTIME_AUTH_CACHE);
   }
   return myAuthManager;
 }
コード例 #5
0
  public static SvnAuthenticationManager createForTmpDir(
      final Project project,
      final File dir,
      @Nullable final SvnInteractiveAuthenticationProvider provider) {
    final SvnVcs vcs = SvnVcs.getInstance(project);

    final SvnAuthenticationManager interactive = new SvnAuthenticationManager(project, dir);
    interactive.setRuntimeStorage(RUNTIME_AUTH_CACHE);
    final SvnInteractiveAuthenticationProvider interactiveProvider =
        provider == null ? new SvnInteractiveAuthenticationProvider(vcs, interactive) : provider;
    interactive.setAuthenticationProvider(interactiveProvider);

    return interactive;
  }