Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Mueller2018-02-21 06:29:44 -0500
committerMarvin Mueller2018-02-21 06:29:44 -0500
commit030af6cd5155c8d54c711f709468aebc7560ab59 (patch)
tree03848d2db3a1e4b1cff6e9742142e7b4bb8beea1
parent8be2f2f822e6ce5de7d647974124d012d37bcc48 (diff)
downloadorg.eclipse.jubula.core-030af6cd5155c8d54c711f709468aebc7560ab59.tar.gz
org.eclipse.jubula.core-030af6cd5155c8d54c711f709468aebc7560ab59.tar.xz
org.eclipse.jubula.core-030af6cd5155c8d54c711f709468aebc7560ab59.zip
Fix Problem with comments not displayed in CTDSE
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/factory/TestDataControlFactory.java21
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/AbstractDataSetPage.java10
2 files changed, 17 insertions, 14 deletions
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/factory/TestDataControlFactory.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/factory/TestDataControlFactory.java
index e68788773..1e4c84b2b 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/factory/TestDataControlFactory.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/factory/TestDataControlFactory.java
@@ -11,6 +11,7 @@
package org.eclipse.jubula.client.ui.rcp.factory;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -134,7 +135,7 @@ public class TestDataControlFactory {
if (paramObj instanceof ITestDataCubePO) {
ITestDataCubePO tdc = (ITestDataCubePO)paramObj;
- String[] values = getValuesFromValueSet(paramDesc);
+ Map<String, String> values = getValuesFromValueSet(paramDesc);
if (TestDataConstants.BOOLEAN.equals(paramDesc.getType())) {
return new CheckedParamTextContentAssisted(parent, style,
tdc, paramDesc,
@@ -147,7 +148,7 @@ public class TestDataControlFactory {
return new CheckedParamTextContentAssisted(parent, style, tdc,
paramDesc,
createParamValueValidator(paramDesc.getType(), false,
- values),
+ values.keySet().toArray(new String[values.size()])),
new ParamProposalProvider(values, null, paramDesc));
}
@@ -161,17 +162,19 @@ public class TestDataControlFactory {
* @param paramDesc the {@link IParamDescriptionPO} should be of type {@link ITcParamDescriptionPO}
* @return the values from the {@link IParamValueSetPO}
*/
- private static String[] getValuesFromValueSet(
+ private static Map<String, String> getValuesFromValueSet(
IParamDescriptionPO paramDesc) {
- String [] values = new String[0];
if (paramDesc instanceof ITcParamDescriptionPO) {
ITcParamDescriptionPO desc = (ITcParamDescriptionPO) paramDesc;
- List<String> collect = desc.getValueSet().getValues().stream()
- .map(IValueCommentPO::getValue)
- .collect(Collectors.toList());
- values = collect.toArray(new String[collect.size()]);
+ IParamValueSetPO valueSet = desc.getValueSet();
+ List<IValueCommentPO> values = valueSet.getValues();
+ if (valueSet != null && values != null && values.size() > 0) {
+ return values.stream()
+ .collect(Collectors.toMap(IValueCommentPO::getValue,
+ IValueCommentPO::getComment));
+ }
}
- return values;
+ return new HashMap<>();
}
/**
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 0d5ce25ff..cad783d66 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
@@ -217,7 +217,7 @@ public abstract class AbstractDataSetPage extends Page
/** En-/Disabler for swt.Controls */
private ControlEnabler m_controlEnabler;
/** bp class */
- private AbstractParamInterfaceBP m_paramBP;
+ private AbstractParamInterfaceBP<?> m_paramBP;
/** the corresponding part */
private IWorkbenchPart m_currentPart;
@@ -249,7 +249,7 @@ public abstract class AbstractDataSetPage extends Page
* The constructor
* @param bp the business process to use for this page
*/
- public AbstractDataSetPage(AbstractParamInterfaceBP bp) {
+ public AbstractDataSetPage(AbstractParamInterfaceBP<?> bp) {
setParamBP(bp);
}
@@ -1789,7 +1789,7 @@ public abstract class AbstractDataSetPage extends Page
IParameterInterfacePO paramInterfacePO = null;
Object firstSel = selection.getFirstElement();
if (firstSel instanceof SearchResultElement) {
- firstSel = ((SearchResultElement) firstSel).getObject();
+ firstSel = ((SearchResultElement<?>) firstSel).getObject();
}
if (firstSel instanceof IParameterInterfacePO) {
paramInterfacePO = (IParameterInterfacePO)firstSel;
@@ -1924,14 +1924,14 @@ public abstract class AbstractDataSetPage extends Page
* @param paramBP
* the paramBP to set
*/
- private void setParamBP(AbstractParamInterfaceBP paramBP) {
+ private void setParamBP(AbstractParamInterfaceBP<?> paramBP) {
m_paramBP = paramBP;
}
/**
* @return the paramBP
*/
- private AbstractParamInterfaceBP getParamBP() {
+ private AbstractParamInterfaceBP<?> getParamBP() {
return m_paramBP;
}

Back to the top