Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jubula.client.alm.mylyn.ui/plugin.xml1
-rw-r--r--org.eclipse.jubula.client.alm.mylyn.ui/src/org/eclipse/jubula/client/alm/mylyn/ui/handler/OpenTaskFromNodeHandler.java5
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Ratio.java4
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTest.java6
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IRefTestSuitePO.java33
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/RefTestSuitePO.java8
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/NodePM.java5
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/AbstractNodePropertySource.java19
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/EventExecTestCaseGUIPropertySource.java2
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/ExecTestCaseGUIPropertySource.java2
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/RefTestSuiteGUIPropertySource.java16
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ShowSpecificationHandlerRefTS.java4
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenSpecificationHandlerRefTS.java4
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/propertytester/NodePropertyTester.java16
14 files changed, 89 insertions, 36 deletions
diff --git a/org.eclipse.jubula.client.alm.mylyn.ui/plugin.xml b/org.eclipse.jubula.client.alm.mylyn.ui/plugin.xml
index 5ff44033d..71bcccbdc 100644
--- a/org.eclipse.jubula.client.alm.mylyn.ui/plugin.xml
+++ b/org.eclipse.jubula.client.alm.mylyn.ui/plugin.xml
@@ -43,6 +43,7 @@
<instanceof value="org.eclipse.jubula.client.core.model.ISpecTestCasePO" />
<instanceof value="org.eclipse.jubula.client.core.model.IExecTestCasePO" />
<instanceof value="org.eclipse.jubula.client.core.model.ITestSuitePO" />
+ <instanceof value="org.eclipse.jubula.client.core.model.IRefTestSuitePO" />
<instanceof value="org.eclipse.jubula.client.core.model.ITestJobPO" />
</or>
<test property="org.eclipse.jubula.client.ui.rcp.model.hasTaskId" />
diff --git a/org.eclipse.jubula.client.alm.mylyn.ui/src/org/eclipse/jubula/client/alm/mylyn/ui/handler/OpenTaskFromNodeHandler.java b/org.eclipse.jubula.client.alm.mylyn.ui/src/org/eclipse/jubula/client/alm/mylyn/ui/handler/OpenTaskFromNodeHandler.java
index 8e02a6269..e939d874d 100644
--- a/org.eclipse.jubula.client.alm.mylyn.ui/src/org/eclipse/jubula/client/alm/mylyn/ui/handler/OpenTaskFromNodeHandler.java
+++ b/org.eclipse.jubula.client.alm.mylyn.ui/src/org/eclipse/jubula/client/alm/mylyn/ui/handler/OpenTaskFromNodeHandler.java
@@ -19,6 +19,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jubula.client.alm.mylyn.core.utils.ALMAccess;
import org.eclipse.jubula.client.core.model.INodePO;
import org.eclipse.jubula.client.core.model.IProjectPO;
+import org.eclipse.jubula.client.core.model.IRefTestSuitePO;
import org.eclipse.jubula.client.core.persistence.GeneralStorage;
import org.eclipse.jubula.client.ui.handlers.AbstractSelectionBasedHandler;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -44,6 +45,10 @@ public class OpenTaskFromNodeHandler extends AbstractSelectionBasedHandler {
if (element instanceof INodePO) {
INodePO node = (INodePO) element;
String taskId = node.getTaskId();
+ if (node instanceof IRefTestSuitePO) {
+ IRefTestSuitePO refTS = (IRefTestSuitePO)node;
+ taskId = refTS.getTestSuite().getTaskId();
+ }
if (StringUtils.isNotEmpty(taskId)) {
TasksUiUtil.openTask(repository, taskId);
}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Ratio.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Ratio.java
index b52e58bf3..f130c082f 100644
--- a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Ratio.java
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Ratio.java
@@ -374,9 +374,7 @@ public class Ratio implements IAnalyze {
if (count.getRefTestSuites().size() != 0) {
for (int i = 0; i < count.getRefTestSuites().size(); i++) {
IRefTestSuitePO ref = count.getRefTestSuites().get(i);
- INodePO tsRoot = NodePM.getTestSuite(ref.getTestSuiteGuid());
-
- TreeTraverser tt = new TreeTraverser(tsRoot);
+ TreeTraverser tt = new TreeTraverser(ref.getTestSuite());
tt.addOperation(count);
tt.traverse(true);
}
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTest.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTest.java
index f27097652..5669b7ac9 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTest.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTest.java
@@ -73,7 +73,6 @@ import org.eclipse.jubula.client.core.model.PoMaker;
import org.eclipse.jubula.client.core.model.TestResult;
import org.eclipse.jubula.client.core.model.TestResultNode;
import org.eclipse.jubula.client.core.persistence.GeneralStorage;
-import org.eclipse.jubula.client.core.persistence.NodePM;
import org.eclipse.jubula.client.core.persistence.TestResultPM;
import org.eclipse.jubula.client.core.persistence.TestResultSummaryPM;
import org.eclipse.jubula.communication.ICommand;
@@ -591,9 +590,8 @@ public class ClientTest implements IClientTest {
addTestExecutionEventListener(executionListener);
AutIdentifier autId = new AutIdentifier(refTestSuite
.getTestSuiteAutID());
- String testSuiteGuid = refTestSuite.getTestSuiteGuid();
- ITestSuitePO testSuite = NodePM.getTestSuite(testSuiteGuid);
- startTestSuite(testSuite, locale, autId, autoScreenshot, null);
+ startTestSuite(refTestSuite.getTestSuite(), locale, autId,
+ autoScreenshot, null);
while (!isTestExecutionFinished.get()) {
TimeUtil.delay(500);
}
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IRefTestSuitePO.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IRefTestSuitePO.java
index 08ea6b6ff..485bedda0 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IRefTestSuitePO.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IRefTestSuitePO.java
@@ -15,21 +15,38 @@ package org.eclipse.jubula.client.core.model;
* @created Mar 16, 2010
*/
public interface IRefTestSuitePO extends INodePO {
- /** access to Persistence (JPA / EclipseLink) property
+ /**
+ * access to Persistence (JPA / EclipseLink) property
+ *
* @return the property
* */
public String getTestSuiteGuid();
- /** access to Persistence (JPA / EclipseLink) property
- * @param testSuiteGuid GUID if the referenced TS */
+ /**
+ * access to Persistence (JPA / EclipseLink) property
+ *
+ * @param testSuiteGuid
+ * GUID if the referenced TS
+ */
public void setTestSuiteGuid(String testSuiteGuid);
- /** access to Persistence (JPA / EclipseLink) property
- * @return the property
- */
+ /**
+ * access to Persistence (JPA / EclipseLink) property
+ *
+ * @return the property
+ */
public String getTestSuiteAutID();
- /** access to Persistence (JPA / EclipseLink) property
- * @param testSuiteAutID ID of the used AUT */
+ /**
+ * access to Persistence (JPA / EclipseLink) property
+ *
+ * @param testSuiteAutID
+ * ID of the used AUT
+ */
public void setTestSuiteAutID(String testSuiteAutID);
+
+ /**
+ * @return the referenced test suite
+ */
+ public ITestSuitePO getTestSuite();
}
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/RefTestSuitePO.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/RefTestSuitePO.java
index 8ba696f45..f77f424b8 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/RefTestSuitePO.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/RefTestSuitePO.java
@@ -16,6 +16,8 @@ import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Transient;
+import org.eclipse.jubula.client.core.persistence.NodePM;
+
/**
* class only for specification data of testcase specificaton data are infos to
* CapPO tripel like name of CapPO, name of component, action name and the fixed
@@ -29,7 +31,6 @@ import javax.persistence.Transient;
@Entity
@DiscriminatorValue(value = "R")
class RefTestSuitePO extends NodePO implements IRefTestSuitePO {
-
/** Persistence (JPA / EclipseLink) property */
private String m_testSuiteGuid;
/** Persistence (JPA / EclipseLink) property */
@@ -141,4 +142,9 @@ class RefTestSuitePO extends NodePO implements IRefTestSuitePO {
m_testSuiteAutID = testSuiteAutID;
}
+ /** {@inheritDoc} */
+ @Transient
+ public ITestSuitePO getTestSuite() {
+ return NodePM.getTestSuite(getTestSuiteGuid());
+ }
}
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/NodePM.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/NodePM.java
index e02dd0914..870af3eed 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/NodePM.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/NodePM.java
@@ -1041,9 +1041,10 @@ public class NodePM extends PersistenceManager {
public static synchronized ITestSuitePO getTestSuite(
String testSuiteGuid) {
- IProjectPO currentProject = GeneralStorage.getInstance().getProject();
+ GeneralStorage gs = GeneralStorage.getInstance();
+ IProjectPO currentProject = gs.getProject();
if (currentProject != null) {
- EntityManager s = GeneralStorage.getInstance().getMasterSession();
+ EntityManager s = gs.getMasterSession();
CriteriaBuilder builder = s.getCriteriaBuilder();
CriteriaQuery query = builder.createQuery();
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/AbstractNodePropertySource.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/AbstractNodePropertySource.java
index 0b64152fe..f566e3d88 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/AbstractNodePropertySource.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/AbstractNodePropertySource.java
@@ -27,6 +27,7 @@ import org.eclipse.jubula.client.core.model.ICapPO;
import org.eclipse.jubula.client.core.model.INodePO;
import org.eclipse.jubula.client.core.model.IParamDescriptionPO;
import org.eclipse.jubula.client.core.model.IParamNodePO;
+import org.eclipse.jubula.client.core.model.IRefTestSuitePO;
import org.eclipse.jubula.client.core.persistence.Persistor;
import org.eclipse.jubula.client.core.utils.GuiParamValueConverter;
import org.eclipse.jubula.client.core.utils.IParamValueValidator;
@@ -170,17 +171,27 @@ public abstract class AbstractNodePropertySource
}
/**
- * Class to control the taskId of the depending SpecTestCasePO.
+ * Class to control the referenced taskId
+ *
* @author BREDEX GmbH
* @created 20.08.2013
*/
- protected class ReadOnlySpecTaskIdController
- extends TaskIdController {
+ protected class ReadOnlyTaskIdController extends TaskIdController {
/** {@inheritDoc} */
public boolean setProperty(Object value) {
return true; // do nothing, read only
}
-
+
+ @Override
+ public Object getProperty() {
+ INodePO node = getPoNode();
+ if (node instanceof IRefTestSuitePO) {
+ IRefTestSuitePO refTS = (IRefTestSuitePO) node;
+ return refTS.getTestSuite().getTaskId();
+ }
+ return super.getProperty();
+ }
+
/** {@inheritDoc} */
public Image getImage() {
return READONLY_IMAGE;
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/EventExecTestCaseGUIPropertySource.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/EventExecTestCaseGUIPropertySource.java
index fda145b68..1c2500a5d 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/EventExecTestCaseGUIPropertySource.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/EventExecTestCaseGUIPropertySource.java
@@ -196,7 +196,7 @@ public class EventExecTestCaseGUIPropertySource extends
private void createTaskIdPropertyDescriptor() {
if (getTaskIdPropDesc() == null) {
JBPropertyDescriptor taskIdPropDesc = new JBPropertyDescriptor(
- new ReadOnlySpecTaskIdController(),
+ new ReadOnlyTaskIdController(),
Messages.AbstractGuiNodePropertySourceTaskId);
taskIdPropDesc.setLabelProvider(new DisabledLabelProvider());
setTaskIdPropDesc(taskIdPropDesc);
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/ExecTestCaseGUIPropertySource.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/ExecTestCaseGUIPropertySource.java
index 1e1c2e471..5b8c34682 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/ExecTestCaseGUIPropertySource.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/ExecTestCaseGUIPropertySource.java
@@ -132,7 +132,7 @@ public class ExecTestCaseGUIPropertySource extends
// Task ID
if (getTaskIdPropDesc() == null) {
JBPropertyDescriptor taskIdPropDesc = new JBPropertyDescriptor(
- new ReadOnlySpecTaskIdController(),
+ new ReadOnlyTaskIdController(),
Messages.AbstractGuiNodePropertySourceTaskId);
taskIdPropDesc.setLabelProvider(new DisabledLabelProvider());
setTaskIdPropDesc(taskIdPropDesc);
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/RefTestSuiteGUIPropertySource.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/RefTestSuiteGUIPropertySource.java
index a9590d02c..c7d97ed07 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/RefTestSuiteGUIPropertySource.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/propertysources/RefTestSuiteGUIPropertySource.java
@@ -22,8 +22,9 @@ import org.eclipse.jubula.client.core.model.IAUTConfigPO;
import org.eclipse.jubula.client.core.model.IAUTMainPO;
import org.eclipse.jubula.client.core.model.IRefTestSuitePO;
import org.eclipse.jubula.client.core.model.ITestSuitePO;
-import org.eclipse.jubula.client.core.persistence.NodePM;
+import org.eclipse.jubula.client.ui.rcp.controllers.propertydescriptors.JBPropertyDescriptor;
import org.eclipse.jubula.client.ui.rcp.i18n.Messages;
+import org.eclipse.jubula.client.ui.rcp.provider.labelprovider.DisabledLabelProvider;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.Assert;
@@ -73,7 +74,7 @@ public class RefTestSuiteGUIPropertySource
*/
private void fillAutIdList(IRefTestSuitePO refTestSuite) {
Set<String> idSet = new HashSet<String>();
- ITestSuitePO ts = NodePM.getTestSuite(refTestSuite.getTestSuiteGuid());
+ ITestSuitePO ts = refTestSuite.getTestSuite();
IAUTMainPO aut = ts.getAut();
if (aut != null) {
idSet.addAll(aut.getAutIds());
@@ -101,6 +102,17 @@ public class RefTestSuiteGUIPropertySource
}
addPropertyDescriptor(m_namePropDesc);
super.initPropDescriptor();
+
+ // Task ID
+ if (getTaskIdPropDesc() == null) {
+ JBPropertyDescriptor taskIdPropDesc = new JBPropertyDescriptor(
+ new ReadOnlyTaskIdController(),
+ Messages.AbstractGuiNodePropertySourceTaskId);
+ taskIdPropDesc.setLabelProvider(new DisabledLabelProvider());
+ setTaskIdPropDesc(taskIdPropDesc);
+ }
+ addPropertyDescriptor(getTaskIdPropDesc());
+
// AUT id list
addPropertyDescriptor(getAutIdPropDesc());
}
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ShowSpecificationHandlerRefTS.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ShowSpecificationHandlerRefTS.java
index 9a0acc902..45ae5b622 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ShowSpecificationHandlerRefTS.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ShowSpecificationHandlerRefTS.java
@@ -14,7 +14,6 @@ import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jubula.client.core.model.IRefTestSuitePO;
import org.eclipse.jubula.client.core.model.ITestSuitePO;
-import org.eclipse.jubula.client.core.persistence.NodePM;
import org.eclipse.jubula.client.ui.constants.Constants;
import org.eclipse.jubula.client.ui.rcp.Plugin;
import org.eclipse.jubula.client.ui.rcp.businessprocess.UINodeBP;
@@ -37,8 +36,7 @@ public class ShowSpecificationHandlerRefTS extends
Object firstElement = iss.getFirstElement();
if (firstElement instanceof IRefTestSuitePO) {
IRefTestSuitePO refTS = (IRefTestSuitePO)firstElement;
- String tsGUID = refTS.getTestSuiteGuid();
- ITestSuitePO testSuite = NodePM.getTestSuite(tsGUID);
+ ITestSuitePO testSuite = refTS.getTestSuite();
IViewPart activatedView =
Plugin.showView(Constants.TS_BROWSER_ID);
if (activatedView instanceof TestSuiteBrowser) {
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenSpecificationHandlerRefTS.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenSpecificationHandlerRefTS.java
index c30b2ff3c..759f516d0 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenSpecificationHandlerRefTS.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenSpecificationHandlerRefTS.java
@@ -17,7 +17,6 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jubula.client.core.events.InteractionEventDispatcher;
import org.eclipse.jubula.client.core.model.IRefTestSuitePO;
import org.eclipse.jubula.client.core.model.ITestSuitePO;
-import org.eclipse.jubula.client.core.persistence.NodePM;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -34,8 +33,7 @@ public class OpenSpecificationHandlerRefTS extends AbstractOpenHandler {
Object firstElement = iss.getFirstElement();
if (firstElement instanceof IRefTestSuitePO) {
IRefTestSuitePO refTS = (IRefTestSuitePO)firstElement;
- String tsGUID = refTS.getTestSuiteGuid();
- ITestSuitePO testSuite = NodePM.getTestSuite(tsGUID);
+ ITestSuitePO testSuite = refTS.getTestSuite();
openEditor(testSuite);
InteractionEventDispatcher.getDefault().
fireProgammableSelectionEvent(
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/propertytester/NodePropertyTester.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/propertytester/NodePropertyTester.java
index 7c1b3c14a..ab289b5e3 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/propertytester/NodePropertyTester.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/propertytester/NodePropertyTester.java
@@ -15,6 +15,7 @@ import org.eclipse.jubula.client.core.businessprocess.db.NodeBP;
import org.eclipse.jubula.client.core.model.INodePO;
import org.eclipse.jubula.client.core.model.IObjectMappingCategoryPO;
import org.eclipse.jubula.client.core.model.IPersistentObject;
+import org.eclipse.jubula.client.core.model.IRefTestSuitePO;
import org.eclipse.jubula.client.ui.propertytester.AbstractBooleanPropertyTester;
@@ -58,12 +59,19 @@ public class NodePropertyTester extends AbstractBooleanPropertyTester {
}
/**
- * @param node The node for which to check the task id.
+ * @param po
+ * The node for which to check the task id.
* @return whether a task id is set or not
*/
- private boolean hasTaskIdSet(IPersistentObject node) {
- if (node instanceof INodePO) {
- return StringUtils.isNotEmpty(((INodePO)node).getTaskId());
+ private boolean hasTaskIdSet(IPersistentObject po) {
+ if (po instanceof INodePO) {
+ INodePO node = (INodePO) po;
+ String taskId = node.getTaskId();
+ if (node instanceof IRefTestSuitePO) {
+ IRefTestSuitePO refTS = (IRefTestSuitePO) node;
+ taskId = refTS.getTestSuite().getTaskId();
+ }
+ return StringUtils.isNotEmpty(taskId);
}
return false;
}

Back to the top