aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Duft2012-04-11 05:14:49 (EDT)
committerMarkus Duft2012-04-11 05:16:28 (EDT)
commitc0bcc64fb69882e72ac57d3aa3d3ff8ca2e39903 (patch)
treee505a87775fdb9dde30042279f97eadb914f4851
parent7bd9d850e107b1f0d03921739fe140b304bf5bfc (diff)
downloadegit-c0bcc64fb69882e72ac57d3aa3d3ff8ca2e39903.zip
egit-c0bcc64fb69882e72ac57d3aa3d3ff8ca2e39903.tar.gz
egit-c0bcc64fb69882e72ac57d3aa3d3ff8ca2e39903.tar.bz2
Add setting for streamFileThreshold in the UI.refs/changes/60/5560/1
This was the only missing setting from WindowCacheConfig. Change-Id: I73e72d8b35e448f01aa226b9eb5c157220a4cda5
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferenceInitializer.java1
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferences.java3
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java1
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/WindowCachePreferencePage.java4
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties1
6 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferenceInitializer.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferenceInitializer.java
index c3242f0..ea2dce8 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferenceInitializer.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferenceInitializer.java
@@ -24,6 +24,7 @@ public class GitCorePreferenceInitializer extends AbstractPreferenceInitializer
p.putInt(GitCorePreferences.core_packedGitLimit, 10 * MB);
p.putBoolean(GitCorePreferences.core_packedGitMMAP, false);
p.putInt(GitCorePreferences.core_deltaBaseCacheLimit, 10 * MB);
+ p.putInt(GitCorePreferences.core_streamFileThreshold, 50 * MB);
p.putBoolean(GitCorePreferences.core_autoShareProjects, false);
}
}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferences.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferences.java
index 9be5749..edb2d35 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferences.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferences.java
@@ -24,6 +24,9 @@ public class GitCorePreferences {
public static final String core_deltaBaseCacheLimit =
"core_deltaBaseCacheLimit"; //$NON-NLS-1$
/** */
+ public static final String core_streamFileThreshold =
+ "core_streamFileThreshold"; //$NON-NLS-1$
+ /** */
public static final String core_autoShareProjects =
"core_autoShareProjects"; //$NON-NLS-1$
/** */
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java
index da6ac1b..213d0d6 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java
@@ -274,6 +274,7 @@ public class GitProjectData {
c.setPackedGitWindowSize(p.getInt(GitCorePreferences.core_packedGitWindowSize, d.getInt(GitCorePreferences.core_packedGitWindowSize, 0)));
c.setPackedGitMMAP(p.getBoolean(GitCorePreferences.core_packedGitMMAP, d.getBoolean(GitCorePreferences.core_packedGitMMAP, false)));
c.setDeltaBaseCacheLimit(p.getInt(GitCorePreferences.core_deltaBaseCacheLimit, d.getInt(GitCorePreferences.core_deltaBaseCacheLimit, 0)));
+ c.setStreamFileThreshold(p.getInt(GitCorePreferences.core_streamFileThreshold, d.getInt(GitCorePreferences.core_streamFileThreshold, 0)));
WindowCache.reconfigure(c);
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
index 6e8d351..7dc2524 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
@@ -2551,6 +2551,9 @@ public class UIText extends NLS {
public static String WindowCachePreferencePage_packedGitMMAP;
/** */
+ public static String WindowCachePreferencePage_streamFileThreshold;
+
+ /** */
public static String BasicConfigurationDialog_DialogMessage;
/** */
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/WindowCachePreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/WindowCachePreferencePage.java
index f2962f0..73cbf84 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/WindowCachePreferencePage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/WindowCachePreferencePage.java
@@ -55,6 +55,10 @@ public class WindowCachePreferencePage extends FieldEditorPreferencePage
GitCorePreferences.core_deltaBaseCacheLimit,
UIText.WindowCachePreferencePage_deltaBaseCacheLimit,
getFieldEditorParent(), 512, 1 * GB));
+ addField(new StorageSizeFieldEditor(
+ GitCorePreferences.core_streamFileThreshold,
+ UIText.WindowCachePreferencePage_streamFileThreshold,
+ getFieldEditorParent(), 10 * MB, 1 * GB));
addField(new BooleanFieldEditor(GitCorePreferences.core_packedGitMMAP,
UIText.WindowCachePreferencePage_packedGitMMAP,
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
index 1b21f02..b9022cb 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
@@ -847,6 +847,7 @@ WindowCachePreferencePage_packedGitWindowSize=Window size:
WindowCachePreferencePage_packedGitLimit=Window cache limit:
WindowCachePreferencePage_deltaBaseCacheLimit=Delta base cache limit:
WindowCachePreferencePage_packedGitMMAP=Use virtual memory mapping
+WindowCachePreferencePage_streamFileThreshold=Stream File Threshold:
ProjectsPreferencePage_AutoShareProjects=Auto share projects located in a git repository
ProjectsPreferencePage_RestoreBranchProjects=Track each branch's imported projects and restore on checkout