Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-06-11 17:45:23 -0400
committerjames2002-06-11 17:45:23 -0400
commit6e4e651ba1602310e1d68fdb7256aa2fe3a091d7 (patch)
tree66b86a97db560f257379734fbfe6505acf434ce5
parentc57b359613d8590a5b9f6731f836726ebaba1796 (diff)
downloadeclipse.platform.team-6e4e651ba1602310e1d68fdb7256aa2fe3a091d7.tar.gz
eclipse.platform.team-6e4e651ba1602310e1d68fdb7256aa2fe3a091d7.tar.xz
eclipse.platform.team-6e4e651ba1602310e1d68fdb7256aa2fe3a091d7.zip
19951: Need global preference for treating repositories as binary only
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java1
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java9
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java9
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java1
4 files changed, 19 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java
index 546a10cc4..89171dbe3 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java
@@ -507,6 +507,7 @@ public class CVSProvider implements ICVSProvider {
}
public static boolean isText(IFile file) {
+ if (CVSProviderPlugin.getPlugin().getRepositoriesAreBinary()) return false;
return Team.getType(file) == Team.TEXT;
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
index 24ad316a2..c9ffaa3b9 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
@@ -78,6 +78,7 @@ public class CVSProviderPlugin extends Plugin {
private boolean promptOnFolderDelete = true;
private boolean showTasksOnAddAndDelete = false;
private boolean replaceUnmanaged = true;
+ private boolean repositoriesAreBinary = false;
private String cvsRshCommand = DEFAULT_CVS_RSH;
private String cvsServer = DEFAULT_CVS_SERVER;
private IConsoleListener consoleListener;
@@ -359,6 +360,10 @@ public class CVSProviderPlugin extends Plugin {
return fetchAbsentDirectories;
}
+ public boolean getRepositoriesAreBinary() {
+ return repositoriesAreBinary;
+ }
+
/**
* Sets the fetchAbsentDirectories.
* @param etchAbsentDirectories The etchAbsentDirectories to set
@@ -375,6 +380,10 @@ public class CVSProviderPlugin extends Plugin {
promptOnFileDelete = prompt;
}
+ public void setRepositoriesAreBinary(boolean binary) {
+ repositoriesAreBinary = binary;
+ }
+
public boolean getPromptOnFolderDelete() {
return promptOnFolderDelete;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
index f2bbf27c2..0931de788 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
@@ -68,6 +68,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
private Button considerContentsInCompare;
private Button showMarkers;
private Button replaceUnmanaged;
+ private Button repositoriesAreBinary;
private Button never;
private Button prompt;
@@ -177,7 +178,8 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
considerContentsInCompare = createCheckBox(composite, Policy.bind("CVSPreferencePage.considerContentsInCompare")); //$NON-NLS-1$
showMarkers = createCheckBox(composite, Policy.bind("CVSPreferencePage.showAddRemoveMarkers")); //$NON-NLS-1$
replaceUnmanaged = createCheckBox(composite, Policy.bind("CVSPreferencePage.replaceUnmanaged")); //$NON-NLS-1$
-
+ repositoriesAreBinary = createCheckBox(composite, Policy.bind("CVSPreferencePage.repositoriesAreBinary")); //$NON-NLS-1$
+
createLabel(composite, ""); createLabel(composite, ""); //$NON-NLS-1$ //$NON-NLS-2$
createLabel(composite, Policy.bind("CVSPreferencePage.timeoutValue")); //$NON-NLS-1$
@@ -235,6 +237,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
}
});
+ WorkbenchHelp.setHelp(repositoriesAreBinary, IHelpContextIds.PREF_REPOSITORIES_ARE_BINARY);
WorkbenchHelp.setHelp(pruneEmptyDirectoriesField, IHelpContextIds.PREF_PRUNE);
WorkbenchHelp.setHelp(compressionLevelCombo, IHelpContextIds.PREF_COMPRESSION);
WorkbenchHelp.setHelp(quietnessCombo, IHelpContextIds.PREF_QUIET);
@@ -282,6 +285,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
IPreferenceStore store = getPreferenceStore();
pruneEmptyDirectoriesField.setSelection(store.getBoolean(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES));
timeoutValue.setText(new Integer(store.getInt(ICVSUIConstants.PREF_TIMEOUT)).toString());
+ repositoriesAreBinary.setSelection(store.getBoolean(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY));
quietnessCombo.add(Policy.bind("CVSPreferencePage.notquiet")); //$NON-NLS-1$
quietnessCombo.add(Policy.bind("CVSPreferencePage.somewhatquiet")); //$NON-NLS-1$
quietnessCombo.add(Policy.bind("CVSPreferencePage.reallyquiet")); //$NON-NLS-1$
@@ -335,6 +339,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
store.setValue(ICVSUIConstants.PREF_SHOW_MARKERS, showMarkers.getSelection());
store.setValue(ICVSUIConstants.PREF_REPLACE_UNMANAGED, replaceUnmanaged.getSelection());
store.setValue(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS, getSaveRadio());
+ store.setValue(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY, repositoriesAreBinary.getSelection());
CVSProviderPlugin.getPlugin().setReplaceUnmanaged(
store.getBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED));
@@ -346,6 +351,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
getQuietnessOptionFor(store.getInt(ICVSUIConstants.PREF_QUIETNESS)));
CVSProviderPlugin.getPlugin().setCompressionLevel(
store.getInt(ICVSUIConstants.PREF_COMPRESSION_LEVEL));
+ CVSProviderPlugin.getPlugin().setRepositoriesAreBinary(store.getBoolean(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY));
KSubstOption oldKSubst = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
KSubstOption newKSubst = KSubstOption.fromMode(store.getString(ICVSUIConstants.PREF_TEXT_KSUBST));
CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(newKSubst);
@@ -374,6 +380,7 @@ public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPref
showMarkers.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_MARKERS));
replaceUnmanaged.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED));
initializeSaveRadios(store.getDefaultInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS));
+ repositoriesAreBinary.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY));
}
private void createSaveCombo(Composite composite) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java
index b14475b70..456655dea 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java
@@ -55,6 +55,7 @@ public interface IHelpContextIds {
public static final String KEYWORD_SUBSTITUTION_CHANGED_PAGE = PREFIX + "keyword_substituton_changed_page_context"; //$NON-NLS-1$
// Preference Pages
+ public static final String PREF_REPOSITORIES_ARE_BINARY = PREFIX + "repositories_are_binary_pref"; //$NON-NLS-1$
public static final String PREF_PRUNE = PREFIX + "prune_empty_directories_pref"; //$NON-NLS-1$
public static final String PREF_QUIET = PREFIX + "quietness_level_pref"; //$NON-NLS-1$
public static final String PREF_COMPRESSION = PREFIX + "compression_level_pref"; //$NON-NLS-1$

Back to the top