Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hein2015-08-24 01:55:33 -0400
committerMarcel Hein2015-08-24 01:55:33 -0400
commit8b8abcd90fe3b1f54cfae60720af814c67430d25 (patch)
treeae4143c594e96fc3e2e94463ddfb557461bc8a4f
parentb6ba67849f4033ddc2a5f01130acd61442b74f78 (diff)
downloadorg.eclipse.jubula.core-8b8abcd90fe3b1f54cfae60720af814c67430d25.tar.gz
org.eclipse.jubula.core-8b8abcd90fe3b1f54cfae60720af814c67430d25.tar.xz
org.eclipse.jubula.core-8b8abcd90fe3b1f54cfae60720af814c67430d25.zip
Sprint task - Allow treetable actions in JavaFX to use column values as well as integers. Fixed error message for invalid index
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java
index ac3692772..f89f162ce 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java
@@ -750,11 +750,18 @@ public class TreeTableOperationContext extends
usrIdxCol = usrIdxCol + 1;
}
int i = IndexConverter.toImplementationIndex(usrIdxCol);
- if (pathIterator.hasNext()) {
- columns = ((TreeTableColumn<?, ?>)
- columns.get(i)).getColumns();
- } else {
- column = (TreeTableColumn<?, ?>) columns.get(i);
+ try {
+ if (pathIterator.hasNext()) {
+ columns = ((TreeTableColumn<?, ?>) columns.get(i))
+ .getColumns();
+ } else {
+ column = (TreeTableColumn<?, ?>) columns.get(i);
+ }
+ } catch (IndexOutOfBoundsException e) {
+ throw new StepExecutionException(
+ "Invalid Index: " + IndexConverter.toUserIndex(i), //$NON-NLS-1$
+ EventFactory.createActionError(
+ TestErrorEvent.INVALID_INDEX));
}
} catch (NumberFormatException nfe) {
try {

Back to the top