Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hein2016-11-23 05:19:31 -0500
committerMarcel Hein2016-11-23 05:19:31 -0500
commitebff862b3fff3b1264005a606f11c4679fa3d715 (patch)
tree96d776e280aec2d72b9ddf40c4bf5e8034189f1a
parent5219b6a4ea49663712d7f48bc0e99bc6ed1a24f5 (diff)
parente4014d0474cd290dec07a91c66c1e36f2710667b (diff)
downloadorg.eclipse.jubula.core-neon.tar.gz
org.eclipse.jubula.core-neon.tar.xz
org.eclipse.jubula.core-neon.zip
Merge branch '8.3' into neonneon
-rw-r--r--org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonExporter.java29
-rw-r--r--org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonImporter.java86
-rw-r--r--org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonStorage.java1
-rw-r--r--org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/CommentDTO.java36
-rw-r--r--org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/NodeDTO.java1
-rw-r--r--org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestCaseDTO.java3
-rw-r--r--org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestJobDTO.java13
-rw-r--r--org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestSuiteDTO.java12
-rw-r--r--org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestresultSummaryDTO.java1
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestCaseParamBP.java39
-rw-r--r--org.eclipse.jubula.client.ua.cheatsheets/resources/Adder/compositeCheatSheet001.xml25
-rw-r--r--org.eclipse.jubula.client.ua.cheatsheets/resources/shared/configureAUT.xml42
-rw-r--r--org.eclipse.jubula.client.ua.cheatsheets/resources/shared/createProject.xml25
-rw-r--r--org.eclipse.jubula.client.ua.cheatsheets/resources/shared/defineAUT.xml28
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/filter/DataSetFilter.java2
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/views/dataset/AbstractDataSetPage.java65
-rw-r--r--org.eclipse.jubula.extensions.wizard/src/org/eclipse/jubula/extensions/wizard/model/ValueSet.java9
-rw-r--r--org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/tester/AbstractTreeTester.java19
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java31
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java101
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/TreeTableViewTester.java25
-rw-r--r--org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java7
-rw-r--r--org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/exception/ConfigXmlException.java25
-rw-r--r--org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/utils/ZipUtil.java3
-rw-r--r--org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/xml/businessmodell/CompSystem.java12
25 files changed, 384 insertions, 256 deletions
diff --git a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonExporter.java b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonExporter.java
index 89fc48ee0..ca847ff1c 100644
--- a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonExporter.java
+++ b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonExporter.java
@@ -28,8 +28,9 @@ import org.eclipse.jubula.client.archive.dto.AutDTO;
import org.eclipse.jubula.client.archive.dto.CapDTO;
import org.eclipse.jubula.client.archive.dto.CategoryDTO;
import org.eclipse.jubula.client.archive.dto.CheckConfigurationDTO;
-import org.eclipse.jubula.client.archive.dto.ComponentNamesPairDTO;
+import org.eclipse.jubula.client.archive.dto.CommentDTO;
import org.eclipse.jubula.client.archive.dto.ComponentNameDTO;
+import org.eclipse.jubula.client.archive.dto.ComponentNamesPairDTO;
import org.eclipse.jubula.client.archive.dto.DataRowDTO;
import org.eclipse.jubula.client.archive.dto.DefaultEventHandlerDTO;
import org.eclipse.jubula.client.archive.dto.EventTestCaseDTO;
@@ -68,6 +69,7 @@ import org.eclipse.jubula.client.core.model.ICapParamDescriptionPO;
import org.eclipse.jubula.client.core.model.ICategoryPO;
import org.eclipse.jubula.client.core.model.ICheckConfContPO;
import org.eclipse.jubula.client.core.model.ICheckConfPO;
+import org.eclipse.jubula.client.core.model.ICommentPO;
import org.eclipse.jubula.client.core.model.ICompIdentifierPO;
import org.eclipse.jubula.client.core.model.ICompNamesPairPO;
import org.eclipse.jubula.client.core.model.IComponentNamePO;
@@ -104,7 +106,6 @@ import org.eclipse.jubula.tools.internal.constants.StringConstants;
import org.eclipse.jubula.tools.internal.exception.ProjectDeletedException;
import org.eclipse.jubula.tools.internal.messagehandling.MessageIDs;
import org.eclipse.jubula.tools.internal.objects.IMonitoringValue;
-import org.eclipse.jubula.tools.internal.objects.MonitoringValue;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -619,6 +620,10 @@ public class JsonExporter {
RefTestCaseDTO refTestCaseDTO = new RefTestCaseDTO(tcPO);
fillRefTestCase(refTestCaseDTO, tcPO);
tcDTO.addTestStep(refTestCaseDTO);
+ } else if (o instanceof ICommentPO) {
+ ICommentPO commentPO = (ICommentPO) o;
+ CommentDTO commentDTO = new CommentDTO(commentPO);
+ tcDTO.addTestStep(commentDTO);
}
}
@@ -821,8 +826,13 @@ public class JsonExporter {
IExecTestCasePO tc = (IExecTestCasePO)o;
RefTestCaseDTO rtcDTO = new RefTestCaseDTO(tc);
fillRefTestCase(rtcDTO, tc);
- tsDTO.addUsedTestcase(rtcDTO);
+ tsDTO.addUsedTestCase(rtcDTO);
+ } else if (o instanceof ICommentPO) {
+ ICommentPO commentPO = (ICommentPO) o;
+ CommentDTO commentDTO = new CommentDTO(commentPO);
+ tsDTO.addUsedTestCase(commentDTO);
}
+
}
for (Object o : po.getDefaultEventHandler().keySet()) {
String eventType = (String)o;
@@ -849,7 +859,7 @@ public class JsonExporter {
* @param tj test job object
*/
private void fillTestJob(TestJobDTO tjDTO, ITestJobPO tj) {
- for (Object child : tj.getUnmodifiableNodeList()) {
+ for (INodePO child : tj.getUnmodifiableNodeList()) {
if (child instanceof IRefTestSuitePO) {
IRefTestSuitePO rts = (IRefTestSuitePO)child;
RefTestSuiteDTO rtsDTO = new RefTestSuiteDTO(rts);
@@ -858,6 +868,8 @@ public class JsonExporter {
rtsDTO.setTsUuid(rts.getTestSuiteGuid());
rtsDTO.setAutId(rts.getTestSuiteAutID());
tjDTO.addRefTestSuite(rtsDTO);
+ } else if (child instanceof ICommentPO) {
+ tjDTO.addComment(new CommentDTO((ICommentPO) child));
}
}
}
@@ -917,12 +929,13 @@ public class JsonExporter {
}
Map<String, IMonitoringValue>
tmpMap = poSummary.getMonitoringValues();
- Iterator it = tmpMap.entrySet().iterator();
+ Iterator<Map.Entry<String, IMonitoringValue>> it =
+ tmpMap.entrySet().iterator();
while (it.hasNext()) {
- Map.Entry pairs = (Map.Entry) it.next();
- MonitoringValue tmp = (MonitoringValue)pairs.getValue();
+ Map.Entry<String, IMonitoringValue> pairs = it.next();
+ IMonitoringValue tmp = pairs.getValue();
MonitoringValuesDTO monValDTO = new MonitoringValuesDTO();
- monValDTO.setKey((String)pairs.getKey());
+ monValDTO.setKey(pairs.getKey());
monValDTO.setCategory(tmp.getCategory());
monValDTO.setSignificant(tmp.isSignificant());
monValDTO.setType(tmp.getType());
diff --git a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonImporter.java b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonImporter.java
index a3432bc83..51ed1b37a 100644
--- a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonImporter.java
+++ b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonImporter.java
@@ -32,6 +32,7 @@ import org.eclipse.jubula.client.archive.dto.CategoryDTO;
import org.eclipse.jubula.client.archive.dto.CheckActivatedContextDTO;
import org.eclipse.jubula.client.archive.dto.CheckAttributeDTO;
import org.eclipse.jubula.client.archive.dto.CheckConfigurationDTO;
+import org.eclipse.jubula.client.archive.dto.CommentDTO;
import org.eclipse.jubula.client.archive.dto.ComponentNameDTO;
import org.eclipse.jubula.client.archive.dto.ComponentNamesPairDTO;
import org.eclipse.jubula.client.archive.dto.DataRowDTO;
@@ -77,6 +78,7 @@ import org.eclipse.jubula.client.core.model.ICapPO;
import org.eclipse.jubula.client.core.model.ICategoryPO;
import org.eclipse.jubula.client.core.model.ICheckConfContPO;
import org.eclipse.jubula.client.core.model.ICheckConfPO;
+import org.eclipse.jubula.client.core.model.ICommentPO;
import org.eclipse.jubula.client.core.model.ICompNamesPairPO;
import org.eclipse.jubula.client.core.model.IComponentNamePO;
import org.eclipse.jubula.client.core.model.IEventExecTestCasePO;
@@ -393,6 +395,9 @@ public class JsonImporter {
} else if (stepDto instanceof RefTestCaseDTO) {
tc.addNode(createExecTestCase(
proj, (RefTestCaseDTO)stepDto, assignNewGuid));
+ } else if (stepDto instanceof CommentDTO) {
+ tc.addNode(createComment((CommentDTO) stepDto,
+ assignNewGuid));
}
}
for (EventTestCaseDTO evTcDto : dto.getEventTestcases()) {
@@ -461,6 +466,20 @@ public class JsonImporter {
}
/**
+ *
+ * @param dto the DTO to
+ * @param assignNewUuid if there should be a new Uuid
+ * @return a {@link ICommentPO}
+ */
+ private ICommentPO createComment(CommentDTO dto,
+ boolean assignNewUuid) {
+ if (dto.getUuid() != null && !assignNewUuid) {
+ return NodeMaker.createCommentPO(dto.getName(), dto.getUuid());
+ }
+ return NodeMaker.createCommentPO(dto.getName());
+ }
+
+ /**
* @param componentType component type name
* @return true if the component has a default mapping and therefore has no
* component name
@@ -1202,7 +1221,7 @@ public class JsonImporter {
*/
private IExecPersistable createTestJob(TestJobDTO dto,
boolean assignNewGuid) throws InvalidDataException {
-
+
ITestJobPO tj;
if (dto.getUuid() != null && !assignNewGuid) {
tj = NodeMaker.createTestJobPO(dto.getName(), dto.getUuid());
@@ -1213,31 +1232,40 @@ public class JsonImporter {
tj.setDescription(dto.getDescription());
tj.setTaskId(dto.getTaskId());
fillTrackedChangesInformation(tj, dto);
-
- for (RefTestSuiteDTO dtoRts : dto.getRefTestSuites()) {
- IRefTestSuitePO rts;
- if (assignNewGuid) {
- // Only Test Suites from the same project can be referenced,
- // and all Test Suites for this Project have already been
- // initialized (so they have already been entered into the
- // old to new GUID map). This is why we can simply directly use
- // the old to new GUID map.
- String testSuiteGuid = m_oldToNewGuids.get(dtoRts.getTsUuid());
- if (testSuiteGuid == null) {
- throw new InvalidDataException(
- "Test Suite Reference: No new GUID found for Test Suite with old GUID: " + dtoRts.getTsUuid(), //$NON-NLS-1$
- MessageIDs.E_IMPORT_PROJECT_XML_FAILED);
- }
- rts = NodeMaker.createRefTestSuitePO(dtoRts.getName(),
- testSuiteGuid, dtoRts.getAutId());
- } else {
- rts = NodeMaker.createRefTestSuitePO(dtoRts.getName(), dtoRts
- .getUuid(), dtoRts.getTsUuid(), dtoRts.getAutId());
+ for (NodeDTO dtoRefs : dto.getRefTestSuites()) {
+ if (dtoRefs instanceof RefTestSuiteDTO) {
+ RefTestSuiteDTO dtoRts = (RefTestSuiteDTO) dtoRefs;
+ IRefTestSuitePO rts;
+ if (assignNewGuid) {
+ // Only Test Suites from the same project can be referenced,
+ // and all Test Suites for this Project have already been
+ // initialized (so they have already been entered into the
+ // old to new GUID map). This is why we can simply directly
+ // use
+ // the old to new GUID map.
+ String testSuiteGuid =
+ m_oldToNewGuids.get(dtoRts.getTsUuid());
+ if (testSuiteGuid == null) {
+ throw new InvalidDataException(
+ "Test Suite Reference: No new GUID found for Test Suite with old GUID: " //$NON-NLS-1$
+ + dtoRts.getTsUuid(),
+ MessageIDs.E_IMPORT_PROJECT_XML_FAILED);
+ }
+ rts = NodeMaker.createRefTestSuitePO(dtoRts.getName(),
+ testSuiteGuid, dtoRts.getAutId());
+ } else {
+ rts = NodeMaker.createRefTestSuitePO(dtoRts.getName(),
+ dtoRts.getUuid(), dtoRts.getTsUuid(),
+ dtoRts.getAutId());
+
+ }
+ rts.setComment(dtoRts.getComment());
+ rts.setDescription(dtoRts.getDescription());
+ tj.addNode(rts);
+ } else if (dtoRefs instanceof CommentDTO) {
+ tj.addNode(createComment((CommentDTO) dtoRefs, assignNewGuid));
}
- rts.setComment(dtoRts.getComment());
- rts.setDescription(dtoRts.getDescription());
- tj.addNode(rts);
}
return tj;
}
@@ -1317,8 +1345,14 @@ public class JsonImporter {
if (dto.getSelectedAut() != null) {
ts.setAut(m_autRef.get(dto.getSelectedAut()));
}
- for (RefTestCaseDTO ref : dto.getUsedTestcases()) {
- ts.addNode(createExecTestCase(proj, ref, assignNewGuid));
+ for (NodeDTO ref : dto.getUsedTestCases()) {
+ if (ref instanceof RefTestCaseDTO) {
+ ts.addNode(createExecTestCase(proj, (RefTestCaseDTO) ref,
+ assignNewGuid));
+ }
+ if (ref instanceof CommentDTO) {
+ ts.addNode(createComment((CommentDTO) ref, assignNewGuid));
+ }
}
Map<String, Integer> defaultEventHandler =
diff --git a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonStorage.java b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonStorage.java
index e294258aa..71516ec02 100644
--- a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonStorage.java
+++ b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/JsonStorage.java
@@ -318,6 +318,7 @@ public class JsonStorage {
importer.initTestResultSummaries(subMonitor.newChild(1),
summaryDTOs, projectPO);
} catch (IOException e) {
+ log.warn("error during import", e); //$NON-NLS-1$
// If the operation has been canceled, then this is just
// a result of canceling the IO.
if (!monitor.isCanceled()) {
diff --git a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/CommentDTO.java b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/CommentDTO.java
new file mode 100644
index 000000000..df236a044
--- /dev/null
+++ b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/CommentDTO.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2016 BREDEX GmbH.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+/**
+ *
+ */
+package org.eclipse.jubula.client.archive.dto;
+
+import org.eclipse.jubula.client.core.model.ICommentPO;
+
+/**
+ * @author BREDEX GmbH
+ *
+ */
+public class CommentDTO extends NodeDTO {
+
+ /** needed because JSON mapping */
+ public CommentDTO() {
+
+ }
+ /**
+ *
+ * @param node the po to make to a DTO
+ */
+ public CommentDTO(ICommentPO node) {
+ super(node);
+ }
+
+}
diff --git a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/NodeDTO.java b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/NodeDTO.java
index a4421e420..13482e11a 100644
--- a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/NodeDTO.java
+++ b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/NodeDTO.java
@@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
property = "type")
@JsonSubTypes({
@Type(value = CategoryDTO.class, name = "cat"),
+ @Type(value = CommentDTO.class, name = "com"),
@Type(value = ExecCategoryDTO.class, name = "ecat"),
@Type(value = ParameterDTO.class, name = "par"),
@Type(value = ProjectDTO.class, name = "pro"),
diff --git a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestCaseDTO.java b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestCaseDTO.java
index 98ba69733..c006358a5 100644
--- a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestCaseDTO.java
+++ b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestCaseDTO.java
@@ -54,7 +54,8 @@ public class TestCaseDTO extends ParameterDTO {
*/
public void addTestStep(NodeDTO testStep) {
if (!(testStep instanceof RefTestCaseDTO
- || testStep instanceof CapDTO)) {
+ || testStep instanceof CapDTO
+ || testStep instanceof CommentDTO)) {
throw new IllegalArgumentException();
}
this.m_testSteps.add(testStep);
diff --git a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestJobDTO.java b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestJobDTO.java
index abcdf0ca1..afc7b69e8 100644
--- a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestJobDTO.java
+++ b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestJobDTO.java
@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
public class TestJobDTO extends NodeDTO {
/** */
- private List<RefTestSuiteDTO> m_refTestSuites =
- new ArrayList<RefTestSuiteDTO>();
+ private List<NodeDTO> m_refTestSuites =
+ new ArrayList<NodeDTO>();
/** needed because JSON mapping */
@@ -42,12 +42,19 @@ public class TestJobDTO extends NodeDTO {
public void addRefTestSuite(RefTestSuiteDTO rtsDTO) {
m_refTestSuites.add(rtsDTO);
}
+
+ /**
+ * @param commentDTO
+ */
+ public void addComment(CommentDTO commentDTO) {
+ m_refTestSuites.add(commentDTO);
+ }
/**
* @return refTestSuites
*/
@JsonProperty("refTestSuites")
- public List<RefTestSuiteDTO> getRefTestSuites() {
+ public List<NodeDTO> getRefTestSuites() {
return m_refTestSuites;
}
}
diff --git a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestSuiteDTO.java b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestSuiteDTO.java
index b6876ab07..3dd75ba84 100644
--- a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestSuiteDTO.java
+++ b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestSuiteDTO.java
@@ -27,8 +27,8 @@ public class TestSuiteDTO extends NodeDTO {
/** */
private int m_stepDelay = 0;
/** */
- private List<RefTestCaseDTO> m_usedTestcases =
- new ArrayList<RefTestCaseDTO>();
+ private List<NodeDTO> m_usedTestcases =
+ new ArrayList<NodeDTO>();
/** */
private List<DefaultEventHandlerDTO> m_eventHandlers =
new ArrayList<DefaultEventHandlerDTO>(4);
@@ -80,14 +80,18 @@ public class TestSuiteDTO extends NodeDTO {
* @return usedTestcase
*/
@JsonProperty("usedTestcase")
- public List<RefTestCaseDTO> getUsedTestcases() {
+ public List<NodeDTO> getUsedTestCases() {
return m_usedTestcases;
}
/**
* @param usedTestcase
*/
- public void addUsedTestcase(RefTestCaseDTO usedTestcase) {
+ public void addUsedTestCase(NodeDTO usedTestcase) {
+ if (!(usedTestcase instanceof RefTestCaseDTO
+ || usedTestcase instanceof CommentDTO)) {
+ throw new IllegalArgumentException();
+ }
this.m_usedTestcases.add(usedTestcase);
}
diff --git a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestresultSummaryDTO.java b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestresultSummaryDTO.java
index 18082da02..b14cd4879 100644
--- a/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestresultSummaryDTO.java
+++ b/org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/dto/TestresultSummaryDTO.java
@@ -175,6 +175,7 @@ public class TestresultSummaryDTO {
m_projectMajorVersion = trs.getProjectMajorVersion();
m_projectMinorVersion = trs.getProjectMinorVersion();
m_projectMicroVersion = trs.getProjectMicroVersion();
+ m_projectVersionQualifier = trs.getProjectVersionQualifier();
m_projectName = trs.getProjectName();
m_blobWritten = trs.isReportWritten();
m_testsuiteDate = trs.getTestsuiteDate();
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestCaseParamBP.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestCaseParamBP.java
index d12307071..1deccf65c 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestCaseParamBP.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestCaseParamBP.java
@@ -223,25 +223,28 @@ public class TestCaseParamBP extends AbstractParamInterfaceBP<ISpecTestCasePO> {
* remove.
*/
private void removeReferences(IParamDescriptionPO desc,
- Iterator childrenIt) {
+ Iterator<? extends INodePO> childrenIt) {
while (childrenIt.hasNext()) {
- final IParamNodePO child = (IParamNodePO)childrenIt.next();
- final ITDManager mgr = child.getDataManager();
- final Iterator<TDCell> refIt =
- child.getParamReferencesIterator();
- while (refIt.hasNext()) {
- final TDCell cell = refIt.next();
- final String guid = mgr.getUniqueIds().get(cell.getCol());
- final IParamDescriptionPO childDesc =
- child.getParameterForUniqueId(guid);
- final ModelParamValueConverter conv =
- new ModelParamValueConverter(cell.getTestData(), child,
- childDesc);
- if (conv.containsReferences()) {
- final boolean isModified = conv.removeReference(
- desc.getUniqueId());
- if (isModified) {
- cell.setTestData(conv.getModelString());
+ INodePO node = childrenIt.next();
+ if (node instanceof IParamNodePO) {
+ final IParamNodePO child = (IParamNodePO)node;
+ final ITDManager mgr = child.getDataManager();
+ final Iterator<TDCell> refIt =
+ child.getParamReferencesIterator();
+ while (refIt.hasNext()) {
+ final TDCell cell = refIt.next();
+ final String guid = mgr.getUniqueIds().get(cell.getCol());
+ final IParamDescriptionPO childDesc =
+ child.getParameterForUniqueId(guid);
+ final ModelParamValueConverter conv =
+ new ModelParamValueConverter(cell.getTestData(), child,
+ childDesc);
+ if (conv.containsReferences()) {
+ final boolean isModified = conv.removeReference(
+ desc.getUniqueId());
+ if (isModified) {
+ cell.setTestData(conv.getModelString());
+ }
}
}
}
diff --git a/org.eclipse.jubula.client.ua.cheatsheets/resources/Adder/compositeCheatSheet001.xml b/org.eclipse.jubula.client.ua.cheatsheets/resources/Adder/compositeCheatSheet001.xml
index 77ab201aa..18c7fabe4 100644
--- a/org.eclipse.jubula.client.ua.cheatsheets/resources/Adder/compositeCheatSheet001.xml
+++ b/org.eclipse.jubula.client.ua.cheatsheets/resources/Adder/compositeCheatSheet001.xml
@@ -43,31 +43,6 @@ Make sure that the Integrated Test Environment (ITE) is maximized to complete t
<param name="path" value="../shared/createProject.xml">
</param>
</task>
- <task kind="cheatsheet" name="Define an AUT" skip="false">
- <intro>
- Each Project can have one or more AUT&apos;s.
- </intro>
- <param name="path" value="../shared/defineAUT.xml">
- </param>
- </task>
- <task kind="cheatsheet" name="Configure the AUT" skip="false">
- <intro>
- Each AUT can have one or more configurations.
-<br/><br/>
-A configuration contains details about how to start the AUT.
-<br/><br/>
-For example, you need to define where to start your AUT (on what computer) and with what arguments.
-<br/><br/>
-Some AUT&apos;s will need different configurations so that they can be tested on different platforms.
- </intro>
- <onCompletion>
- It may be necessary to change or add other information in the AUT configuration dialog when you configure your own AUT - especially if you are working with the AUT on another machine. <br/><br/>
-There is more information on configuring AUT&apos;s in the handbook, in the <b>Tasks</b> chapter. <br/><br/>
-You can also see context-sensitive help by pressing <b>F1</b> in the AUT configuration dialog.
- </onCompletion>
- <param name="path" value="../shared/configureAUT.xml">
- </param>
- </task>
</taskGroup>
<taskGroup kind="set" name="Creating the test specification" skip="false">
<intro>
diff --git a/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/configureAUT.xml b/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/configureAUT.xml
deleted file mode 100644
index 15a5437cc..000000000
--- a/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/configureAUT.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><!--
- Copyright (c) 2004, 2010 BREDEX GmbH.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
- -->
-
-<cheatsheet title="Configure the AUT">
- <intro>
- <description>
- The next steps show you how to configure your AUT.
-<br/>
-It is assumed that you are working locally on your machine. If not, change the AUT Agent details accordingly.
- </description>
- </intro>
- <item title="Configuring the AUT" dialog="true" skip="false">
- <description>
- Select:<br/>
-<b>Test &gt; Properties</b>
-<br/>
-Select <b>AUT&apos;s</b> from the list on the left, select the <b>Adder</b> AUT from the main panel and click <b>Edit</b>.
-<br/>
-Click <b>Add</b> to add a configuration.
-<br/>
-Enter <b>SimpleAdder_1</b> as the AUT ID.
-<br/>
-Enter or browse to the executable file.
-<br/><br/>
-To use the Swing Simple Adder on Windows, use:
-<br/><br/>
-<b>InstallationDirectory\examples\AUTs\SimpleAdder\swing\SimpleAdder.cmd</b>
-<br/><br/>
-To use the JavaFX Simple Adder on Windows, use:
-<br/><br/>
-<b>InstallationDirectory\examples\AUTs\SimpleAdder\javafx\SimpleAdder.cmd</b>
-<br/><br/>
-To start the Swing Simple Adder on Unix, select <b>SimpleAdder.sh</b>. To be able to start the JavaFX Simple Adder on Unix, consult the Samples chapter of the documentation for information on adapting the AUT configuration.
-<br/><br/>
-Click <b>OK</b>, then <b>OK</b> in the other dialogs. </description>
- </item>
-</cheatsheet>
diff --git a/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/createProject.xml b/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/createProject.xml
index fa22164da..33409fc6b 100644
--- a/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/createProject.xml
+++ b/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/createProject.xml
@@ -9,12 +9,12 @@
<cheatsheet title="Create a Project">
<intro>
<description>
- This cheat sheet shows you how to create a Project.
+ This cheat sheet shows you how to create a Project with an AUT.
</description>
</intro>
- <item title="Creating a Project" dialog="true" skip="false">
+ <item title="Creating a Project with an AUT" dialog="true" skip="false">
<description>
- Select:
+ Select:
<br/>
<b>Test &gt; New</b>
<br/>
@@ -22,7 +22,24 @@ If you are not using the embedded database, you will need to log in.
<br/>
Enter <b>SimpleAdder</b> as the Project Name.
<br/>
- Click <b>Finish</b>.
+Choose <b>Swing</b> or <b>JavaFX</b> as the AUT toolkit, depending on which AUT you want to start (they are both functionally the same).
+<br/>
+<br/>
+Enter or browse to the executable file:
+<br/><br/>
+To use the Swing Simple Adder on Windows, use:
+<br/><br/>
+<b>InstallationDirectory\examples\AUTs\SimpleAdder\swing\SimpleAdder.cmd</b>
+<br/><br/>
+To use the JavaFX Simple Adder on Windows, use:
+<br/><br/>
+<b>InstallationDirectory\examples\AUTs\SimpleAdder\javafx\SimpleAdder.cmd</b>
+<br/><br/>
+To start the Swing Simple Adder on Unix, select <b>SimpleAdder.sh</b>. To be able to start the JavaFX Simple Adder on Unix, consult the Samples chapter of the documentation for information on adapting the AUT configuration.
+<br/><br/>
+Deactivate the checkbox for loading a project template (we recommend this for your own projects later though).
+<br/><br/>
+Click <b>Finish</b>.
</description>
</item>
</cheatsheet>
diff --git a/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/defineAUT.xml b/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/defineAUT.xml
deleted file mode 100644
index 2636d59b1..000000000
--- a/org.eclipse.jubula.client.ua.cheatsheets/resources/shared/defineAUT.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><!--
- Copyright (c) 2004, 2010 BREDEX GmbH.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
- -->
-
-<cheatsheet title="Define an AUT">
- <intro>
- <description>
- The next steps show you how to add an AUT to your Project.
- </description>
- </intro>
- <item title="Defining the AUT" dialog="true" skip="false">
- <description>
- Select:<br/>
-<b>Test &gt; Properties</b>
-<br/>
-Select <b>AUT&apos;s</b> from the list on the left and click <b>Add</b>.
-<br/>
-Enter <b>Adder</b> as the AUT name.
-<br/>
-Choose <b>Swing</b> or <b>JavaFX</b> as the toolkit, depending on which AUT you want to start (they are both functionally the same).
-<br/>
-Click <b>OK</b> and then <b>OK</b> again. </description>
- </item>
-</cheatsheet>
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/filter/DataSetFilter.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/filter/DataSetFilter.java
index abde42f45..47e2884e4 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/filter/DataSetFilter.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/filter/DataSetFilter.java
@@ -40,7 +40,7 @@ public class DataSetFilter extends ViewerFilter {
return true;
}
for (String value : ((IDataSetPO)element).getColumnStringValues()) {
- if (value.matches(m_searchString)) {
+ if (value != null && value.matches(m_searchString)) {
return true;
}
}
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 87c8fde6e..e0c49d763 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
@@ -159,6 +159,8 @@ public abstract class AbstractDataSetPage extends Page
private Long m_paramId;
/** The column's widths */
private int[] m_columnWidths;
+ /** The current parameters count */
+ private int m_columnCount;
/** Constants for the button actions */
private enum TestDataRowAction {
@@ -513,10 +515,17 @@ public abstract class AbstractDataSetPage extends Page
/**
- * @return the zero relative index of the selected data set.
+ * @return the index of the selected data set.
*/
private int getSelectedDataSet() {
- return getTableViewer().getTable().getSelectionIndex();
+ int index = -1;
+ try {
+ index = Integer.parseInt(getTableViewer().getTable()
+ .getSelection()[0].getText(0)) - 1;
+ } catch (Exception e) {
+ // nothing
+ }
+ return index;
}
/**
@@ -811,8 +820,12 @@ public abstract class AbstractDataSetPage extends Page
// create column for data set numer
TableColumn dataSetNumberCol = new TableColumn(table, SWT.NONE);
dataSetNumberCol.setText(Messages.DataSetViewControllerDataSetNumber);
- dataSetNumberCol.setWidth((m_columnWidths != null && m_columnWidths
- .length > 0) ? m_columnWidths[0] : DATASET_NUMBER_COLUMNWIDTH);
+ if ((m_columnWidths != null && m_columnWidths.length > 0)
+ && m_columnCount == table.getColumnCount()) {
+ dataSetNumberCol.setWidth(m_columnWidths[0]);
+ } else {
+ dataSetNumberCol.setWidth(DATASET_NUMBER_COLUMNWIDTH);
+ }
return dataSetNumberCol.getText();
}
@@ -823,13 +836,21 @@ public abstract class AbstractDataSetPage extends Page
final Table table = getTable();
final TableColumn[] columns = table.getColumns();
final int columnCount = columns.length;
- columns[0].setWidth((m_columnWidths != null && m_columnWidths.length
- > 0) ? m_columnWidths[0] : DATASET_NUMBER_COLUMNWIDTH);
+ if ((m_columnWidths != null && m_columnWidths.length > 0)
+ && m_columnCount == columns.length) {
+ columns[0].setWidth(m_columnWidths[0]);
+ } else {
+ columns[0].setWidth(DATASET_NUMBER_COLUMNWIDTH);
+ }
for (int i = 1; i < columnCount; i++) {
final TableColumn column = columns[i];
column.pack();
- column.setWidth((m_columnWidths != null && m_columnWidths.length
- > i) ? m_columnWidths[i] : COLUMN_WIDTH);
+ if ((m_columnWidths != null && m_columnWidths.length > i)
+ && m_columnCount == columns.length) {
+ column.setWidth(m_columnWidths[i]);
+ } else {
+ column.setWidth(COLUMN_WIDTH);
+ }
}
}
@@ -850,6 +871,7 @@ public abstract class AbstractDataSetPage extends Page
for (TableColumn column : tableColumns) {
m_columnWidths[i++] = column.getWidth();
}
+ m_columnCount = tableColumns.length;
}
} else {
m_paramId = getParamInterfaceObj().getId();
@@ -862,16 +884,19 @@ public abstract class AbstractDataSetPage extends Page
columnProperties[0] = initDataSetColumn();
// create columns for parameter
int i = 1;
+ int parameterListSize = getParamInterfaceObj().getParameterListSize();
for (IParamDescriptionPO descr : getParamInterfaceObj()
.getParameterList()) {
TableColumn column = new TableColumn(table, SWT.NONE);
String columnName = descr.getName();
column.setText(columnName);
columnProperties[i] = columnName;
- if (m_columnWidths == null || m_columnWidths.length <= i) {
- if (column.getWidth() < COLUMN_WIDTH) {
- column.setWidth(COLUMN_WIDTH);
- }
+ if (m_columnWidths == null
+ || m_columnWidths.length <= i
+ /* This has to be parameterListSize + 1 because the "#"
+ * column is not included within parameterList */
+ || m_columnCount != (parameterListSize + 1)) {
+ column.setWidth(COLUMN_WIDTH);
} else {
column.setWidth(m_columnWidths[i]);
}
@@ -1057,6 +1082,10 @@ public abstract class AbstractDataSetPage extends Page
}
}
};
+ /** The index of the cell the editor was last activated at */
+ private int m_currentEditorIndex;
+ /** The current selection index of the shown table items */
+ private int m_currentSelectionIndex;
/**
* @param parent parent
@@ -1124,12 +1153,10 @@ public abstract class AbstractDataSetPage extends Page
private void writeDataSetData(String property, Object value,
AbstractJBEditor edit) {
final int langIndex = getColumnIndexOfProperty(property);
- final int dsNumber = getSelectedDataSet();
- final int paramIndex = getTable()
- .getSelectionIndex();
- setValueToModel(value, edit, paramIndex, dsNumber);
- getTable().getItem(paramIndex).setText(langIndex,
- value == null ? StringConstants.EMPTY : (String) value);
+ getTable().getItem(m_currentSelectionIndex).setText(langIndex,
+ value == null ? StringConstants.EMPTY : (String) value);
+ setValueToModel(value, edit, m_currentEditorIndex,
+ m_currentEditorIndex);
}
@@ -1254,6 +1281,8 @@ public abstract class AbstractDataSetPage extends Page
}
// end http://eclip.se/390800
TextControlBP.selectAll(m_editor.getEditor());
+ m_currentEditorIndex = getSelectedDataSet();
+ m_currentSelectionIndex = getTable().getSelectionIndex();
}
}
diff --git a/org.eclipse.jubula.extensions.wizard/src/org/eclipse/jubula/extensions/wizard/model/ValueSet.java b/org.eclipse.jubula.extensions.wizard/src/org/eclipse/jubula/extensions/wizard/model/ValueSet.java
index 6ab8209e7..b472479f1 100644
--- a/org.eclipse.jubula.extensions.wizard/src/org/eclipse/jubula/extensions/wizard/model/ValueSet.java
+++ b/org.eclipse.jubula.extensions.wizard/src/org/eclipse/jubula/extensions/wizard/model/ValueSet.java
@@ -10,9 +10,11 @@
*******************************************************************************/
package org.eclipse.jubula.extensions.wizard.model;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.Set;
+import org.eclipse.jubula.tools.internal.constants.StringConstants;
+
/**
* A value set containing all legal values for a parameter
*
@@ -25,7 +27,7 @@ public class ValueSet {
/** Constructor */
public ValueSet() {
- m_valueSet = new HashSet<>();
+ m_valueSet = new LinkedHashSet<>();
}
/**
@@ -65,7 +67,8 @@ public class ValueSet {
public String toString() {
StringBuilder sb = new StringBuilder();
for (String elem : m_valueSet) {
- sb.append(elem.trim() + ", "); //$NON-NLS-1$
+ sb.append(elem.trim() + StringConstants.COMMA
+ + StringConstants.SPACE);
}
if (sb.length() > 0) {
sb.replace(sb.lastIndexOf(","), sb.lastIndexOf(" "), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
diff --git a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/tester/AbstractTreeTester.java b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/tester/AbstractTreeTester.java
index 0e45a84d0..f040a1fa1 100644
--- a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/tester/AbstractTreeTester.java
+++ b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/tester/AbstractTreeTester.java
@@ -36,7 +36,6 @@ import org.eclipse.jubula.rc.common.util.IndexConverter;
import org.eclipse.jubula.rc.common.util.MatchUtil;
import org.eclipse.jubula.rc.common.util.Verifier;
import org.eclipse.jubula.toolkit.enums.ValueSets;
-import org.eclipse.jubula.tools.internal.constants.StringConstants;
import org.eclipse.jubula.tools.internal.constants.TestDataConstants;
import org.eclipse.jubula.tools.internal.objects.event.EventFactory;
import org.eclipse.jubula.tools.internal.objects.event.TestErrorEvent;
@@ -503,17 +502,12 @@ public abstract class AbstractTreeTester extends WidgetTester {
rcExpand(pathType, preAscend, treePath, operator);
} catch (StepExecutionException e) {
if (exists) {
- throw new StepVerifyFailedException(
- "Verify failed on tree-path: " //$NON-NLS-1$
- + treePath, EventFactory.createVerifyFailed(
- treePath, StringConstants.EMPTY));
+ Verifier.equals(exists, false);
}
return;
}
if (!exists) {
- throw new StepVerifyFailedException("Verify failed on tree-path: ", //$NON-NLS-1$
- EventFactory.createVerifyFailed(
- StringConstants.EMPTY, treePath));
+ Verifier.equals(exists, true);
}
}
@@ -534,17 +528,12 @@ public abstract class AbstractTreeTester extends WidgetTester {
rcExpandByIndices(pathType, preAscend, treePath);
} catch (StepExecutionException e) {
if (exists) {
- throw new StepVerifyFailedException("Verify failed on tree-path: " //$NON-NLS-1$
- + treePath,
- EventFactory.createVerifyFailed(treePath,
- StringConstants.EMPTY));
+ Verifier.equals(exists, false);
}
return;
}
if (!exists) {
- throw new StepVerifyFailedException("Verify failed on tree-path: ", //$NON-NLS-1$
- EventFactory.createVerifyFailed(
- StringConstants.EMPTY, treePath));
+ Verifier.equals(exists, true);
}
}
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java
index 70fe2a70a..2e45de8b0 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java
@@ -12,7 +12,10 @@ package org.eclipse.jubula.rc.javafx.listener;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.locks.ReentrantLock;
@@ -176,7 +179,6 @@ public class ComponentHandler implements ListChangeListener<Window>,
List<Node> resultList) {
//Blame checkstyle for this extra list
List<Node> result = resultList;
-
if (parent.isVisible()) {
for (Node child : parent.getChildrenUnmodifiable()) {
if (child.isVisible()
@@ -200,12 +202,31 @@ public class ComponentHandler implements ListChangeListener<Window>,
*/
public static Node getComponentByPos(Point2D pos) {
List<? extends Window> comps = getAssignableFrom(Window.class);
- List<Node> matches = new ArrayList<Node>();
+ Map<Window, List<Node>> matchesByWindows =
+ new HashMap<Window, List<Node>>();
+ Set<Window> shadowedWindows = new HashSet<>();
+ List<Node> localNodes;
for (Window window : comps) {
- if (window.isFocused() && window.isShowing()
- || window.isShowing() && window instanceof PopupWindow) {
+ localNodes = new ArrayList<Node>();
+ matchesByWindows.put(window, localNodes);
+ if ((window.isFocused() && window.isShowing())
+ || (window.isShowing()
+ && window instanceof PopupWindow)) {
Parent root = window.getScene().getRoot();
- matches = getAllNodesforPos(root, pos, matches);
+ localNodes = getAllNodesforPos(root, pos, localNodes);
+ if (!localNodes.isEmpty() && window instanceof PopupWindow) {
+ // if a popup window is under the cursor, it shadows its owner window
+ // we need this, because the owner window is both visible and has a focus
+ shadowedWindows.add(((PopupWindow) window).
+ getOwnerWindow());
+ }
+ }
+ }
+ List<Node> matches = new ArrayList<Node>();
+ for (Window window : matchesByWindows.keySet()) {
+ // we only keep not-shadowed window components
+ if (!shadowedWindows.contains(window)) {
+ matches.addAll(matchesByWindows.get(window));
}
}
List<Node> result = new ArrayList<Node>();
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java
index 3a5832765..05b90e672 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java
@@ -352,21 +352,21 @@ public class JavaFXApplicationTester extends AbstractApplicationTester {
} finally {
stage.removeEventFilter(WindowEvent.WINDOW_SHOWN, showHandler);
}
- boolean result = EventThreadQueuerJavaFXImpl.invokeAndWait(
- "rcWaitForWindowConfirm", new Callable<Boolean>() { //$NON-NLS-1$
+ }
+ boolean result = EventThreadQueuerJavaFXImpl.invokeAndWait(
+ "rcWaitForWindowConfirm", new Callable<Boolean>() { //$NON-NLS-1$
- @Override
- public Boolean call() throws Exception {
- return stage.isShowing();
- }
- });
- if (!result) {
- throw new StepExecutionException("window did not open", //$NON-NLS-1$
- EventFactory
- .createActionError(
- TestErrorEvent.TIMEOUT_EXPIRED));
- }
+ @Override
+ public Boolean call() throws Exception {
+ return stage.isShowing();
+ }
+ });
+ if (!result) {
+ throw new StepExecutionException("window did not open", //$NON-NLS-1$
+ EventFactory
+ .createActionError(TestErrorEvent.TIMEOUT_EXPIRED));
}
+
TimeUtil.delay(delay);
}
@@ -431,7 +431,7 @@ public class JavaFXApplicationTester extends AbstractApplicationTester {
return true;
}
});
- if (isFocused) {
+ if (!isFocused) {
try {
signal.await(pTimeout, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
@@ -442,21 +442,21 @@ public class JavaFXApplicationTester extends AbstractApplicationTester {
} finally {
stage.focusedProperty().removeListener(focusListener);
}
- boolean result = EventThreadQueuerJavaFXImpl
- .invokeAndWait(
- "rcWaitForWindowActivationConfirm", new Callable<Boolean>() { //$NON-NLS-1$
-
- @Override
- public Boolean call() throws Exception {
- return stage.isFocused();
- }
- });
- if (!result) {
- throw new StepExecutionException("window was not activated", //$NON-NLS-1$
- EventFactory.createActionError(
- TestErrorEvent.TIMEOUT_EXPIRED));
- }
}
+ boolean result = EventThreadQueuerJavaFXImpl.invokeAndWait(
+ "rcWaitForWindowActivationConfirm", new Callable<Boolean>() { //$NON-NLS-1$
+
+ @Override
+ public Boolean call() throws Exception {
+ return stage.isFocused();
+ }
+ });
+ if (!result) {
+ throw new StepExecutionException("window was not activated", //$NON-NLS-1$
+ EventFactory
+ .createActionError(TestErrorEvent.TIMEOUT_EXPIRED));
+ }
+
TimeUtil.delay(delay);
}
@@ -498,12 +498,16 @@ public class JavaFXApplicationTester extends AbstractApplicationTester {
@Override
public Boolean call() throws Exception {
- s.addEventFilter(WindowEvent.WINDOW_CLOSE_REQUEST,
- closeHandler);
- return false;
+ if (s.isShowing()) {
+ s.addEventFilter(WindowEvent.WINDOW_CLOSE_REQUEST,
+ closeHandler);
+ return false;
+ } else {
+ return true;
+ }
}
});
- if (isClosing) {
+ if (!isClosing) {
try {
signal.await(pTimeout, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
@@ -516,22 +520,25 @@ public class JavaFXApplicationTester extends AbstractApplicationTester {
s.removeEventFilter(WindowEvent.WINDOW_CLOSE_REQUEST,
closeHandler);
}
- boolean result = EventThreadQueuerJavaFXImpl.invokeAndWait(
- "rcWaitForWindowToCloseConfirm", new Callable<Boolean>() { //$NON-NLS-1$
-
- @Override
- public Boolean call() throws Exception {
- final Stage tmpS = getStageByTitle(title, operator);
+ }
+ boolean result = EventThreadQueuerJavaFXImpl.invokeAndWait(
+ "rcWaitForWindowToCloseConfirm", new Callable<Boolean>() { //$NON-NLS-1$
- return tmpS == null;
- }
- });
- if (!result) {
- throw new StepExecutionException("window was not closed", //$NON-NLS-1$
- EventFactory
- .createActionError(
- TestErrorEvent.TIMEOUT_EXPIRED));
- }
+ @Override
+ public Boolean call() throws Exception {
+ final Stage tmpS = getStageByTitle(title, operator);
+ // the stage might be still in the list be cause the fx
+ // thread was not fast enough to remove it, thus
+ // checking if showing == false which also means that
+ // the stage is not rendered
+ return tmpS == null || !tmpS.isShowing();
+ }
+ });
+ if (!result) {
+ throw new StepExecutionException("window was not closed", //$NON-NLS-1$
+ EventFactory
+ .createActionError(
+ TestErrorEvent.TIMEOUT_EXPIRED));
}
TimeUtil.delay(delay);
}
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/TreeTableViewTester.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/TreeTableViewTester.java
index 346398b10..890320b2d 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/TreeTableViewTester.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/TreeTableViewTester.java
@@ -78,11 +78,16 @@ public class TreeTableViewTester extends TreeViewTester {
List<TreeTableCell> tCells = NodeTraverseHelper
.getInstancesOf((Parent) getRealComponent(),
TreeTableCell.class);
+ TreeTableCell resultCell = null;
for (TreeTableCell cell : tCells) {
- if (NodeBounds.checkIfContains(point, cell)) {
- return cell;
+ //this check is necessary because the parent cell also contains the point
+ if (childCheck(point, resultCell, cell)) {
+ resultCell = cell;
}
}
+ if (resultCell != null) {
+ return resultCell;
+ }
throw new StepExecutionException(
"No tree node found at mouse position: " //$NON-NLS-1$
+ "X: " + point.getX() //$NON-NLS-1$
@@ -96,6 +101,22 @@ public class TreeTableViewTester extends TreeViewTester {
}
/**
+ * @param point mouse point
+ * @param parent supposed parent cell
+ * @param child supposed child of parent cell
+ * @return <code>true</code> if the child cell contains the point
+ * and the supposed parent is null or the supposed child
+ * is child of supposed parent. Otherwise <code>false</code>.
+ */
+ private boolean childCheck (Point2D point, TreeTableCell parent,
+ TreeTableCell child) {
+
+ return NodeBounds.checkIfContains(point, child) && (parent == null
+ || child.getTreeTableRow().getTreeItem().getParent()
+ .equals(parent.getTreeTableRow().getTreeItem()));
+ }
+
+ /**
* Selects the last node of the path given by <code>indexPath</code>
* at column <code>column</code>.
*
diff --git a/org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java b/org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java
index 54b6fc547..1b584b405 100644
--- a/org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java
+++ b/org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java
@@ -133,7 +133,12 @@ public class ComponentBuilder extends AbstractComponentBuilder {
}
}
}
- postProcess();
+ try {
+ postProcess();
+ } catch (ConfigXmlException cxe) {
+ m_initExceptions.put(cxe.getToolkitDescriptor(),
+ cxe);
+ }
}
/**
diff --git a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/exception/ConfigXmlException.java b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/exception/ConfigXmlException.java
index 00d0f035e..860bac798 100644
--- a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/exception/ConfigXmlException.java
+++ b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/exception/ConfigXmlException.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.jubula.tools.internal.exception;
+import org.eclipse.jubula.tools.internal.constants.StringConstants;
+
/**
* exceptions concerning any problem with XML configuration files
*
@@ -17,6 +19,9 @@ package org.eclipse.jubula.tools.internal.exception;
* @created 29.11.2005
*/
public class ConfigXmlException extends JBFatalAbortException {
+ /** the toolkitDescriptor if existent*/
+ private String m_toolkitDescriptor = StringConstants.EMPTY;
+
/**
* public constructor
*
@@ -28,4 +33,24 @@ public class ConfigXmlException extends JBFatalAbortException {
public ConfigXmlException(String message, Integer id) {
super(message, id);
}
+
+ /**
+ * public constructor
+ *
+ * @param toolkitDescriptor the name of the {@link org.eclipse.jubula.tools.internal.xml.businessmodell.ToolkitDescriptor}
+ * @param message the detailed message
+ * @param id An ErrorMessage.ID. {@inheritDoc}
+ */
+ public ConfigXmlException(String toolkitDescriptor,
+ String message, Integer id) {
+ super(message, id);
+ m_toolkitDescriptor = toolkitDescriptor;
+ }
+
+ /**
+ * @return the toolkit descriptor
+ */
+ public String getToolkitDescriptor() {
+ return m_toolkitDescriptor;
+ }
}
diff --git a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/utils/ZipUtil.java b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/utils/ZipUtil.java
index 4dba272f6..ffce14a44 100644
--- a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/utils/ZipUtil.java
+++ b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/utils/ZipUtil.java
@@ -200,8 +200,7 @@ public class ZipUtil {
}
}
}
-
- return (File[])extractedFiles.toArray();
+ return extractedFiles.toArray(new File[extractedFiles.size()]);
}
/**
diff --git a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/xml/businessmodell/CompSystem.java b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/xml/businessmodell/CompSystem.java
index 61c289b5f..b5f026990 100644
--- a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/xml/businessmodell/CompSystem.java
+++ b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/internal/xml/businessmodell/CompSystem.java
@@ -334,7 +334,10 @@ public class CompSystem {
final String msg = "multiple definition of component type " //$NON-NLS-1$
+ component.getType();
log.error(msg);
- throw new ConfigXmlException(msg,
+ String descriptor = current.getToolkitDesriptor().getToolkitID()
+ + StringConstants.COMMA + StringConstants.SPACE
+ + component.getToolkitDesriptor().getToolkitID();
+ throw new ConfigXmlException(descriptor, msg,
MessageIDs.E_MULTIPLE_COMPONENT);
}
}
@@ -635,7 +638,9 @@ public class CompSystem {
+ " has no realizing concreteComponents"; //$NON-NLS-1$
if (ac.isVisible()) {
log.error("visible " + message); //$NON-NLS-1$
- throw new ConfigXmlException("visible " + message, //$NON-NLS-1$
+ throw new ConfigXmlException(ac.getToolkitDesriptor()
+ .getToolkitID(),
+ "visible " + message, //$NON-NLS-1$
MessageIDs.E_NO_ABSTRACT_COMPONENT);
}
log.warn(message);
@@ -648,7 +653,8 @@ public class CompSystem {
final String msg = "Extending ConcreteComponent '" //$NON-NLS-1$
+ cc.getType() + "' must not have a componentClass!"; //$NON-NLS-1$
log.error(msg);
- throw new ConfigXmlException(msg,
+ throw new ConfigXmlException(cc.getToolkitDesriptor()
+ .getToolkitID(), msg,
MessageIDs.E_GENERAL_COMPONENT_ERROR);
}
}

Back to the top