Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2013-10-25 12:49:28 +0000
committerLakshmi Shanmugam2013-10-25 12:49:28 +0000
commit5a748dd716a2f6cf95105a6f5f78eee6d06dbfc6 (patch)
tree952199e4eb39c5eb1b41607f7ba824eeee8ceb0b
parent8fbc959aef2669dd6e0968ec4b6f32974f4bcd56 (diff)
downloadeclipse.platform.swt-5a748dd716a2f6cf95105a6f5f78eee6d06dbfc6.tar.gz
eclipse.platform.swt-5a748dd716a2f6cf95105a6f5f78eee6d06dbfc6.tar.xz
eclipse.platform.swt-5a748dd716a2f6cf95105a6f5f78eee6d06dbfc6.zip
Changed StyledText.isSelected() to isTextSelected()v4410b
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java14
2 files changed, 8 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index ad2b253609..0bc8371405 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -7151,7 +7151,7 @@ boolean isMirrored() {
*
* @since 3.103
*/
-public boolean isSelected() {
+public boolean isTextSelected() {
checkWidget();
if (blockSelection && blockXLocation != -1) {
Rectangle rect = getBlockSelectionPosition();
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java
index 9107dafaeb..9fcf8cc868 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java
@@ -4413,14 +4413,14 @@ public void test_showSelection() {
text.showSelection();
}
-public void test_isSelected() {
+public void test_isTextSelected() {
// Empty selection
text.setText("Sample Text Selection");
- assertFalse(text.isSelected());
+ assertFalse(text.isTextSelected());
// Set selection
text.setSelection(0, text.getCharCount());
- assertTrue(text.isSelected());
+ assertTrue(text.isTextSelected());
// Set block selection
StringBuilder buffer = new StringBuilder();
@@ -4431,14 +4431,14 @@ public void test_isSelected() {
text.setSize(100, 10000);
text.setBlockSelection(true);
text.setBlockSelectionBounds(0, 0, 100, 10000);
- assertTrue(text.isSelected());
+ assertTrue(text.isTextSelected());
// Set block selection on new line
text.setText(System.getProperty("line.separator"));
text.setSize(100, 100);
text.setBlockSelection(true);
text.setBlockSelectionBounds(0, 0, 100, 100);
- assertTrue(text.isSelected());
+ assertTrue(text.isTextSelected());
}
public static Test suite() {
@@ -4508,7 +4508,7 @@ public static java.util.Vector methodNames() {
methodNames.addElement("test_getWordWrap");
methodNames.addElement("test_insertLjava_lang_String");
methodNames.addElement("test_invokeActionI");
- methodNames.addElement("test_isSelected");
+ methodNames.addElement("test_isTextSelected");
methodNames.addElement("test_paste");
methodNames.addElement("test_print");
methodNames.addElement("test_printLorg_eclipse_swt_printing_Printer");
@@ -4621,7 +4621,7 @@ protected void runTest() throws Throwable {
else if (getName().equals("test_getWordWrap")) test_getWordWrap();
else if (getName().equals("test_insertLjava_lang_String")) test_insertLjava_lang_String();
else if (getName().equals("test_invokeActionI")) test_invokeActionI();
- else if (getName().equals("test_isSelected")) test_isSelected();
+ else if (getName().equals("test_isTextSelected")) test_isTextSelected();
else if (getName().equals("test_paste")) test_paste();
else if (getName().equals("test_print")) test_print();
else if (getName().equals("test_printLorg_eclipse_swt_printing_Printer")) test_printLorg_eclipse_swt_printing_Printer();

Back to the top