Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/stash/StashCreateUI.java10
2 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java
index 61b9069f6d..867c8f4f36 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java
@@ -284,6 +284,9 @@ public class UIPreferences {
/** */
public static final String BLOCK_COMMIT_LEVEL = "blockCommitCombo"; //$NON-NLS-1$
+ /** */
+ public static final String STASH_INCLUDE_UNTRACKED = "stashIncludeUntracked"; //$NON-NLS-1$
+
/**
* Converts a persisted String separated with commas to an integer array
*
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/stash/StashCreateUI.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/stash/StashCreateUI.java
index c82d236fbb..829d35f516 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/stash/StashCreateUI.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/stash/StashCreateUI.java
@@ -22,11 +22,13 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.egit.core.op.StashCreateOperation;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.JobFamilies;
+import org.eclipse.egit.ui.UIPreferences;
import org.eclipse.egit.ui.UIUtils;
import org.eclipse.egit.ui.internal.UIText;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.window.Window;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
@@ -136,6 +138,9 @@ public class StashCreateUI {
private boolean includeUntracked;
+ private final IPreferenceStore store = Activator.getDefault()
+ .getPreferenceStore();
+
public StashCreateDialog(Shell shell) {
super(shell);
}
@@ -163,6 +168,9 @@ public class StashCreateUI {
untrackedButton = new Button(composite, SWT.CHECK);
untrackedButton
.setText(UIText.StashCreateCommand_includeUntrackedLabel);
+ includeUntracked = store
+ .getBoolean(UIPreferences.STASH_INCLUDE_UNTRACKED);
+ untrackedButton.setSelection(includeUntracked);
text.setFocus();
return composite;
@@ -173,6 +181,8 @@ public class StashCreateUI {
if (buttonId == IDialogConstants.OK_ID) {
commitMessage = text.getText();
includeUntracked = untrackedButton.getSelection();
+ store.setValue(UIPreferences.STASH_INCLUDE_UNTRACKED,
+ includeUntracked);
} else {
commitMessage = null;
includeUntracked = false;

Back to the top