diff options
author | Dani Megert | 2005-04-28 09:04:17 +0000 |
---|---|---|
committer | Dani Megert | 2005-04-28 09:04:17 +0000 |
commit | 1e15f6892902b323ff9fbfe70775735bc2801c32 (patch) | |
tree | 59e7f1cd72d2b65c658d473c144ead4be9930b8e | |
parent | 725a7b140826023c59fa6eacc1a122443cacabb6 (diff) | |
download | eclipse.platform.text-1e15f6892902b323ff9fbfe70775735bc2801c32.tar.gz eclipse.platform.text-1e15f6892902b323ff9fbfe70775735bc2801c32.tar.xz eclipse.platform.text-1e15f6892902b323ff9fbfe70775735bc2801c32.zip |
Fixed bug 93047: [api] spelling error in method name: LinkedPositionGroup.isEmtpy()
3 files changed, 17 insertions, 7 deletions
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/link/LinkedPositionGroupTest.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/link/LinkedPositionGroupTest.java index 25812679dff..1d81e52965b 100644 --- a/org.eclipse.text.tests/src/org/eclipse/text/tests/link/LinkedPositionGroupTest.java +++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/link/LinkedPositionGroupTest.java @@ -22,15 +22,15 @@ import org.eclipse.jface.text.link.LinkedPositionGroup; public class LinkedPositionGroupTest extends TestCase { - public void testIsEmtpy() { + public void testIsEmpty() { LinkedPositionGroup group= new LinkedPositionGroup(); - assertTrue(group.isEmtpy()); + assertTrue(group.isEmpty()); } public void testIsNotEmtpy() throws BadLocationException { LinkedPositionGroup group= new LinkedPositionGroup(); group.addPosition(new LinkedPosition(new Document(), 0, 0)); - assertFalse(group.isEmtpy()); + assertFalse(group.isEmpty()); } public void testGetPositions() throws BadLocationException { diff --git a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java index 65750864807..e2a38997eaa 100644 --- a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java +++ b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java @@ -518,7 +518,7 @@ public class LinkedModeModel { private void enforceNotEmpty() { boolean hasPosition= false; for (Iterator it= fGroups.iterator(); it.hasNext(); ) - if (!((LinkedPositionGroup) it.next()).isEmtpy()) { + if (!((LinkedPositionGroup) it.next()).isEmpty()) { hasPosition= true; break; } diff --git a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java index e29761ff93a..13db6a2e7bd 100644 --- a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java +++ b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java @@ -358,12 +358,22 @@ public class LinkedPositionGroup { /** * Returns whether this group contains any positions. * - * @return <code>true</code> if this group is empty, <code>false</code> - * if it is not + * @return <code>true</code> if this group is empty, <code>false</code> otherwise + * @since 3.1 */ - public boolean isEmtpy() { + public boolean isEmpty() { return fPositions.size() == 0; } + + /** + * Returns whether this group contains any positions. + * + * @return <code>true</code> if this group is empty, <code>false</code> otherwise + * @deprecated As of 3.1, replaced by {@link #isEmpty()} + */ + public boolean isEmtpy() { + return isEmpty(); + } /** * Returns the positions contained in the receiver as an array. The |