Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 226265 Details for
Bug 92518
[Dialogs] Removing sections from DialogSettings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed fix
0001-Fix-bug-92518-Dialogs-Removing-sections-from-DialogS.patch (text/plain), 3.04 KB, created by
RĂ¼diger Herrmann
on 2013-01-29 10:40:35 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
RĂ¼diger Herrmann
Created:
2013-01-29 10:40:35 EST
Size:
3.04 KB
patch
obsolete
>From 14849526a40f0bf4709fc9ec7280bae4d10e7e93 Mon Sep 17 00:00:00 2001 >From: Ruediger Herrmann <ruediger.herrmann@gmx.de> >Date: Tue, 29 Jan 2013 16:19:16 +0100 >Subject: [PATCH] Fix bug 92518: [Dialogs] Removing sections from > DialogSettings > >--- > .../org/eclipse/jface/dialogs/DialogSettings.java | 15 +++++++++- > .../jface/tests/dialogs/DialogSettingsTest.java | 27 ++++++++++++++++++++ > 2 files changed, 40 insertions(+), 2 deletions(-) > >diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java >index 37fac45..458d287 100644 >--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java >+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java >@@ -120,14 +120,24 @@ public class DialogSettings implements IDialogSettings { > return section; > } > >- /* (non-Javadoc) >+ /* (non-Javadoc) > * Method declared on IDialogSettings. > */ > public void addSection(IDialogSettings section) { > sections.put(section.getName(), section); > } > >- /* (non-Javadoc) >+ /** >+ * Remove a section in the receiver. If the given section does not exist, nothing is done. >+ * >+ * @param section >+ * the section to be removed >+ */ >+ public void removeSection(IDialogSettings section) { >+ sections.remove(section.getName()); >+ } >+ >+ /* (non-Javadoc) > * Method declared on IDialogSettings. > */ > public String get(String key) { >@@ -591,4 +601,5 @@ public class DialogSettings implements IDialogSettings { > return null; > } > } >+ > } >diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/dialogs/DialogSettingsTest.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/dialogs/DialogSettingsTest.java >index f09deab..af03192 100644 >--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/dialogs/DialogSettingsTest.java >+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/dialogs/DialogSettingsTest.java >@@ -151,6 +151,33 @@ public class DialogSettingsTest extends TestCase { > } > }); > } >+ >+ public void testRemoveSection() { >+ DialogSettings dialogSettings = new DialogSettings(null); >+ IDialogSettings section = dialogSettings.addNewSection("new-section"); >+ >+ dialogSettings.removeSection(section); >+ >+ assertEquals(0, dialogSettings.getSections().length); >+ } >+ >+ public void testRemoveNonExistingSection() { >+ DialogSettings dialogSettings = new DialogSettings(null); >+ IDialogSettings otherSection = new DialogSettings(null); >+ >+ dialogSettings.removeSection(otherSection); >+ >+ assertEquals(0, dialogSettings.getSections().length); >+ } >+ >+ public void testRemoveSectionWithNullArgument() { >+ DialogSettings dialogSettings = new DialogSettings(null); >+ >+ try { >+ dialogSettings.removeSection(null); >+ } catch (NullPointerException expected) { >+ } >+ } > > public void testKeys() throws IOException { > for (int i = 0; i < TEST_STRINGS.length; i++) { >-- >1.7.5.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 92518
:
23930
| 226265