Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Rolka2013-08-14 15:32:25 +0000
committerDaniel Rolka2013-08-14 15:33:40 +0000
commite0154e95cd072a798b3a5eb664bc276490ccbe12 (patch)
tree739ed1a01ca243202dccd59757e26561498f8e3c
parent0b5f24fa4c7134bf901e387289303c75678784ca (diff)
downloadorg.eclipse.e4.tools-e0154e95cd072a798b3a5eb664bc276490ccbe12.tar.gz
org.eclipse.e4.tools-e0154e95cd072a798b3a5eb664bc276490ccbe12.tar.xz
org.eclipse.e4.tools-e0154e95cd072a798b3a5eb664bc276490ccbe12.zip
Signed-off-by: Daniel Rolka <daniel.rolka@pl.ibm.com>
-rw-r--r--bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/core/CapturedEventFilterMatcher.java2
-rw-r--r--bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventFilters.java6
-rw-r--r--bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventTree.java8
3 files changed, 8 insertions, 8 deletions
diff --git a/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/core/CapturedEventFilterMatcher.java b/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/core/CapturedEventFilterMatcher.java
index a360cd33..683643e7 100644
--- a/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/core/CapturedEventFilterMatcher.java
+++ b/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/core/CapturedEventFilterMatcher.java
@@ -103,7 +103,7 @@ public class CapturedEventFilterMatcher {
}
private boolean matchesToEmptyString(Object current) {
- return current != null && current instanceof String && current.toString().isEmpty();
+ return current != null && current instanceof String && current.toString().length() == 0;
}
private boolean matchesToNull(Object current) {
diff --git a/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventFilters.java b/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventFilters.java
index 5ddd7187..49348fec 100644
--- a/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventFilters.java
+++ b/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventFilters.java
@@ -39,7 +39,7 @@ import org.eclipse.swt.widgets.ToolTip;
public class CapturedEventFilters {
private final static String NOT_SELECTED_VALUE = "-- expected value --";
- private Composite control;
+ private final Composite control;
private Text valueText;
@@ -111,7 +111,7 @@ public class CapturedEventFilters {
valueText.setText(NOT_SELECTED_VALUE);
valueText.addFocusListener(new FocusListener() {
public void focusLost(FocusEvent e) {
- if (valueText.getText().trim().isEmpty()) {
+ if (valueText.getText().trim().length() == 0) {
valueText.setText(NOT_SELECTED_VALUE);
}
}
@@ -194,7 +194,7 @@ public class CapturedEventFilters {
}
String value = valueText.getText();
- if (value.isEmpty() || value.equals(NOT_SELECTED_VALUE)) {
+ if (value.length() == 0 || value.equals(NOT_SELECTED_VALUE)) {
getTooltip().setText(String.format("%s is empty", getFieldName(NOT_SELECTED_VALUE)));
getTooltip().setVisible(true);
return;
diff --git a/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventTree.java b/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventTree.java
index 7e0b23e7..602978f5 100644
--- a/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventTree.java
+++ b/bundles/org.eclipse.e4.tools.event.spy/src/org/eclipse/e4/tools/event/spy/ui/CapturedEventTree.java
@@ -38,11 +38,11 @@ public class CapturedEventTree {
void selectionChanged(CapturedEventTreeSelection selection);
}
- private Tree tree;
+ private final Tree tree;
private SelectionListener selectionListener;
- private List<ItemToFilter> columns = new ArrayList<ItemToFilter>();
+ private final List<ItemToFilter> columns = new ArrayList<ItemToFilter>();
/* Layout scheme:
@@ -84,7 +84,7 @@ public class CapturedEventTree {
public void treeExpanded(TreeEvent e) {
TreeItem item = (TreeItem) e.item;
TreeItem paramItem = item.getItem(0);
- if (paramItem.getText().isEmpty()) {
+ if (paramItem.getText().length() == 0) {
for (Parameter param: (List<Parameter>) paramItem.getData()) {
if (paramItem == null) {
paramItem = new TreeItem(item, SWT.NONE);
@@ -120,7 +120,7 @@ public class CapturedEventTree {
}
if (selectedItemIndex >= 0 && selectionListener != null) {
String selection = items[0].getText(selectedItemIndex);
- if (!selection.isEmpty()) {
+ if (selection.length() != 0) {
selectionListener.selectionChanged(new CapturedEventTreeSelection(selection,items[0].getItemCount() == 0));
}
}

Back to the top