Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-05-03 15:28:47 -0400
committerMichael Valenta2004-05-03 15:28:47 -0400
commit74ca00782c20b82e568fb2b0ed70ed14f4a48a2a (patch)
treebbeb7614185039393912244a0310ef97cb672988
parent644f5b6d98a69da9deda924e4044e016a4009c74 (diff)
downloadeclipse.platform.team-74ca00782c20b82e568fb2b0ed70ed14f4a48a2a.tar.gz
eclipse.platform.team-74ca00782c20b82e568fb2b0ed70ed14f4a48a2a.tar.xz
eclipse.platform.team-74ca00782c20b82e568fb2b0ed70ed14f4a48a2a.zip
Fixed bug when location information is changed
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java
index 3fd4b09b1..0253825d8 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java
@@ -13,6 +13,7 @@ package org.eclipse.team.internal.ccvs.ui.repo;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
@@ -24,6 +25,7 @@ import org.eclipse.swt.widgets.*;
import org.eclipse.team.internal.ccvs.core.CVSStatus;
import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
+import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.ui.dialogs.PropertyPage;
@@ -375,6 +377,11 @@ public class RepositoryEncodingPropertyPage extends PropertyPage implements IPro
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
public boolean performOk() {
+ if (!KnownRepositories.getInstance().isKnownRepository(location.getLocation())) {
+ // The location may have been replaced by the main properties page
+ MessageDialog.openInformation(getShell(), "Cannot Change Encoding", "Location {0} no longer exists." + location.getLocation());
+ return true;
+ }
encoding.store();
try {
((CVSRepositoryLocation)location).getPreferences().flush();

Back to the top