Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/AbstractDataSetPage.java12
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/DataSetView.java3
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/ParamNodeDataSetPage.java14
3 files changed, 15 insertions, 14 deletions
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/AbstractDataSetPage.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/AbstractDataSetPage.java
index 5360a4914..4b231b196 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/AbstractDataSetPage.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/AbstractDataSetPage.java
@@ -1085,9 +1085,9 @@ public abstract class AbstractDataSetPage extends Page
fillDataSetCombo();
fillLanguageCombo();
setPriorComboSelection();
- if (getParamInterfaceObj() != null
- && isNodeValid(getParamInterfaceObj())) {
- getTableViewer().setInput(getInputForTable(getParamInterfaceObj()));
+ IParameterInterfacePO paramObj = getParamInterfaceObj();
+ if (paramObj != null && isNodeValid(paramObj)) {
+ getTableViewer().setInput(getInputForTable(paramObj));
createTable();
} else {
getTableViewer().setInput(null);
@@ -1945,8 +1945,10 @@ public abstract class AbstractDataSetPage extends Page
// is not a StructuredSelection
return;
}
+ IStructuredSelection strucSelection =
+ (IStructuredSelection)selection;
IParameterInterfacePO paramNode = getSelectedParamInterfaceObj(
- (IStructuredSelection)selection);
+ strucSelection);
boolean correctPart = false;
if (part != null) {
@@ -1958,7 +1960,7 @@ public abstract class AbstractDataSetPage extends Page
} else {
getTable().setForeground(LayoutUtil.DEFAULT_OS_COLOR);
}
- boolean hasInput = !((IStructuredSelection)selection).isEmpty();
+ boolean hasInput = !strucSelection.isEmpty();
boolean isEditorOpen = isEditorOpen(paramNode);
boolean hasParameter = false;
boolean hasExcelFile = false;
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/DataSetView.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/DataSetView.java
index 5f6ba06cd..f8314fcaf 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/DataSetView.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/DataSetView.java
@@ -147,7 +147,6 @@ public class DataSetView extends PageBookView
dispatcher.removeParamChangedListener(this);
dispatcher.removeLanguageChangedListener(this);
dispatcher.removeProjectLoadedListener(this);
- dispatcher.removeParamChangedListener(this);
super.dispose();
}
@@ -176,7 +175,7 @@ public class DataSetView extends PageBookView
}
return super.getAdapter(adapter);
}
- //$NON-NLS-1$
+
/**
* @return Returns the parent.
*/
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/ParamNodeDataSetPage.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/ParamNodeDataSetPage.java
index 3b5b26c39..46b7e0da3 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/ParamNodeDataSetPage.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/ParamNodeDataSetPage.java
@@ -55,7 +55,8 @@ public class ParamNodeDataSetPage extends AbstractDataSetPage {
/** {@inheritDoc} */
protected boolean isNodeValid(IParameterInterfacePO paramObj) {
- return getParamNodePO(paramObj).isValid();
+ return paramObj instanceof IParamNodePO
+ && getParamNodePO(paramObj).isValid();
}
/**
@@ -72,11 +73,10 @@ public class ParamNodeDataSetPage extends AbstractDataSetPage {
/** {@inheritDoc} */
protected boolean isEditorOpen(IParameterInterfacePO paramObj) {
if (paramObj != null) {
- IParamNodePO paramNode = getParamNodePO(paramObj);
- INodePO node = paramNode;
- if (paramNode instanceof ICapPO
- || paramNode instanceof IExecTestCasePO) {
- node = paramNode.getParentNode();
+ Object inputNode = paramObj;
+ if (paramObj instanceof ICapPO
+ || paramObj instanceof IExecTestCasePO) {
+ inputNode = getParamNodePO(paramObj).getParentNode();
}
List<IEditorReference> editors = Plugin.getAllEditors();
for (IEditorReference reference : editors) {
@@ -86,7 +86,7 @@ public class ParamNodeDataSetPage extends AbstractDataSetPage {
((NodeEditorInput)reference.getEditorInput())
.getNode();
if (editorInputNode != null
- && editorInputNode.equals(node)) {
+ && editorInputNode.equals(inputNode)) {
return true;
}
}

Back to the top