aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Megert2011-11-03 14:04:31 (EDT)
committerMatthias Sohn2011-11-03 14:04:31 (EDT)
commit2112f56b0a6968e25100c20401047ac1496ec2ae (patch)
tree779337205cf86e4d86b348c8bf971a785568648a
parentc68ec77bde3d770a20ca7ebd0d8e3963b03b2f0c (diff)
downloadegit-2112f56b0a6968e25100c20401047ac1496ec2ae.zip
egit-2112f56b0a6968e25100c20401047ac1496ec2ae.tar.gz
egit-2112f56b0a6968e25100c20401047ac1496ec2ae.tar.bz2
Fixed incompatibility introduced by fix for bug 361405.refs/changes/34/4534/2
Inlined code which is not yet available in Eclipse 3.5. Bug 361405 Change-Id: I8ae70e864d154a5d5e1640e5db5d1813ba2d18c8 Signed-off-by: Daniel Megert <daniel_megert@ch.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitCreatePatchWizard.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitCreatePatchWizard.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitCreatePatchWizard.java
index 920855e..0dffea9 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitCreatePatchWizard.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitCreatePatchWizard.java
@@ -28,8 +28,8 @@ import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIIcons;
import org.eclipse.egit.ui.UIText;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -103,7 +103,19 @@ public class GitCreatePatchWizard extends Wizard {
this.commit = commit;
this.db = db;
- setDialogSettings(DialogSettings.getOrCreateSection(Activator.getDefault().getDialogSettings(), "GitCreatePatchWizard")); //$NON-NLS-1$
+ setDialogSettings(getOrCreateSection(Activator.getDefault().getDialogSettings(), "GitCreatePatchWizard")); //$NON-NLS-1$
+ }
+
+ /*
+ * Copy of org.eclipse.jface.dialogs.DialogSettings.getOrCreateSection(IDialogSettings, String)
+ * which is not available in 3.5.
+ */
+ private static IDialogSettings getOrCreateSection(IDialogSettings settings,
+ String sectionName) {
+ IDialogSettings section = settings.getSection(sectionName);
+ if (section == null)
+ section = settings.addNewSection(sectionName);
+ return section;
}
@Override