|
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 |
/* |