Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2012-04-18 09:52:37 -0400
committerMarkus Tiede2012-04-18 09:52:37 -0400
commitca55822f4402fb96e8a5fdc9cf2fcb37e9379c19 (patch)
treead5bd58130ee5e94b5ec8c78eccf1e0046f83638 /org.eclipse.jubula.client.analyze.impl.standard
parent1dd527aa9b9d466f2af0b21d010c89fdf55c8aed (diff)
downloadorg.eclipse.jubula.core-ca55822f4402fb96e8a5fdc9cf2fcb37e9379c19.tar.gz
org.eclipse.jubula.core-ca55822f4402fb96e8a5fdc9cf2fcb37e9379c19.tar.xz
org.eclipse.jubula.core-ca55822f4402fb96e8a5fdc9cf2fcb37e9379c19.zip
Applied patch for enhancement 376398 - further work is still to be done.
Diffstat (limited to 'org.eclipse.jubula.client.analyze.impl.standard')
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/plugin.properties8
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/plugin.xml32
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Chain.java5
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/NumericalProjectElementCounter.java5
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Ratio.java34
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestResultNodeCX.java36
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/messages.properties2
8 files changed, 88 insertions, 35 deletions
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/META-INF/MANIFEST.MF b/org.eclipse.jubula.client.analyze.impl.standard/META-INF/MANIFEST.MF
index 0c0dc69bc..5b2df34d4 100644
--- a/org.eclipse.jubula.client.analyze.impl.standard/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.client.analyze.impl.standard/META-INF/MANIFEST.MF
@@ -7,6 +7,7 @@ Bundle-Activator: org.eclipse.jubula.client.analyze.impl.standard.Activator
Bundle-Vendor: Eclipse Jubula
Require-Bundle: org.apache.commons.lang;bundle-version="[2.4.0,3.0.0)",
org.eclipse.core.runtime;bundle-version="[3.7.0.v20110110,4.0.0)",
+ org.eclipse.core.commands;bundle-version="3.6.0",
org.eclipse.jubula.tools;bundle-version="1.2.0",
org.eclipse.jubula.toolkit.common;bundle-version="1.2.0",
org.eclipse.jubula.client.analyze;bundle-version="[1.2.0,1.3.0)",
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/plugin.properties b/org.eclipse.jubula.client.analyze.impl.standard/plugin.properties
index ef5368f36..41f7586bc 100644
--- a/org.eclipse.jubula.client.analyze.impl.standard/plugin.properties
+++ b/org.eclipse.jubula.client.analyze.impl.standard/plugin.properties
@@ -6,4 +6,10 @@
# http://www.eclipse.org/legal/epl-v10.html
###############################################################################
bxSimpleCount=BX Simple Count
-analyzeParam1=AnalyzeParameter 1 \ No newline at end of file
+analyzeParam1=AnalyzeParameter 1
+waitAndDelay=Waits and delays
+showEmptyChains=Show Empty chains
+ratio=Ratio (general : specific)
+projectElementCounter=Project Element Counter
+analysis=Analysis
+numMet=Numerical Metrics \ No newline at end of file
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/plugin.xml b/org.eclipse.jubula.client.analyze.impl.standard/plugin.xml
index ea55e2cda..aafe491c6 100644
--- a/org.eclipse.jubula.client.analyze.impl.standard/plugin.xml
+++ b/org.eclipse.jubula.client.analyze.impl.standard/plugin.xml
@@ -10,14 +10,6 @@
<plugin>
<extension
point="org.eclipse.jubula.client.analyze.definition">
- <Category
- id="numMet"
- name="Numerical Metrics">
- </Category>
- <Category
- id="analysis"
- name="Analysis">
- </Category>
<Context
class="org.eclipse.jubula.client.analyze.impl.standard.context.TestCaseBrowserActiveCX"
id="testcasebrowseractive"
@@ -29,11 +21,6 @@
name="Project">
</Context>
<Context
- class="org.eclipse.jubula.client.analyze.impl.standard.context.SimpleCount"
- id="sc"
- name="simpleC">
- </Context>
- <Context
class="org.eclipse.jubula.client.analyze.impl.standard.context.TestSuiteCX"
id="testsuite"
name="TestSuite">
@@ -88,13 +75,26 @@
id="componentname"
name="ComponentName">
</Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.TestResultNodeCX"
+ id="testresultnode"
+ name="TestResultNode">
+ </Context>
+ <Category
+ id="numMet"
+ name="%numMet">
+ </Category>
+ <Category
+ id="analysis"
+ name="%analysis">
+ </Category>
<Analyze
CategoryID="numMet"
ContextType="testsuite, project, exectestcase, spectestcase, execobjcont, testjob, cap ,category, specobjcont, projectLoaded, reftestsuite, componentname"
ResultType="tableResultMap"
class="org.eclipse.jubula.client.analyze.impl.standard.analyze.NumericalProjectElementCounter"
id="countSpecifiedTC"
- name="Project Element Counter">
+ name="%projectElementCounter">
</Analyze>
<Analyze
CategoryID="numMet"
@@ -102,7 +102,7 @@
ResultType="ratioResult"
class="org.eclipse.jubula.client.analyze.impl.standard.analyze.Ratio"
id="ratio"
- name="Ratio (general : specific)">
+ name="%ratio">
</Analyze>
<Analyze
CategoryID="analysis"
@@ -110,7 +110,7 @@
ResultType="chainList"
class="org.eclipse.jubula.client.analyze.impl.standard.analyze.Chain"
id="chain"
- name="Show Empty chains">
+ name="%showEmptyChains">
</Analyze>
</extension>
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Chain.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Chain.java
index 751d5b1d0..c15bd8ca5 100644
--- a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Chain.java
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/Chain.java
@@ -3,6 +3,7 @@ package org.eclipse.jubula.client.analyze.impl.standard.analyze;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.SubMonitor;
@@ -272,7 +273,7 @@ public class Chain implements IAnalyze {
*/
public AnalyzeResult execute(Object obj2analyze, IProgressMonitor monitor,
String resultType, List<AnalyzeParameter> param,
- String analyzeName) {
+ String analyzeName, ExecutionEvent event) {
SubMonitor progress = SubMonitor.convert(monitor, 100);
@@ -306,7 +307,7 @@ public class Chain implements IAnalyze {
l.size();
monitor.subTask(Messages.ConstructChains);
constructChains(progress.newChild(5));
- return new AnalyzeResult(resultType, getLists());
+ return new AnalyzeResult(resultType, getLists(), null);
}
/**
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/NumericalProjectElementCounter.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/NumericalProjectElementCounter.java
index 5254b8716..ec355012a 100644
--- a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/NumericalProjectElementCounter.java
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/NumericalProjectElementCounter.java
@@ -14,6 +14,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.jubula.client.analyze.definition.IAnalyze;
@@ -150,7 +151,7 @@ public class NumericalProjectElementCounter implements IAnalyze {
*/
public AnalyzeResult execute(Object obj2analyze, IProgressMonitor monitor,
String resultType, List<AnalyzeParameter> param,
- String analyzeName) {
+ String analyzeName, ExecutionEvent event) {
int workAmount = 1;
// get the number of nodes from the NodePersistenceManager to have a
// representative workAmount value for the ProgressMonitor
@@ -173,7 +174,7 @@ public class NumericalProjectElementCounter implements IAnalyze {
monitor.done();
throw new OperationCanceledException();
}
- return new AnalyzeResult(resultType, c.getAmount());
+ return new AnalyzeResult(resultType, c.getAmount(), null);
}
/**
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 b79585ef2..8639ee6f8 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
@@ -6,6 +6,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.jubula.client.analyze.definition.IAnalyze;
@@ -14,15 +15,19 @@ import org.eclipse.jubula.client.analyze.internal.AnalyzeParameter;
import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
import org.eclipse.jubula.client.analyze.internal.helper.ProjectContextHelper;
import org.eclipse.jubula.client.core.model.ICapPO;
+import org.eclipse.jubula.client.core.model.IExecObjContPO;
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.model.ISpecObjContPO;
import org.eclipse.jubula.client.core.persistence.GeneralStorage;
import org.eclipse.jubula.client.core.persistence.NodePM;
import org.eclipse.jubula.client.core.utils.AbstractNonPostOperatingTreeNodeOperation;
import org.eclipse.jubula.client.core.utils.ITreeTraverserContext;
import org.eclipse.jubula.client.core.utils.TreeTraverser;
import org.eclipse.jubula.toolkit.common.xml.businessprocess.ComponentBuilder;
+import org.eclipse.jubula.tools.constants.StringConstants;
+import org.eclipse.jubula.tools.constants.ToolkitConstants;
import org.eclipse.jubula.tools.xml.businessmodell.CompSystem;
import org.eclipse.jubula.tools.xml.businessmodell.Component;
import org.eclipse.jubula.tools.xml.businessmodell.ToolkitPluginDescriptor;
@@ -82,8 +87,8 @@ public class Ratio implements IAnalyze {
setLoadedProjectID(GeneralStorage.getInstance().getProject()
.getId());
setCompSystem(ComponentBuilder.getInstance().getCompSystem());
- setRatioElements("");
- setRatioValue("");
+ setRatioElements(StringConstants.EMPTY);
+ setRatioValue(StringConstants.EMPTY);
}
/**
@@ -167,12 +172,13 @@ public class Ratio implements IAnalyze {
ICapPO cap = (ICapPO) node;
Component comp = getCompSystem().findComponent(
cap.getComponentType());
- String type = "";
+ String type = StringConstants.EMPTY;
if (comp.getToolkitDesriptor().getName().equals("abstract")
|| comp.getToolkitDesriptor().getName()
.equals("concrete")
- || comp.getToolkitDesriptor().getName().equals("")) {
+ || comp.getToolkitDesriptor().getName()
+ .equals(StringConstants.EMPTY)) {
type = Messages.General;
} else {
ToolkitPluginDescriptor tkpd =
@@ -205,7 +211,8 @@ public class Ratio implements IAnalyze {
private ToolkitPluginDescriptor getParentToolkitPluginDescriptor(
ToolkitPluginDescriptor toolkitdesc) {
- if (toolkitdesc.getDepends().equals("null")) {
+ if (toolkitdesc.getDepends().equals(
+ ToolkitConstants.EMPTY_EXTPOINT_ENTRY)) {
return toolkitdesc;
} else {
ToolkitPluginDescriptor desc = ComponentBuilder.getInstance()
@@ -243,7 +250,7 @@ public class Ratio implements IAnalyze {
*/
public AnalyzeResult execute(Object obj2analyze, IProgressMonitor monitor,
String resultType, List<AnalyzeParameter> param,
- String analyzeName) {
+ String analyzeName, ExecutionEvent event) {
int workAmount = 1;
// get the number of nodes from the NodePersistenceManager to have a
@@ -256,7 +263,7 @@ public class Ratio implements IAnalyze {
.getParentProjectId(), GeneralStorage.getInstance()
.getMasterSession());
}
- monitor.beginTask("", workAmount);
+ monitor.beginTask(StringConstants.EMPTY, workAmount);
monitor.subTask(analyzeName);
CountToolkitLvl c = new CountToolkitLvl(monitor);
@@ -291,7 +298,7 @@ public class Ratio implements IAnalyze {
result.put(e.getKey(), resu);
}
- return new AnalyzeResult(resultType, result);
+ return new AnalyzeResult(resultType, result, null);
}
@@ -308,8 +315,8 @@ public class Ratio implements IAnalyze {
*/
private void traverse(
CountToolkitLvl count, Object obj, String objContType) {
-
- if (obj instanceof INodePO && objContType.equals("IExecObjContPO")) {
+ if (obj instanceof INodePO && objContType.equals(
+ IExecObjContPO.class.getSimpleName())) {
final INodePO root = (INodePO) obj;
TreeTraverser tt = new TreeTraverser(root, count, true, true) {
@@ -321,8 +328,8 @@ public class Ratio implements IAnalyze {
}
};
tt.traverse(true);
- } else if (obj instanceof INodePO
- && objContType.equals("ISpecObjContPO")) {
+ } else if (obj instanceof INodePO && objContType.equals(
+ ISpecObjContPO.class.getSimpleName())) {
final INodePO root = (INodePO) obj;
@@ -350,7 +357,8 @@ public class Ratio implements IAnalyze {
};
tt.traverse(true);
}
- if (obj instanceof INodePO && objContType.equals("")) {
+ if (obj instanceof INodePO
+ && objContType.equals(StringConstants.EMPTY)) {
final INodePO root = (INodePO) obj;
TreeTraverser tt = new TreeTraverser(root, count, true, true) {
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestResultNodeCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestResultNodeCX.java
new file mode 100644
index 000000000..8ae3653ec
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestResultNodeCX.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2012 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.analyze.impl.standard.context;
+
+import org.eclipse.jubula.client.analyze.definition.IContext;
+import org.eclipse.jubula.client.core.model.TestResultNode;
+
+/**
+ * @author BREDEX GmbH
+ */
+public class TestResultNodeCX implements IContext {
+
+ /**
+ * constructor
+ */
+ public TestResultNodeCX() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ if (obj instanceof TestResultNode) {
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/messages.properties b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/messages.properties
index 908dbbdbf..d80a6cb0a 100644
--- a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/messages.properties
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/messages.properties
@@ -4,4 +4,4 @@ General=general
AnalysingProjects=Show empty chains: Analyzing the Project
ChainBeginning=Show empty chains: Getting the possible beginnings of chains.
PossibleChildren=Show empty chains: Analyzing the possible child elements.
-ConstructChains=Show empty chains: Constructing the chains. \ No newline at end of file
+ConstructChains=Show empty chains: Constructing the chains.

Back to the top