Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 232982 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java (-4 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2005 IBM Corporation and others.
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 19-28 Link Here
19
 * the repository location string for use by connection methods
19
 * the repository location string for use by connection methods
20
 * and the user authenticator.
20
 * and the user authenticator.
21
 * 
21
 * 
22
 * It is not intended to implemented by clients.
23
 * 
24
 * @see IUserAuthenticator
22
 * @see IUserAuthenticator
25
 * @see IConnectionMethod
23
 * @see IConnectionMethod
24
 * 
25
 * @noimplement It is not intended to implemented by clients.
26
 */
26
 */
27
public interface ICVSRepositoryLocation  extends IAdaptable {
27
public interface ICVSRepositoryLocation  extends IAdaptable {
28
28
Lines 103-109 Link Here
103
	public IUserInfo getUserInfo(boolean allowModificationOfUsername);	
103
	public IUserInfo getUserInfo(boolean allowModificationOfUsername);	
104
	
104
	
105
	/**
105
	/**
106
	 * Flush any cahced user information related to the repository location
106
	 * Flush any cached user information related to the repository location
107
	 */
107
	 */
108
	public void flushUserInfo();
108
	public void flushUserInfo();
109
	
109
	
(-)src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java (-9 / +29 lines)
Lines 141-147 Link Here
141
	private boolean previousAuthenticationFailed = false;
141
	private boolean previousAuthenticationFailed = false;
142
	
142
	
143
	/**
143
	/**
144
	 * Return the preferences node whose child nodes are teh know repositories
144
	 * Return the preferences node whose child nodes are the know repositories
145
	 * @return a preferences node
145
	 * @return a preferences node
146
	 */
146
	 */
147
	public static Preferences getParentPreferences() {
147
	public static Preferences getParentPreferences() {
Lines 149-155 Link Here
149
	}
149
	}
150
	
150
	
151
	/**
151
	/**
152
	 * Return a preferences node that contains suitabel defaults for a
152
	 * Return a preferences node that contains suitable defaults for a
153
	 * repository location.
153
	 * repository location.
154
	 * @return  a preferences node
154
	 * @return  a preferences node
155
	 */
155
	 */
Lines 548-557 Link Here
548
	
548
	
549
	/*
549
	/*
550
	 * Dispose of the receiver by clearing any cached authorization information.
550
	 * Dispose of the receiver by clearing any cached authorization information.
551
	 * This method shold only be invoked when the corresponding adapter is shut
551
	 * This method should only be invoked when the corresponding adapter is shut
552
	 * down or a connection is being validated.
552
	 * down or a connection is being validated.
553
	 */
553
	 */
554
	public void dispose() {
554
	public void dispose() {
555
		removeNode();
555
		flushCache();
556
		flushCache();
556
		try {
557
		try {
557
			if (hasPreferences()) {
558
			if (hasPreferences()) {
Lines 577-582 Link Here
577
		}
578
		}
578
	}
579
	}
579
	
580
	
581
	private void removeNode() {
582
		ISecurePreferences node = getCVSNode();
583
		if (node == null)
584
			return;
585
		try {
586
//			node.removeNode();
587
			node.clear();
588
		} catch (IllegalStateException e) {
589
			CVSProviderPlugin.log(IStatus.ERROR, e.getMessage(), e);
590
		}
591
		
592
	}
593
	
580
	/*
594
	/*
581
	 * @see ICVSRepositoryLocation#getHost()
595
	 * @see ICVSRepositoryLocation#getHost()
582
	 */
596
	 */
Lines 889-896 Link Here
889
    }
903
    }
890
904
891
    /*
905
    /*
892
     * The connection was sucessfully made. Update the cached
906
     * The connection was successfully made. Update the cached
893
     * repository location if it is a differnet instance than
907
     * repository location if it is a different instance than
894
     * this location.
908
     * this location.
895
     */
909
     */
896
    private void updateCachedLocation() {
910
    private void updateCachedLocation() {
Lines 963-968 Link Here
963
		// We set the password here but it will be cleared 
977
		// We set the password here but it will be cleared 
964
		// if the user info is cached using updateCache()
978
		// if the user info is cached using updateCache()
965
		this.password = password;
979
		this.password = password;
980
		// The password has been changed, reset the flag, so we won't 
981
		// prompt before attempting to connect
982
		previousAuthenticationFailed = false;
966
	}
983
	}
967
	
984
	
968
	/*
985
	/*
Lines 980-989 Link Here
980
	
997
	
981
	public void setAllowCaching(boolean value) {
998
	public void setAllowCaching(boolean value) {
982
		allowCaching = value;
999
		allowCaching = value;
983
        if (allowCaching)
1000
        if (allowCaching) {
984
            updateCache();
1001
            updateCache();
985
        else
1002
        } else {
986
            flushCache();
1003
        	if (password == null)
1004
        		password = retrievePassword();
1005
            removeNode();
1006
        }
987
	}
1007
	}
988
	
1008
	
989
	public void updateCache() {
1009
	public void updateCache() {
Lines 1082-1088 Link Here
1082
	 * @see ICVSRepositoryLocation#flushUserInfo()
1102
	 * @see ICVSRepositoryLocation#flushUserInfo()
1083
	 */
1103
	 */
1084
	public void flushUserInfo() {
1104
	public void flushUserInfo() {
1085
		flushCache();
1105
		removeNode();
1086
	}
1106
	}
1087
	
1107
	
1088
	/*
1108
	/*

Return to bug 232982