Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2015-01-21 14:10:55 +0000
committerMarkus Tiede2015-01-22 11:47:04 +0000
commit1fa20718b48d0da416ca95256056f735265473f3 (patch)
treef2283e13de243aff5f0b806385e4d1b0f0bb7b86 /org.eclipse.jubula.rc.swt
parentf7aaf37c031a0c0739f3fcff85ffaccfcb5069e6 (diff)
downloadorg.eclipse.jubula.core-1fa20718b48d0da416ca95256056f735265473f3.tar.gz
org.eclipse.jubula.core-1fa20718b48d0da416ca95256056f735265473f3.tar.xz
org.eclipse.jubula.core-1fa20718b48d0da416ca95256056f735265473f3.zip
Non-sprint task - minor refactoring: add generics to org.eclipse.jubula.rc.common.implclasses.tree.AbstractTreeOperationContext<T> - tree type added.
Diffstat (limited to 'org.eclipse.jubula.rc.swt')
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/tree/TreeOperationContext.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/tree/TreeOperationContext.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/tree/TreeOperationContext.java
index 7fd17a3a4..ca37c3200 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/tree/TreeOperationContext.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/tree/TreeOperationContext.java
@@ -40,7 +40,7 @@ import org.eclipse.swt.widgets.TreeItem;
* @author BREDEX GmbH
* @created 09.08.2005
*/
-public class TreeOperationContext extends AbstractTreeOperationContext {
+public class TreeOperationContext extends AbstractTreeOperationContext<Tree> {
/** The AUT Server logger. */
private static AutServerLogger log =
@@ -118,7 +118,7 @@ public class TreeOperationContext extends AbstractTreeOperationContext {
new IRunnable() {
public Object run() {
- Tree tree = (Tree)getTree();
+ Tree tree = getTree();
org.eclipse.swt.graphics.Rectangle visibleBounds =
tree.getClientArea();
@@ -138,7 +138,7 @@ public class TreeOperationContext extends AbstractTreeOperationContext {
*/
public void collapseNode(Object node) {
final TreeItem item = castToTreeItem(node);
- final Tree tree = (Tree)getTree();
+ final Tree tree = getTree();
boolean doAction = isExpanded(item);
if (doAction) {
if (log.isDebugEnabled()) {
@@ -173,7 +173,7 @@ public class TreeOperationContext extends AbstractTreeOperationContext {
try {
final TreeItem item = castToTreeItem(node);
- final Tree tree = (Tree)getTree();
+ final Tree tree = getTree();
boolean doAction = !isExpanded(item);
Thread.currentThread().setContextClassLoader(tree.getClass()
@@ -239,7 +239,7 @@ public class TreeOperationContext extends AbstractTreeOperationContext {
new IRunnable() {
public Object run() {
- return ((Tree)getTree()).getItems();
+ return getTree().getItems();
}
});
@@ -301,7 +301,7 @@ public class TreeOperationContext extends AbstractTreeOperationContext {
getQueuer().invokeAndWait(
"selectNodeCheckbox", new IRunnable() { //$NON-NLS-1$
public Object run() {
- Tree tree = ((Tree)getTree());
+ Tree tree = getTree();
boolean toggledValue = !item.getChecked();
item.setChecked(toggledValue);
Event toggleEvent = new Event();
@@ -344,14 +344,14 @@ public class TreeOperationContext extends AbstractTreeOperationContext {
new IRunnable() {
public Object run() {
- ((Tree)getTree()).showItem(castToTreeItem(node));
+ getTree().showItem(castToTreeItem(node));
return null;
}
});
final Rectangle nodeBoundsRelativeToParent = getNodeBounds(node);
- final Tree tree = (Tree)getTree();
+ final Tree tree = getTree();
getQueuer().invokeAndWait("getNodeBoundsRelativeToParent", //$NON-NLS-1$
new IRunnable() {
@@ -459,7 +459,7 @@ public class TreeOperationContext extends AbstractTreeOperationContext {
public Object run() {
TreeItem [] selectedItems =
- ((Tree)getTree()).getSelection();
+ getTree().getSelection();
SelectionUtil.validateSelection(selectedItems);
return selectedItems;
}
@@ -514,7 +514,7 @@ public class TreeOperationContext extends AbstractTreeOperationContext {
new IRunnable() {
public Object run() {
- int colCount = ((Tree)getTree()).getColumnCount();
+ int colCount = getTree().getColumnCount();
for (int i = 0; i < colCount; i++) {
String textAtColumn = CAPUtil.getWidgetText(item,
@@ -548,7 +548,7 @@ public class TreeOperationContext extends AbstractTreeOperationContext {
new IRunnable() {
public Object run() {
- Tree tree = (Tree)getTree();
+ Tree tree = getTree();
org.eclipse.swt.graphics.Rectangle bounds =
SwtUtils.getRelativeWidgetBounds(
(TreeItem)node, tree);

Back to the top