Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/CheckboxClickedRule.java6
-rw-r--r--org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/PushButtonClickedRule.java6
2 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/CheckboxClickedRule.java b/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/CheckboxClickedRule.java
index 45030312..19aa9e7f 100644
--- a/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/CheckboxClickedRule.java
+++ b/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/CheckboxClickedRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Red Hat Inc..
+ * Copyright (c) 2012, 2019 Red Hat Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -36,7 +36,7 @@ public class CheckboxClickedRule extends GenerationSimpleRule {
public void initializeForEvent(Event event) {
this.button = (Button)event.widget;
this.buttonText = this.button.getText();
- if (this.buttonText != null) {
+ if (!this.buttonText.equals("")) {
this.buttonText = this.buttonText.replace("&", "");
} else {
this.index = WidgetUtils.getIndex((Button)event.widget);
@@ -49,7 +49,7 @@ public class CheckboxClickedRule extends GenerationSimpleRule {
List<String> actions = new ArrayList<String>();
StringBuilder code = new StringBuilder();
- if (this.buttonText != null) {
+ if (!this.buttonText.equals("")) {
code.append("bot.checkBox(\"" + this.buttonText + "\")");
} else {
code.append("bot.checkBox(" + this.index + ")");
diff --git a/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/PushButtonClickedRule.java b/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/PushButtonClickedRule.java
index d394e086..c653570d 100644
--- a/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/PushButtonClickedRule.java
+++ b/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/simple/PushButtonClickedRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Red Hat Inc..
+ * Copyright (c) 2012, 2019 Red Hat Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -36,7 +36,7 @@ public class PushButtonClickedRule extends GenerationSimpleRule {
public void initializeForEvent(Event event) {
this.button = (Button)event.widget;
this.buttonText = this.button.getText();
- if (this.buttonText != null) {
+ if (!this.buttonText.equals("")) {
this.buttonText = this.buttonText.replace("&", "");
} else {
this.index = WidgetUtils.getIndex((Button)event.widget);
@@ -47,7 +47,7 @@ public class PushButtonClickedRule extends GenerationSimpleRule {
public List<String> getActions() {
List<String> actions = new ArrayList<String>();
StringBuilder code = new StringBuilder();
- if (this.buttonText != null) {
+ if (!this.buttonText.equals("")) {
code.append("bot.button(\"" + this.buttonText + "\")");
} else {
code.append("bot.button(" + this.index + ")");

Back to the top