Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/.checkstyle10
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/.classpath7
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/.gitignore2
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/.project34
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/META-INF/MANIFEST.MF14
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/build.properties13
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/plugin.properties9
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/plugin.xml92
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/pom.xml22
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/Activator.java60
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/NumericalProjectElementCounter.java176
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/helper/AnalyzeInputHelper.java43
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/CapCX.java34
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/CategoryCX.java34
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ComponentNameCX.java23
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ExecObjContCX.java35
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ExecTestCaseCX.java35
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ProjectCX.java34
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ProjectLoadedCX.java35
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/RefTestSuiteCX.java24
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SimpleCount.java32
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SpecObjContCX.java35
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SpecTestCaseCX.java34
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestJobCX.java35
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestSuiteCX.java35
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/Messages.java35
-rw-r--r--org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/messages.properties2
-rw-r--r--org.eclipse.jubula.client.analyze.ui/.checkstyle10
-rw-r--r--org.eclipse.jubula.client.analyze.ui/.classpath7
-rw-r--r--org.eclipse.jubula.client.analyze.ui/.gitignore2
-rw-r--r--org.eclipse.jubula.client.analyze.ui/.project34
-rw-r--r--org.eclipse.jubula.client.analyze.ui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--org.eclipse.jubula.client.analyze.ui/META-INF/MANIFEST.MF19
-rw-r--r--org.eclipse.jubula.client.analyze.ui/build.properties14
-rw-r--r--org.eclipse.jubula.client.analyze.ui/icons/analyzeToolbarA.gifbin0 -> 1023 bytes
-rw-r--r--org.eclipse.jubula.client.analyze.ui/plugin.properties12
-rw-r--r--org.eclipse.jubula.client.analyze.ui/plugin.xml132
-rw-r--r--org.eclipse.jubula.client.analyze.ui/pom.xml22
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/Activator.java42
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/components/AnalyzePreferenceDialog.java334
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/contributionitems/ContextMenuContributionItem.java141
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/contributionitems/ToolbarMenuContributionItem.java146
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/handlers/RunSelectionHandler.java90
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/handlers/ToolbarButtonDefaultHandler.java34
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/i18n/Messages.java58
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/i18n/messages.properties23
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/Query.java150
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/QueryResult.java82
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/ResultPage.java173
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/definition/IResultRendererUI.java34
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/helper/AnalyzeTreeViewerInputHelper.java86
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/helper/ContextHelper.java166
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/listener/AnalyzeTreeViewerDoubleClickListener.java104
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryAnalyzeResultListContentProvider.java66
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryAnalyzeResultListLabelProvider.java38
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryTreeContentProvider.java149
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryTreeLabelProvider.java36
-rw-r--r--org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/renderer/TableRenderer.java334
-rw-r--r--org.eclipse.jubula.client.analyze/.checkstyle10
-rw-r--r--org.eclipse.jubula.client.analyze/.classpath7
-rw-r--r--org.eclipse.jubula.client.analyze/.gitignore2
-rw-r--r--org.eclipse.jubula.client.analyze/.project34
-rw-r--r--org.eclipse.jubula.client.analyze/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--org.eclipse.jubula.client.analyze/META-INF/MANIFEST.MF19
-rw-r--r--org.eclipse.jubula.client.analyze/build.properties13
-rw-r--r--org.eclipse.jubula.client.analyze/plugin.xml13
-rw-r--r--org.eclipse.jubula.client.analyze/pom.xml22
-rw-r--r--org.eclipse.jubula.client.analyze/schema/definition.exsd286
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/Activator.java51
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/ExtensionRegistry.java305
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/constants/AnalyzeConstants.java102
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IAnalyze.java42
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IContext.java25
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IResultRenderer.java26
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/i18n/Messages.java27
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/i18n/messages.properties0
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Analyze.java196
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeParameter.java145
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeResult.java118
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeRun.java49
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Category.java101
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Context.java84
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Renderer.java103
-rw-r--r--org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/helper/RendererSelectionHelper.java49
86 files changed, 5342 insertions, 0 deletions
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/.checkstyle b/org.eclipse.jubula.client.analyze.impl.standard/.checkstyle
new file mode 100644
index 000000000..98fa5399c
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/.checkstyle
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true">
+ <fileset name="all" enabled="true" check-config-name="Jubula" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+ <filter name="FilesFromPackage" enabled="true">
+ <filter-data value="src/org/eclipse/jubula/client/analyze/impl/standard/i18n"/>
+ </filter>
+</fileset-config>
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/.classpath b/org.eclipse.jubula.client.analyze.impl.standard/.classpath
new file mode 100644
index 000000000..64c5e31b7
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/.gitignore b/org.eclipse.jubula.client.analyze.impl.standard/.gitignore
new file mode 100644
index 000000000..934e0e06f
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/.gitignore
@@ -0,0 +1,2 @@
+/bin
+/target
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/.project b/org.eclipse.jubula.client.analyze.impl.standard/.project
new file mode 100644
index 000000000..df4a9be78
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jubula.client.analyze.impl.standard</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jubula.client.analyze.impl.standard/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3949f423e
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Tue Jan 03 10:30:09 CET 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.jubula.client.analyze.impl.standard/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 000000000..6fbcc194f
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Tue Jan 03 10:30:09 CET 2012
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
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
new file mode 100644
index 000000000..dec8c5f60
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Jubula Analyze Core
+Bundle-SymbolicName: org.eclipse.jubula.client.analyze.impl.standard;singleton:=true
+Bundle-Version: 1.2.0.qualifier
+Bundle-Activator: org.eclipse.jubula.client.analyze.impl.standard.Activator
+Bundle-Vendor: BREDEX GmbH
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.7.0.v20110110,4.0.0)",
+ org.eclipse.jubula.client.analyze;bundle-version="[1.2.0,1.3.0)",
+ org.eclipse.jubula.client.core;bundle-version="[1.2.0,1.3.0)",
+ org.eclipse.jubula.client.ui.rcp;bundle-version="[1.2.0,1.3.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/build.properties b/org.eclipse.jubula.client.analyze.impl.standard/build.properties
new file mode 100644
index 000000000..472a95e21
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/build.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/plugin.properties b/org.eclipse.jubula.client.analyze.impl.standard/plugin.properties
new file mode 100644
index 000000000..ef5368f36
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/plugin.properties
@@ -0,0 +1,9 @@
+###############################################################################
+# 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
+###############################################################################
+bxSimpleCount=BX Simple Count
+analyzeParam1=AnalyzeParameter 1 \ 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
new file mode 100644
index 000000000..13023a9ca
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/plugin.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ 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
+ -->
+<plugin>
+ <extension
+ point="org.eclipse.jubula.client.analyze.definition">
+ <Category
+ id="numMet"
+ name="Numerical Metrics">
+ </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="Numeric Project Element Counter">
+ </Analyze>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.ProjectCX"
+ id="project"
+ 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">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.TestJobCX"
+ id="testjob"
+ name="TestJob">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.ExecTestCaseCX"
+ id="exectestcase"
+ name="ExecTestCase">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.SpecTestCaseCX"
+ id="spectestcase"
+ name="SpecTestCase">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.CapCX"
+ id="cap"
+ name="TestStep">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.CategoryCX"
+ id="category"
+ name="Category">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.SpecObjContCX"
+ id="specobjcont"
+ name="SpecObjCont">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.ExecObjContCX"
+ id="execobjcont"
+ name="ExecObjCont">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.ProjectLoadedCX"
+ id="projectloaded"
+ name="Project Loaded">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.RefTestSuiteCX"
+ id="reftestsuite"
+ name="RefTestSuite">
+ </Context>
+ <Context
+ class="org.eclipse.jubula.client.analyze.impl.standard.context.ComponentNameCX"
+ id="componentname"
+ name="ComponentName">
+ </Context>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/pom.xml b/org.eclipse.jubula.client.analyze.impl.standard/pom.xml
new file mode 100644
index 000000000..3ff0f8d14
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/pom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+ -->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>com.bredexsw.guidancer.project.configuration</artifactId>
+ <groupId>com.bredexsw.guidancer</groupId>
+ <version>6.0.0-SNAPSHOT</version>
+ <relativePath>../com.bredexsw.guidancer.project.configuration</relativePath>
+ </parent>
+ <groupId>org.eclipse.jubula</groupId>
+ <artifactId>org.eclipse.jubula.client.analyze.impl.standard</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/Activator.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/Activator.java
new file mode 100644
index 000000000..25326d42b
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/Activator.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+/**
+ *
+ * @author volker
+ *
+ */
+public class Activator implements BundleActivator {
+/**
+ *
+ */
+ private static BundleContext context;
+/**
+ *
+ * @return context
+ */
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
+ * )
+ */
+ /**
+ * @param bundleContext bundleContext
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ /**
+ * @param bundleContext bundleContext
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = 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
new file mode 100644
index 000000000..ac7ba57cb
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/NumericalProjectElementCounter.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * 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.analyze;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jubula.client.analyze.definition.IAnalyze;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeParameter;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+import org.eclipse.jubula.client.core.model.ICapPO;
+import org.eclipse.jubula.client.core.model.ICategoryPO;
+import org.eclipse.jubula.client.core.model.IComponentNamePO;
+import org.eclipse.jubula.client.core.model.IExecTestCasePO;
+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.ISpecTestCasePO;
+import org.eclipse.jubula.client.core.model.ITestJobPO;
+import org.eclipse.jubula.client.core.model.ITestSuitePO;
+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;
+
+/**
+ * This Analyze counts the different Elements, that are used in a TestProject.
+ * It uses the TreeTraverser to traverse the Tree from the given node top-down.
+ * Every Node is checked relating to his type. These TypeAmounts are counted ad
+ * returned when the TreeTraverser has finished.
+ *
+ * @author volker
+ *
+ */
+public class NumericalProjectElementCounter implements IAnalyze {
+ /**
+ * The CountElementOperation which is given to the TreeTraverser
+ * @author volker
+ */
+ static class CountElementOperation extends
+ AbstractNonPostOperatingTreeNodeOperation<INodePO> {
+ /**
+ * This Map is used to save the amount of the different NodeTypes
+ */
+ private Map<Class<? extends INodePO>, Integer> m_amount =
+ new HashMap<Class<? extends INodePO>, Integer>();
+
+ /** The given ProgressMonitor */
+ private IProgressMonitor m_pm;
+
+ /**
+ * The Constructor of the CountElementOperation
+ * @param monitor
+ * The given ProgressMonitor
+ */
+ public CountElementOperation(IProgressMonitor monitor) {
+ setProgressMonitor(monitor);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean operate(ITreeTraverserContext<INodePO> ctx,
+ INodePO parent, INodePO node, boolean alreadyVisited) {
+
+ Class<? extends INodePO> nodeType = null;
+ if (node instanceof ICategoryPO || node instanceof ISpecTestCasePO
+ || node instanceof ICapPO || node instanceof ITestSuitePO
+ || node instanceof IExecTestCasePO
+ || node instanceof ITestJobPO
+ || node instanceof IRefTestSuitePO
+ || node instanceof IComponentNamePO) {
+ nodeType = node.getClass();
+ }
+ if (nodeType != null) {
+ Integer ccount = getAmount().get(nodeType);
+ if (ccount == null) {
+ ccount = new Integer(0);
+ }
+ Integer nCount = ccount + 1;
+ getAmount().put(nodeType, nCount);
+
+ getProgressMonitor().worked(1);
+ if (getProgressMonitor().isCanceled()) {
+ getProgressMonitor().done();
+ throw new OperationCanceledException();
+ }
+ }
+ return !alreadyVisited;
+ }
+
+ /**
+ * @return The AmountMap containing the amounts of the different NodeTypes
+ */
+ public Map<Class<? extends INodePO>, Integer> getAmount() {
+ return m_amount;
+ }
+
+ /**
+ * @return The ProgressMonitor
+ */
+ public IProgressMonitor getProgressMonitor() {
+ return m_pm;
+ }
+
+ /**
+ * @param monitor
+ * The given ProgressMonitor
+ */
+ public void setProgressMonitor(IProgressMonitor monitor) {
+ this.m_pm = monitor;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public AnalyzeResult execute(Object obj, IProgressMonitor monitor,
+ String resultType, List<AnalyzeParameter> param,
+ String analyzeName) {
+ int workAmount = 1;
+ // get the number of nodes from the NodePersistenceManager to have a
+ // representative workAmount value for the ProgressMonitor
+ if (obj instanceof IProjectPO) {
+ workAmount = (int) NodePM.getNumNodes(((IProjectPO) obj).getId(),
+ GeneralStorage.getInstance().getMasterSession());
+ } else if (obj instanceof INodePO) {
+ workAmount = (int) NodePM.getNumNodes(((INodePO) obj)
+ .getParentProjectId(), GeneralStorage.getInstance().
+ getMasterSession());
+ }
+ monitor.beginTask("", workAmount);
+ monitor.subTask(analyzeName);
+
+ CountElementOperation c = new CountElementOperation(monitor);
+ traverse(c, obj);
+
+ monitor.worked(1);
+ if (monitor.isCanceled()) {
+ monitor.done();
+ throw new OperationCanceledException();
+ }
+ return new AnalyzeResult(resultType, c.getAmount());
+ }
+
+ /**
+ * Creates a new instance of the TreeTraverser, adds the given Operation and
+ * traverses
+ *
+ * @param count
+ * The instance of CountElementOperation
+ * @param obj
+ * The given selection
+ */
+ private void traverse(CountElementOperation count, Object obj) {
+
+ if (obj instanceof INodePO) {
+ final INodePO root = (INodePO) obj;
+ TreeTraverser tt = new TreeTraverser(root);
+ tt.addOperation(count);
+ tt.traverse();
+ }
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/helper/AnalyzeInputHelper.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/helper/AnalyzeInputHelper.java
new file mode 100644
index 000000000..8b35e59eb
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/analyze/helper/AnalyzeInputHelper.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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.analyze.helper;
+
+import org.eclipse.jubula.client.core.model.INodePO;
+
+/**
+ * A Helperclass to manage the Input for an Analyze
+ * @author volker
+ *
+ */
+public class AnalyzeInputHelper {
+
+ /** The node which is going to be the "RootNode" */
+ private static INodePO root;
+
+ /** Empty Constructor */
+ private AnalyzeInputHelper() {
+ }
+
+ /**
+ * @return The Node which is set as the "RootNode"
+ */
+ public static INodePO getNode() {
+ return root;
+ }
+
+ /**
+ * @param node The Node which is going to be set as the "RootNode"
+ */
+ public static void setNode(INodePO node) {
+ root = node;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/CapCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/CapCX.java
new file mode 100644
index 000000000..d38a32db7
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/CapCX.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.ICapPO;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class CapCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a TestStep
+ if (obj instanceof ICapPO) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/CategoryCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/CategoryCX.java
new file mode 100644
index 000000000..57dfafa9a
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/CategoryCX.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.ICategoryPO;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class CategoryCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a Category
+ if (obj instanceof ICategoryPO) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ComponentNameCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ComponentNameCX.java
new file mode 100644
index 000000000..b58115283
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ComponentNameCX.java
@@ -0,0 +1,23 @@
+package org.eclipse.jubula.client.analyze.impl.standard.context;
+
+import org.eclipse.jubula.client.analyze.definition.IContext;
+import org.eclipse.jubula.client.core.model.IComponentNamePO;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class ComponentNameCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a ComponentName
+ if (obj instanceof IComponentNamePO) {
+ return true;
+ }
+ return false;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ExecObjContCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ExecObjContCX.java
new file mode 100644
index 000000000..fa1b64d8b
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ExecObjContCX.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.IExecObjContPO;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class ExecObjContCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is an instance of an ObjectContainer from
+ // the TestSuiteBrowser
+ if (obj instanceof IExecObjContPO) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ExecTestCaseCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ExecTestCaseCX.java
new file mode 100644
index 000000000..a6d5e146c
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ExecTestCaseCX.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.IExecTestCasePO;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class ExecTestCaseCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a referenced TestCase
+ if (obj instanceof IExecTestCasePO) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ProjectCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ProjectCX.java
new file mode 100644
index 000000000..ba03806bd
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ProjectCX.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.IProjectPO;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class ProjectCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a Project
+ if (obj instanceof IProjectPO) {
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ProjectLoadedCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ProjectLoadedCX.java
new file mode 100644
index 000000000..24455cd6e
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/ProjectLoadedCX.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.INodePO;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class ProjectLoadedCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a Node
+ if (obj instanceof INodePO) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/RefTestSuiteCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/RefTestSuiteCX.java
new file mode 100644
index 000000000..52c7e82db
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/RefTestSuiteCX.java
@@ -0,0 +1,24 @@
+package org.eclipse.jubula.client.analyze.impl.standard.context;
+
+import org.eclipse.jubula.client.analyze.definition.IContext;
+import org.eclipse.jubula.client.core.model.IRefTestSuitePO;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class RefTestSuiteCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a referenced TestSuite
+ if (obj instanceof IRefTestSuitePO) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SimpleCount.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SimpleCount.java
new file mode 100644
index 000000000..b3ecf68bd
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SimpleCount.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class SimpleCount implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // returns true, because the SimpleCount metric has to be shown every
+ // time
+ return true;
+ }
+
+} \ No newline at end of file
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SpecObjContCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SpecObjContCX.java
new file mode 100644
index 000000000..b6678cdaa
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SpecObjContCX.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.ISpecObjContPO;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class SpecObjContCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is an instance of a userspecified
+ // ObjectContainer from the TestCaseBrowser
+ if (obj instanceof ISpecObjContPO) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SpecTestCaseCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SpecTestCaseCX.java
new file mode 100644
index 000000000..4f1c46c15
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/SpecTestCaseCX.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.ISpecTestCasePO;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class SpecTestCaseCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a userspecified TestCase
+ if (obj instanceof ISpecTestCasePO) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestJobCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestJobCX.java
new file mode 100644
index 000000000..f5bd79f3f
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestJobCX.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.ITestJobPO;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class TestJobCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a TestJob
+ if (obj instanceof ITestJobPO) {
+ return true;
+ }
+ return false;
+ }
+
+} \ No newline at end of file
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestSuiteCX.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestSuiteCX.java
new file mode 100644
index 000000000..11642e498
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/context/TestSuiteCX.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.ITestSuitePO;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class TestSuiteCX implements IContext {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isActive(Object obj) {
+ // checks if the given Object is a TestSuite
+ if (obj instanceof ITestSuitePO) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/Messages.java b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/Messages.java
new file mode 100644
index 000000000..713d513e7
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/Messages.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.i18n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * i18n string internationalization
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.jubula.client.analyze.impl.standard.i18n.messages"; //$NON-NLS-1$
+
+ public static String MonitorCanceled;
+ public static String Running;
+
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+ /**
+ * Constructor
+ */
+ private Messages() {
+ // hide
+ }
+}
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
new file mode 100644
index 000000000..eec2fe05f
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.impl.standard/src/org/eclipse/jubula/client/analyze/impl/standard/i18n/messages.properties
@@ -0,0 +1,2 @@
+MonitorCanceled=Monitor canceled
+Running=Running: \ No newline at end of file
diff --git a/org.eclipse.jubula.client.analyze.ui/.checkstyle b/org.eclipse.jubula.client.analyze.ui/.checkstyle
new file mode 100644
index 000000000..4323d7f2b
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/.checkstyle
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true">
+ <fileset name="all" enabled="true" check-config-name="Jubula" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+ <filter name="FilesFromPackage" enabled="true">
+ <filter-data value="src/org/eclipse/jubula/client/analyze/ui/i18n"/>
+ </filter>
+</fileset-config>
diff --git a/org.eclipse.jubula.client.analyze.ui/.classpath b/org.eclipse.jubula.client.analyze.ui/.classpath
new file mode 100644
index 000000000..64c5e31b7
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jubula.client.analyze.ui/.gitignore b/org.eclipse.jubula.client.analyze.ui/.gitignore
new file mode 100644
index 000000000..934e0e06f
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/.gitignore
@@ -0,0 +1,2 @@
+/bin
+/target
diff --git a/org.eclipse.jubula.client.analyze.ui/.project b/org.eclipse.jubula.client.analyze.ui/.project
new file mode 100644
index 000000000..5ed27c3ea
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jubula.client.analyze.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jubula.client.analyze.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jubula.client.analyze.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..5e5224eac
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Dec 06 15:30:01 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.eclipse.jubula.client.analyze.ui/META-INF/MANIFEST.MF b/org.eclipse.jubula.client.analyze.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..00fff8205
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Jubula Analyze UI
+Bundle-SymbolicName: org.eclipse.jubula.client.analyze.ui;singleton:=true
+Bundle-Version: 1.2.0.qualifier
+Bundle-Activator: org.eclipse.jubula.client.analyze.ui.Activator
+Bundle-Vendor: BREDEX GmbH
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.7.0.v20110110,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.7.0.20110602-0100,4.0.0)",
+ org.eclipse.jubula.client.analyze;bundle-version="[1.2.0,1.3.0)",
+ org.eclipse.jubula.client.ui;bundle-version="[1.2.0,1.3.0)",
+ org.eclipse.search;bundle-version="[3.7.0,4.0.0)",
+ org.eclipse.jubula.client.ui.rcp;bundle-version="[1.2.0,1.3.0)",
+ org.apache.commons.lang;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.jubula.client.core;bundle-version="[1.2.0,1.3.0)",
+ org.eclipse.jubula.client.analyze.impl.standard;bundle-version="[1.2.0,1.3.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/org.eclipse.jubula.client.analyze.ui/build.properties b/org.eclipse.jubula.client.analyze.ui/build.properties
new file mode 100644
index 000000000..bd3ac6246
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/build.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ icons/,\
+ plugin.xml
diff --git a/org.eclipse.jubula.client.analyze.ui/icons/analyzeToolbarA.gif b/org.eclipse.jubula.client.analyze.ui/icons/analyzeToolbarA.gif
new file mode 100644
index 000000000..04944bc31
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/icons/analyzeToolbarA.gif
Binary files differ
diff --git a/org.eclipse.jubula.client.analyze.ui/plugin.properties b/org.eclipse.jubula.client.analyze.ui/plugin.properties
new file mode 100644
index 000000000..971a702e4
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# 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
+###############################################################################
+complexity=Complexity
+numMet=Numerical Metrics
+analysis=Analysis
+analyze=Analyze
+analyzeView=Analyze View \ No newline at end of file
diff --git a/org.eclipse.jubula.client.analyze.ui/plugin.xml b/org.eclipse.jubula.client.analyze.ui/plugin.xml
new file mode 100644
index 000000000..414354dcc
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/plugin.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+ <toolbar
+ id="org.eclipse.jubula.client.analyze.ui.analyzeToolbar">
+ <command
+ commandId="org.eclipse.jubula.client.analyze.ui.menuCommand"
+ icon="icons/analyzeToolbarA.gif"
+ style="pulldown">
+ </command>
+ </toolbar>
+ </menuContribution>
+ <menuContribution
+ locationURI="menu:org.eclipse.jubula.client.analyze.ui.menuCommand">
+ <dynamic
+ class="org.eclipse.jubula.client.analyze.ui.contributionitems.ToolbarMenuContributionItem"
+ id="org.eclipse.jubula.client.analyze.ui.dynamicMenu">
+ </dynamic>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.jubula.client.ui.rcp.views.TestSuiteBrowser?after=additions">
+ <menu
+ label="%analyze">
+ <dynamic
+ class="org.eclipse.jubula.client.analyze.ui.contributionitems.ContextMenuContributionItem"
+ id="org.eclipse.jubula.client.analyze.ui.dynamicMenu">
+ </dynamic>
+ </menu>
+</menuContribution>
+<menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.jubula.client.ui.rcp.views.TestCaseBrowser?after=additions">
+ <menu
+ label="Analyze">
+ <dynamic
+ class="org.eclipse.jubula.client.analyze.ui.contributionitems.ContextMenuContributionItem"
+ id="org.eclipse.jubula.client.analyze.ui.dynamicMenu">
+ </dynamic>
+ </menu>
+</menuContribution>
+<menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.jubula.client.ui.rcp.editors.ObjectMappingEditor?after=additions">
+ <menu
+ label="Analyze">
+ <dynamic
+ class="org.eclipse.jubula.client.analyze.ui.contributionitems.ContextMenuContributionItem"
+ id="org.eclipse.jubula.client.analyze.ui.dynamicMenu">
+ </dynamic>
+ </menu>
+</menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.jubula.client.ui.rcp.editors.CentralTestDataEditor?after=additions">
+ <menu
+ label="Analyze">
+ <dynamic
+ class="org.eclipse.jubula.client.analyze.ui.contributionitems.ContextMenuContributionItem"
+ id="org.eclipse.jubula.client.analyze.ui.dynamicMenu">
+ </dynamic>
+ </menu>
+</menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:ComponentNameBrowserContextMenuID?after=additions">
+ <menu
+ label="Analyze">
+ <dynamic
+ class="org.eclipse.jubula.client.analyze.ui.contributionitems.ContextMenuContributionItem"
+ id="org.eclipse.jubula.client.analyze.ui.dynamicMenu">
+ </dynamic>
+ </menu>
+ </menuContribution>
+
+</extension>
+ <extension
+ point="org.eclipse.ui.commands">
+
+ <command
+ defaultHandler="org.eclipse.jubula.client.analyze.ui.handlers.ToolbarButtonDefaultHandler"
+ id="org.eclipse.jubula.client.analyze.ui.RunProfile"
+ name="RunProfile">
+ <commandParameter
+ id="org.eclipse.jubula.client.analyze.ui.commandParameter3"
+ name="name"
+ optional="true">
+ </commandParameter>
+ </command>
+ <command
+ defaultHandler="org.eclipse.jubula.client.analyze.ui.handlers.RunSelectionHandler"
+ id="org.eclipse.jubula.client.analyze.ui.RunSelection"
+ name="RunSelection">
+ <commandParameter
+ id="org.eclipse.jubula.client.analyze.ui.RunSelection.IDParam"
+ name="IDParam">
+ </commandParameter>
+
+ </command>
+ <command
+ defaultHandler="org.eclipse.jubula.client.analyze.ui.handlers.ToolbarButtonDefaultHandler"
+ id="org.eclipse.jubula.client.analyze.ui.menuCommand"
+ name="%analyze">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.search.searchResultViewPages">
+ <viewPage
+ class="org.eclipse.jubula.client.analyze.ui.internal.ResultPage"
+ id="org.eclipse.jubula.client.analyze.ui.internal.resultPage"
+ searchResultClass="org.eclipse.jubula.client.analyze.ui.internal.QueryResult">
+ </viewPage>
+ </extension>
+ <extension
+ point="org.eclipse.jubula.client.analyze.definition">
+ <ResultRenderer
+ ResultType="tableResultMap"
+ id="tableRenderer"
+ rendererClass="org.eclipse.jubula.client.analyze.ui.renderer.TableRenderer">
+ </ResultRenderer>
+ <Context
+ class="org.eclipse.jubula.client.analyze.ui.internal.context.Project"
+ id="project"
+ name="Project">
+ </Context>
+ </extension>
+</plugin>
diff --git a/org.eclipse.jubula.client.analyze.ui/pom.xml b/org.eclipse.jubula.client.analyze.ui/pom.xml
new file mode 100644
index 000000000..42b8043b9
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/pom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+ -->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>com.bredexsw.guidancer.project.configuration</artifactId>
+ <groupId>com.bredexsw.guidancer</groupId>
+ <version>6.0.0-SNAPSHOT</version>
+ <relativePath>../com.bredexsw.guidancer.project.configuration</relativePath>
+ </parent>
+ <groupId>org.eclipse.jubula</groupId>
+ <artifactId>org.eclipse.jubula.client.analyze.ui</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/Activator.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/Activator.java
new file mode 100644
index 000000000..a555c624b
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/Activator.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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.ui;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Volker Hotzan
+ */
+public class Activator implements BundleActivator {
+ /**
+ * the context
+ */
+ private static BundleContext context;
+
+ /**
+ * @return the context
+ */
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /** {@inheritDoc} */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /** {@inheritDoc} */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/components/AnalyzePreferenceDialog.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/components/AnalyzePreferenceDialog.java
new file mode 100644
index 000000000..2e4380ebf
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/components/AnalyzePreferenceDialog.java
@@ -0,0 +1,334 @@
+/*******************************************************************************
+ * 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.ui.components;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeParameter;
+import org.eclipse.jubula.client.analyze.ui.i18n.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * This class creates the AnalyzePreference dialog, which is shown, when an
+ * Analyze with Parameters has been chosen. This PreferenceDialog is used to
+ * adjust AnalyzeParameters
+ *
+ * @author volker
+ *
+ */
+public class AnalyzePreferenceDialog extends Dialog {
+
+ /** The ParameterDialog */
+ private Dialog m_dialog;
+
+ /** the cancel status */
+ private boolean m_cancelStatus = true;
+
+ /** The List includes the Text fields for the ParameterValues */
+ private ArrayList<Text> m_textList;
+
+ /**
+ * the parameterValue. It is modified when the text is changed in the
+ * modifyListener below
+ */
+ private String m_paramValue;
+
+ /**
+ * @param parentShell
+ * The ParentShell
+ * @param parameterList
+ * The given List of AnalyzeParameters
+ */
+ public AnalyzePreferenceDialog(Shell parentShell,
+ List<AnalyzeParameter> parameterList) {
+ super(parentShell);
+ createAnalyzePreferenceDialog(parameterList);
+ }
+
+ /**
+ * @return m_dialog The Dialog
+ */
+ public Dialog getDialog() {
+ return m_dialog;
+ }
+
+ /**
+ *
+ * @param dialog The given Dialog
+ */
+ public void setDialog(Dialog dialog) {
+ this.m_dialog = dialog;
+ }
+
+ /**
+ * @return m_cancel The cancelStatus
+ */
+ public boolean getCancelStatus() {
+ return m_cancelStatus;
+ }
+
+ /**
+ * @param cancelStatus The given cancel-state
+ */
+ public void setCancelStatus(Boolean cancelStatus) {
+ this.m_cancelStatus = cancelStatus;
+ }
+
+ /**
+ * @return m_paramValue The Parameter Value
+ */
+ public String getParamValue() {
+ return m_paramValue;
+ }
+
+ /**
+ * @param paramValue The value of the AnalyzeParameter
+ */
+ public void setParamValue(String paramValue) {
+ this.m_paramValue = paramValue;
+ }
+
+ /**
+ * creates the AnalyzePreferenceDialog
+ * @param parameterList
+ * The List of AnalyzeParameters
+ * @return dialog The AnalyzePreferenceDialog
+ */
+ public Dialog createAnalyzePreferenceDialog(
+ final List<AnalyzeParameter> parameterList) {
+ if (parameterList.size() != 0) {
+
+ // The AnalyzePreferenceDialog
+ Dialog dialog = new Dialog(Display.getCurrent().getActiveShell()) {
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super
+ .createDialogArea(parent);
+ createDialogContent(composite, parameterList);
+ return composite;
+ }
+ @Override
+ protected Point getInitialSize() {
+ int height;
+ if (parameterList.size() <= 10) {
+ height = (parameterList.size() * 32) + 132;
+ } else {
+ height = 452;
+ }
+ return new Point(600, height);
+ }
+ @Override
+ protected void okPressed() {
+ setCancelStatus(false);
+ getDialog().close();
+ }
+ @Override
+ protected void cancelPressed() {
+ setCancelStatus(true);
+ getDialog().close();
+ }
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ ((GridLayout) parent.getLayout()).numColumns++;
+ Button defaults = new Button(parent, SWT.PUSH);
+ defaults.setData(parameterList);
+ defaults.setText(Messages.DefaultsButton);
+ defaults.addListener(SWT.Selection, new Listener() {
+
+ public void handleEvent(Event event) {
+ restore();
+ }
+ });
+ createButton(parent, IDialogConstants.OK_ID,
+ IDialogConstants.OK_LABEL, true);
+ createButton(parent, IDialogConstants.CANCEL_ID,
+ IDialogConstants.CANCEL_LABEL, false);
+ }
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.AnalyzePreferenceDialog);
+ }
+ };
+ setDialog(dialog);
+ dialog.open();
+ return dialog;
+ }
+ setCancelStatus(false);
+ return null;
+ }
+
+ /**
+ * Creates the content of the AnalyzePreferenceDialog
+ *
+ * @param composite
+ * The given Composite
+ * @param parameterList
+ * The given parameterList with the AnalyzeParameters
+ */
+ private void createDialogContent(Composite composite,
+ List<AnalyzeParameter> parameterList) {
+
+ int width = 580;
+ int height = (parameterList.size() * 28) + 40;
+ composite.setLayout(new FillLayout());
+
+ ScrolledComposite sc = new ScrolledComposite(composite, SWT.V_SCROLL);
+ sc.setExpandHorizontal(true);
+ sc.setExpandVertical(true);
+ sc.setMinSize(width, height + 1);
+
+ Composite content = new Composite(sc, SWT.NONE);
+ content.setLayout(new RowLayout());
+
+ // has to be less than the setMinSize-height of the ScrolledComposite
+ content.setSize(width, height);
+
+ sc.setContent(content);
+
+ // The HeaderLabel of this Dialog.
+ Label header = new Label(content, SWT.NONE);
+ header.setSize(600, 20);
+ header.setText(Messages.AnalyzePreferenceDialogAdjustNote);
+
+ // adds a Separator
+ RowData sepData = new RowData(600, 10);
+ Label sep = new Label(content, SWT.SEPARATOR | SWT.HORIZONTAL);
+ sep.setLayoutData(sepData);
+
+ // fill the Composite with the AnalyzeParameters
+ processParameters(content, parameterList);
+ }
+
+ /**
+ * Gets the List with the TextObjects and resets their Texts
+ * to the defaults values
+ */
+ private void restore() {
+
+ for (int i = 0; i < getTextList().size(); i++) {
+ Text t = getTextList().get(i);
+ AnalyzeParameter ap = (AnalyzeParameter) t.getData();
+ t.setText(ap.getDefaultValue());
+ }
+ }
+
+ /**
+ * Handles the dynamic content of the given Composite. Creates the
+ * GridLayout with its components to display the parameters
+ *
+ * @param cmp
+ * The given Composite
+ * @param parameterList
+ * The given List of Parameters
+ * @return c The Composite that which contains the Parameters
+ */
+ private Composite processParameters(Composite cmp,
+ List<AnalyzeParameter> parameterList) {
+
+ GridLayout grid = new GridLayout(4, false);
+
+ Composite c = new Composite(cmp, SWT.NONE);
+ c.setLayout(grid);
+
+ ArrayList<Text> textList = new ArrayList<Text>();
+ setTextList(textList);
+
+ for (int i = 0; i < parameterList.size(); i++) {
+ AnalyzeParameter aParam = parameterList.get(i);
+
+ GridData sepData = new GridData();
+ sepData.widthHint = 65;
+ GridData dataLeft = new GridData(200, SWT.DEFAULT);
+ dataLeft.horizontalAlignment = SWT.CENTER;
+ GridData dataMid = new GridData(50, SWT.DEFAULT);
+ dataMid.widthHint = 50;
+ GridData dataRight = new GridData(150, SWT.DEFAULT);
+ dataRight.grabExcessHorizontalSpace = false;
+
+ // A Separator
+ Label sepLab = new Label(c, SWT.NONE);
+ sepLab.setLayoutData(sepData);
+ // This Label shows the name of the AnalyzeParameter
+ Label nameLabel = new Label(c, SWT.NONE);
+ nameLabel.setText(aParam.getName());
+ nameLabel.setLayoutData(dataLeft);
+
+ // This Label is used to show the ControlDecoration info-Image,
+ // without using the the ControlDecoration,to show the
+ // AnalyzeParameter description as a ToolTip
+ Label infoLabel = new Label(c, SWT.NONE);
+ infoLabel.setLayoutData(dataMid);
+ Image im = FieldDecorationRegistry
+ .getDefault()
+ .getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION)
+ .getImage();
+ infoLabel.setImage(im);
+ infoLabel.setToolTipText(aParam.getDescription());
+ // create the Text which is used to display the parameterValue
+ Text text = new Text(c, SWT.BORDER);
+ text.setLayoutData(dataRight);
+ text.setText(aParam.getValue());
+ text.setTextLimit(30);
+ text.setSize(100, 40);
+ // set the AnalyzeParameter as the TextData
+ text.setData(aParam);
+ text.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ Text text = (Text) e.widget;
+ AnalyzeParameter param = (AnalyzeParameter) text.getData();
+ param.setModifiedValue(text.getText());
+ }
+ });
+ // save the Text in an ArrayList
+ getTextList().add(text);
+ }
+ return c;
+ }
+
+ /**
+ * @return A List with the Text-Objects for the AnalyzeParameter values
+ */
+ public List<Text> getTextList() {
+ return m_textList;
+ }
+
+ /**
+ * @param textList The given List which includes the TextObjects
+ */
+ public void setTextList(List<Text> textList) {
+ this.m_textList = (ArrayList<Text>) textList;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/contributionitems/ContextMenuContributionItem.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/contributionitems/ContextMenuContributionItem.java
new file mode 100644
index 000000000..19e0ba49e
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/contributionitems/ContextMenuContributionItem.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * 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.ui.contributionitems;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jubula.client.analyze.ExtensionRegistry;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.Category;
+import org.eclipse.jubula.client.analyze.ui.internal.helper.ContextHelper;
+import org.eclipse.jubula.client.ui.utils.CommandHelper;
+import org.eclipse.ui.actions.CompoundContributionItem;
+import org.eclipse.ui.menus.CommandContributionItem;
+
+
+/**
+ * ContextMenuContributionItem is used to handle the creation of the ContributionItems ContextMenu
+ * @author volker
+ *
+ */
+public class ContextMenuContributionItem extends CompoundContributionItem {
+
+ /** the label shown in the menu */
+ private String m_label;
+
+ /** the attribute id from the actual Analyze */
+ private String m_currentID;
+
+ /** */
+ public ContextMenuContributionItem() {
+ }
+
+ /**
+ * @param id
+ * The id
+ */
+ public ContextMenuContributionItem(String id) {
+ super(id);
+ }
+
+ @Override
+ protected IContributionItem[] getContributionItems() {
+
+ List<IContributionItem> contributionItems =
+ new ArrayList<IContributionItem>();
+
+ for (Map.Entry<String, Category> e : ExtensionRegistry.getCategory()
+ .entrySet()) {
+
+ Category c = (Category) e.getValue();
+
+ createMenuEntry(c, contributionItems, null);
+
+ }
+ return contributionItems
+ .toArray(new IContributionItem[contributionItems.size()]);
+ }
+
+ /**
+ * creates a ContributionItem which represents a Category calls the
+ * createSubMenuEntry to create the ContributionItem which represents the
+ * Analyze
+ *
+ * @param c
+ * the given category
+ * @param contributionItems
+ * the contributionItems list
+ * @param mm
+ * MenuManager
+ */
+ private void createMenuEntry(Category c,
+ List<IContributionItem> contributionItems, MenuManager mm) {
+
+ // check if there is a ToplevelCategory
+ if (c.getParentCatID() == null || c.getParentCatID().length() == 0) {
+ contributionItems.add(createSubMenuEntry(c));
+ } else {
+ for (Map.Entry<String, Category> e : ExtensionRegistry.getCategory()
+ .entrySet()) {
+ Category cat = (Category) e.getValue();
+ if (cat.getID().equals(c.getParentCatID())) {
+ MenuManager mgr = new MenuManager(cat.getName());
+ mgr.add(createSubMenuEntry(c));
+ contributionItems.add(mgr);
+ contributionItems.add(new Separator());
+ }
+ }
+ }
+ }
+
+ /**
+ * creates the ContributionItem which represents the Analyze in the contextMenu
+ * @param c
+ * current Category
+ * @return mgr MenuManager
+ */
+ private MenuManager createSubMenuEntry(Category c) {
+ // Set the Command and the Command Parameters
+ String command = "org.eclipse.jubula.client.analyze.ui.RunSelection"; //$NON-NLS-1$
+ String idParam = "org.eclipse.jubula.client.analyze.ui.RunSelection.IDParam"; //$NON-NLS-1$
+
+ MenuManager mgr = new MenuManager(c.getName());
+ for (Map.Entry<String, Analyze> f : ExtensionRegistry.getAnalyze()
+ .entrySet()) {
+
+ Analyze analyze = f.getValue();
+
+ if (analyze.getCategoryID().equals(c.getID())
+ && ContextHelper.isEnabled(analyze)) {
+
+ // shown label
+ m_label = analyze.getName();
+ // current ID
+ m_currentID = analyze.getID();
+
+ Map<String, String> params = new HashMap<String, String>();
+
+ params.put(idParam, m_currentID);
+ IContributionItem item = CommandHelper.createContributionItem(
+ command, params, m_label,
+ CommandContributionItem.STYLE_PUSH);
+ mgr.add(item);
+ }
+ }
+ return mgr;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/contributionitems/ToolbarMenuContributionItem.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/contributionitems/ToolbarMenuContributionItem.java
new file mode 100644
index 000000000..8a4af46b7
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/contributionitems/ToolbarMenuContributionItem.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * 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.ui.contributionitems;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jubula.client.analyze.ExtensionRegistry;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.Category;
+import org.eclipse.jubula.client.analyze.ui.internal.helper.ContextHelper;
+import org.eclipse.jubula.client.ui.utils.CommandHelper;
+import org.eclipse.ui.actions.CompoundContributionItem;
+import org.eclipse.ui.menus.CommandContributionItem;
+
+
+/**
+ * ToolbarMenuContributionItem is used to handle the creation of the ContributionItems in the Toolbar
+ * @author volker
+ *
+ */
+public class ToolbarMenuContributionItem extends CompoundContributionItem {
+ /**
+ * the label shown in the menu
+ */
+ private String m_label;
+ /**
+ * the attribute id from the actual Analyze
+ */
+ private String m_currentID;
+
+ /**
+ *
+ */
+ public ToolbarMenuContributionItem() {
+ }
+
+ /**
+ *
+ * @param id
+ * id
+ */
+ public ToolbarMenuContributionItem(String id) {
+ super(id);
+ }
+
+ @Override
+ protected IContributionItem[] getContributionItems() {
+
+ List<IContributionItem> contributionItems =
+ new ArrayList<IContributionItem>();
+
+ for (Map.Entry<String, Category> e : ExtensionRegistry.getCategory()
+ .entrySet()) {
+ Category c = (Category) e.getValue();
+ createMenuEntry(c, contributionItems, null);
+ }
+ return contributionItems
+ .toArray(new IContributionItem[contributionItems.size()]);
+ }
+
+ /**
+ * creates a ContributionItem which represents a Category calls the
+ * createSubMenuEntry to create the ContributionItem which represents the
+ * Analyze
+ * @param c
+ * the given category
+ * @param contributionItems
+ * the contributionItems list
+ * @param mm
+ * MenuManager
+ */
+ private void createMenuEntry(Category c,
+ List<IContributionItem> contributionItems, MenuManager mm) {
+
+ // check if there is a ToplevelCategory
+ if (c.getParentCatID() == null || c.getParentCatID().length() == 0) {
+ contributionItems.add(createSubMenuEntry(c));
+ } else {
+ for (Map.Entry<String, Category> e : ExtensionRegistry.getCategory()
+ .entrySet()) {
+ Category cat = (Category) e.getValue();
+ if (cat.getID().equals(c.getParentCatID())) {
+ MenuManager mgr = new MenuManager(cat.getName());
+ mgr.add(createSubMenuEntry(c));
+ contributionItems.add(mgr);
+ contributionItems.add(new Separator());
+ }
+
+ }
+ }
+
+ }
+
+ /**
+ *
+ * creates the ContributionItem which represents the Analyze in the contextMenu
+ *
+ * @param c
+ * current Category
+ * @return mgr MenuManager
+ */
+ private MenuManager createSubMenuEntry(Category c) {
+ // Set the Command and the Command Parameters
+ String command = "org.eclipse.jubula.client.analyze.ui.RunSelection"; //$NON-NLS-1$
+ String idParam = "org.eclipse.jubula.client.analyze.ui.RunSelection.IDParam"; //$NON-NLS-1$
+
+ MenuManager mgr = new MenuManager(c.getName());
+ for (Map.Entry<String, Analyze> f : ExtensionRegistry.getAnalyze()
+ .entrySet()) {
+
+ Analyze analyze = f.getValue();
+
+ if (analyze.getCategoryID().equals(c.getID())
+ && ContextHelper.isEnabledProject(analyze)) {
+
+ // shown label
+ m_label = analyze.getName();
+ // current ID
+ m_currentID = analyze.getID();
+
+ Map<String, String> params = new HashMap<String, String>();
+
+ params.put(idParam, m_currentID);
+ IContributionItem item = CommandHelper.createContributionItem(
+ command, params, m_label,
+ CommandContributionItem.STYLE_PUSH);
+ mgr.add(item);
+ }
+ }
+ return mgr;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/handlers/RunSelectionHandler.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/handlers/RunSelectionHandler.java
new file mode 100644
index 000000000..d9d701a4a
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/handlers/RunSelectionHandler.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * 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.ui.handlers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jubula.client.analyze.ExtensionRegistry;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeParameter;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeRun;
+import org.eclipse.jubula.client.analyze.ui.components.AnalyzePreferenceDialog;
+import org.eclipse.jubula.client.analyze.ui.internal.Query;
+import org.eclipse.search.ui.NewSearchUI;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class RunSelectionHandler extends AbstractHandler {
+ /**
+ * Parameter given from the Command
+ */
+ private String m_idParam;
+
+ /**
+ * @param event
+ * event
+ * @return null
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ m_idParam = event.getParameter("org.eclipse.jubula.client.analyze.ui.RunSelection.IDParam"); //$NON-NLS-1$
+
+ Analyze ana = ExtensionRegistry.getAnalyze().get(m_idParam);
+
+ // This List is used to save the AnalyzeParameters
+
+ ArrayList<AnalyzeParameter> parameterList =
+ (ArrayList<AnalyzeParameter>) ana.getAnalyzeParameter();
+
+ // create a new AnalyzePreferenceDialog
+ AnalyzePreferenceDialog apd = new AnalyzePreferenceDialog(Display
+ .getDefault().getActiveShell(), parameterList);
+
+ if (!apd.getCancelStatus()) {
+
+ // fill the ArrayList with the Analyzes that are going to be
+ // executed
+ // and create the AnalyzeRun
+
+ ArrayList<Analyze> analyzeList = new ArrayList<Analyze>();
+ analyzeList.add(ana);
+ AnalyzeRun ar = new AnalyzeRun();
+ ar.createAnalyzeRun(analyzeList);
+
+ // create an run a new Query
+ runQuery(ar, event);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param run
+ * The given AnalyzeRun
+ * @param event
+ * The given Event
+ */
+ public void runQuery(AnalyzeRun run, ExecutionEvent event) {
+ Query query = new Query(run);
+
+ NewSearchUI.runQueryInForeground(
+ PlatformUI.getWorkbench().getProgressService(), query);
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/handlers/ToolbarButtonDefaultHandler.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/handlers/ToolbarButtonDefaultHandler.java
new file mode 100644
index 000000000..8f10b464d
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/handlers/ToolbarButtonDefaultHandler.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.ui.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+
+/**
+ * The DefaultHandler for the AnalyzeToolbarButton. Currently it returns null
+ * because it has no real function
+ *
+ * @author volker
+ *
+ */
+public class ToolbarButtonDefaultHandler extends AbstractHandler {
+
+ /**
+ * @param event The given event
+ * @return null
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ return null;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/i18n/Messages.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/i18n/Messages.java
new file mode 100644
index 000000000..551cb8bd2
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/i18n/Messages.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * 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.ui.i18n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * i18n string internationalization
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.jubula.client.analyze.ui.i18n.messages"; //$NON-NLS-1$
+
+ public static String CreateProfilContributionItem;
+ public static String RunningAnalyzes;
+ public static String NodeType;
+ public static String Amount;
+ public static String Running;
+ public static String AnalyzePreferenceDialog;
+ public static String AnalyzePreferenceDialogParameters;
+ public static String AnalyzePreferenceDialogAdjustNote;
+ public static String AnalyzePreferenceDialogName;
+ public static String AnalyzePreferenceDialogDefaultValue;
+ public static String AnalyzePreferenceDialogSeparator;
+ public static String AnalyzePreferenceDialogNoParameters;
+ public static String OKButton;
+ public static String DefaultsButton;
+ public static String Testsuite;
+ public static String Testcase;
+ public static String Category;
+ public static String ReferencedTestCase;
+ public static String ReferencedTestSuite;
+ public static String TestJob;
+ public static String TestStep;
+ public static String Project;
+ public static String ComponentName;
+
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ /**
+ * Constructor
+ */
+ private Messages() {
+ // hide
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/i18n/messages.properties b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/i18n/messages.properties
new file mode 100644
index 000000000..bc9c8b8f0
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/i18n/messages.properties
@@ -0,0 +1,23 @@
+RunningAnalyzes=Running analysis
+CreateProfilContributionItem=Create a profile ...
+NodeType=Elements
+Amount=Amount
+Running=Running:
+AnalyzePreferenceDialog=Analyze Preference Dialog
+AnalyzePreferenceDialogParameters=Parameters
+AnalyzePreferenceDialogAdjustNote=Please adjust the values or use the default ones.
+AnalyzePreferenceDialogName=Name
+AnalyzePreferenceDialogSeparator=
+AnalyzePreferenceDialogDefaultValue=Default value
+AnalyzePreferenceDialogNoParameters=Sorry, there aren't any parameters available.
+OKButton=OK
+DefaultsButton=Restore defaults
+Testsuite=Test Suites
+Testcase=User-defined Test Cases
+Category=Categories
+ReferencedTestCase=Referenced Test Cases
+ReferencedTestSuite=Referenced Test Suites
+TestJob=Test Jobs
+TestStep=Test Steps
+Project=Projects
+ComponentName=Component Names \ No newline at end of file
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/Query.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/Query.java
new file mode 100644
index 000000000..74e3ff444
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/Query.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * 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.ui.internal;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jubula.client.analyze.definition.IAnalyze;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeRun;
+import org.eclipse.jubula.client.analyze.ui.i18n.Messages;
+import org.eclipse.jubula.client.analyze.ui.internal.helper.ContextHelper;
+import org.eclipse.jubula.client.ui.rcp.search.query.AbstractSearchQuery;
+import org.eclipse.search.ui.ISearchQuery;
+import org.eclipse.search.ui.ISearchResult;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class Query extends AbstractSearchQuery implements ISearchQuery {
+
+ /** The QueryResult */
+ private QueryResult m_queryResult;
+
+ /** The AnalyzeRun*/
+ private AnalyzeRun m_analyzeRun;
+
+ /**
+ * @param analyzeRun The Analyze
+ */
+ public Query(AnalyzeRun analyzeRun) {
+ setAnalyzeRun(analyzeRun);
+ }
+
+ /**
+ * @param queryResult the queryResult to set
+ */
+ protected void setQueryResult(QueryResult queryResult) {
+ m_queryResult = queryResult;
+ }
+ /**
+ * {@inheritDoc}
+ */
+ public IStatus run(IProgressMonitor monitor)
+ throws OperationCanceledException {
+
+ try {
+ calculate(monitor);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ return monitor.isCanceled() ? Status.CANCEL_STATUS : Status.OK_STATUS;
+ }
+ /**
+ * executes the given AnalyseRun, creates and sets a QueryResult
+ * @param monitor monitor
+ * @throws InterruptedException
+ */
+ public void calculate(IProgressMonitor monitor)
+ throws InterruptedException {
+
+ Object node = ContextHelper.getSelection();
+ // New QueryResult
+ QueryResult qr = new QueryResult(this);
+
+ // set the workAmount which is used from the ProgressMonitor
+ int workAmount = this.getAnalyzeRun().getAnalyzeRunList().size();
+
+ monitor.beginTask(Messages.RunningAnalyzes, workAmount);
+
+ ArrayList<Analyze> anaList = new ArrayList<Analyze>(this
+ .getAnalyzeRun().getAnalyzeRunList());
+
+ for (int i = 0; i < anaList.size(); i++) {
+
+ IAnalyze executableExtension = (IAnalyze) anaList.get(i)
+ .getExecutableExtension();
+ monitor.subTask(Messages.Running + anaList.get(i).getName());
+
+ AnalyzeResult res = executableExtension.execute(node,
+ new SubProgressMonitor(monitor, 1), anaList.get(i)
+ .getResultType(), anaList.get(i)
+ .getAnalyzeParameter(), anaList.get(i).getName());
+ qr.getResultMap().put(anaList.get(i), res);
+ }
+ // Set the Query Result
+ setQueryResult(qr);
+ monitor.done();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getLabel() {
+ if (getAnalyzeRun().getAnalyzeRunList().size() == 1) {
+ // Add the actual TimeStamp to the AnalyzeName
+ return getTimestamp() + ": "
+ + getAnalyzeRun().getAnalyzeRunList().get(0).getName();
+ }
+ return "";
+ }
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canRerun() {
+ return true;
+ }
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canRunInBackground() {
+ return false;
+ }
+ /**
+ * {@inheritDoc}
+ */
+ public ISearchResult getSearchResult() {
+
+ return m_queryResult;
+ }
+ /**
+ *
+ * @return The AnalyzeRun
+ */
+ public AnalyzeRun getAnalyzeRun() {
+ return m_analyzeRun;
+ }
+ /**
+ *
+ * @param analyzeRun The AnalyzeRun
+ */
+ public void setAnalyzeRun(AnalyzeRun analyzeRun) {
+ this.m_analyzeRun = analyzeRun;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/QueryResult.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/QueryResult.java
new file mode 100644
index 000000000..cccbc436e
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/QueryResult.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.ui.internal;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+import org.eclipse.search.ui.ISearchQuery;
+import org.eclipse.search.ui.ISearchResult;
+import org.eclipse.search.ui.ISearchResultListener;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class QueryResult implements ISearchResult {
+
+ /**
+ * contains the Analyzes and its AnalyzeResults
+ */
+ private Map<Analyze, AnalyzeResult> m_result =
+ new HashMap<Analyze, AnalyzeResult>();
+
+ /** The Query */
+ private final Query m_query;
+
+ /**
+ * @param query the query
+ */
+ public QueryResult(Query query) {
+ this.m_query = query;
+ }
+
+ /** {@inheritDoc} */
+ public void addListener(ISearchResultListener l) {
+
+ }
+
+ /** {@inheritDoc} */
+ public void removeListener(ISearchResultListener l) {
+
+ }
+
+ /** {@inheritDoc} */
+ public String getLabel() {
+ return getQuery().getLabel();
+ }
+
+ /** {@inheritDoc} */
+ public String getTooltip() {
+ return getQuery().getLabel();
+ }
+
+ /** {@inheritDoc} */
+ public ImageDescriptor getImageDescriptor() {
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ public ISearchQuery getQuery() {
+ return m_query;
+ }
+ /**
+ * @return The QueryResult Map
+ */
+ public Map<Analyze, AnalyzeResult> getResultMap() {
+ return m_result;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/ResultPage.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/ResultPage.java
new file mode 100644
index 000000000..5312f453d
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/ResultPage.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * 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.ui.internal;
+
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jubula.client.analyze.ui.internal.listener.AnalyzeTreeViewerDoubleClickListener;
+import org.eclipse.jubula.client.analyze.ui.internal.provider.QueryTreeContentProvider;
+import org.eclipse.jubula.client.analyze.ui.internal.provider.QueryTreeLabelProvider;
+import org.eclipse.search.ui.ISearchResult;
+import org.eclipse.search.ui.ISearchResultPage;
+import org.eclipse.search.ui.ISearchResultViewPart;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.part.Page;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class ResultPage extends Page implements
+ ISearchResultPage {
+
+ /** The Control of the Page */
+ private Control m_control;
+
+ /** the ID */
+ private String m_id;
+
+ /** The queryResult */
+ private QueryResult m_queryResult;
+
+ /** The ListViewer of this class */
+ private TreeViewer m_tvl;
+
+ /** The Stack-Layout Composite with the sash */
+ private Composite m_stackComp;
+
+ /** The DoubleClickListener */
+ private AnalyzeTreeViewerDoubleClickListener m_listener;
+
+ /**
+ * @return m_lvr the TreeViewer of the ResultPage
+ */
+ public TreeViewer getLeftTreeViewer() {
+ return m_tvl;
+ }
+
+ /**
+ * @return Composite with the Stack-Layout Composite of this Page
+ */
+ public Composite getStackComposite() {
+ return m_stackComp;
+ }
+
+ /**
+ * @return The Click Listener of the Tree
+ */
+ public AnalyzeTreeViewerDoubleClickListener getListener() {
+ return m_listener;
+ }
+
+ /**
+ * @param listener The Listener that is to be set
+ */
+ public void setListener(AnalyzeTreeViewerDoubleClickListener listener) {
+ this.m_listener = listener;
+ }
+
+ /**
+ * @param comp
+ * The Composite with the Stack-Layout Composite of this Page
+ */
+ public void setStackComposite(Composite comp) {
+ this.m_stackComp = comp;
+ }
+ /**
+ * {@inheritDoc}
+ */
+ public void createControl(Composite parent) {
+ // create a new SashForm
+ SashForm sash = new SashForm(parent, SWT.HORIZONTAL);
+
+ // create a new TreeViewer
+ m_tvl = new TreeViewer(sash);
+ m_tvl.setContentProvider(new QueryTreeContentProvider());
+ m_tvl.setLabelProvider(new QueryTreeLabelProvider());
+
+ StackLayout stack = new StackLayout();
+
+
+ Composite cmp = new Composite(sash, SWT.NONE);
+ // use a StackLayout to enable to change the content of this Composite
+ cmp.setLayout(stack);
+ setStackComposite(cmp);
+ m_listener = new AnalyzeTreeViewerDoubleClickListener(cmp);
+ m_tvl.addDoubleClickListener(m_listener);
+ sash.setWeights(new int[] { 40, 60 });
+ // set the Control
+ setControl(sash);
+ }
+
+ /** {@inheritDoc} */
+ public void dispose() {
+ }
+ /**
+ * @param control
+ * the control to set
+ */
+ private void setControl(Control control) {
+ m_control = control;
+ }
+ /** {@inheritDoc} */
+ public Control getControl() {
+ return m_control;
+ }
+ /** {@inheritDoc} */
+ public void setFocus() {
+ this.getControl().setFocus();
+ }
+
+ /** {@inheritDoc} */
+ public Object getUIState() {
+ return null;
+ }
+ /** {@inheritDoc} */
+ public void setInput(ISearchResult search, Object uiState) {
+ m_queryResult = (QueryResult) search;
+
+ TreeViewer tv = new TreeViewer(getStackComposite());
+ StackLayout l = (StackLayout) getStackComposite().getLayout();
+
+ l.topControl = tv.getControl();
+ getStackComposite().layout();
+
+ getLeftTreeViewer().setInput(search);
+ getLeftTreeViewer().expandAll();
+ }
+ /** {@inheritDoc} */
+ public void setViewPart(ISearchResultViewPart part) {
+ }
+ /** {@inheritDoc} */
+ public void restoreState(IMemento memento) {
+ }
+ /** {@inheritDoc} */
+ public void saveState(IMemento memento) {
+ }
+ /** {@inheritDoc} */
+ public void setID(String id) {
+ m_id = id;
+ }
+
+ /** {@inheritDoc} */
+ public String getID() {
+ return m_id;
+ }
+ /** {@inheritDoc} */
+ public String getLabel() {
+ return "";
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/definition/IResultRendererUI.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/definition/IResultRendererUI.java
new file mode 100644
index 000000000..40eef238c
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/definition/IResultRendererUI.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.ui.internal.definition;
+
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public interface IResultRendererUI {
+ /**
+ * @param result The given AnalyzeResult
+ * @param composite The given Composite
+ */
+ void renderResult(AnalyzeResult result, Composite composite);
+
+ /**
+ * @return The TopControl of this Renderer. Can be null if there is no TopControl
+ */
+ Control getTopControl();
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/helper/AnalyzeTreeViewerInputHelper.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/helper/AnalyzeTreeViewerInputHelper.java
new file mode 100644
index 000000000..ad9210206
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/helper/AnalyzeTreeViewerInputHelper.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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.ui.internal.helper;
+
+import java.util.HashSet;
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.jubula.client.analyze.ExtensionRegistry;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+import org.eclipse.jubula.client.analyze.internal.Category;
+import org.eclipse.jubula.client.analyze.ui.internal.QueryResult;
+
+
+/**
+ * Handles the conversion of a given QueryResult, which is going to be used as a
+ * TreeInput
+ *
+ * @author volker
+ *
+ */
+public class AnalyzeTreeViewerInputHelper {
+
+ /** Empty because of HelperClass */
+ private AnalyzeTreeViewerInputHelper() {
+ }
+ /**
+ * This method is used to transform a given QueryResult to an Array
+ * which can be used as TreeInput
+ *
+ * @param object The given Object (a QueryResult)
+ * @return returns an Array of the ToplevelCategories
+ */
+ public static Object[] getTreeInput(Object object) {
+
+ QueryResult qr = (QueryResult) object;
+
+ HashSet<Category> categorySet = new HashSet<Category>();
+
+ for (Map.Entry<Analyze, AnalyzeResult> a : qr.getResultMap()
+ .entrySet()) {
+
+ Category c = ExtensionRegistry.getCategory().get(
+ a.getKey().getCategoryID());
+ // add the parent category of this category to the categorySet
+ categorySet.add(getRoot(c));
+ }
+ return categorySet.toArray();
+ }
+
+ /**
+ * This method returns the root Category of the given Category by calling
+ * itself recursively until the rootnode ist reached
+ *
+ * @param category
+ * The given Category
+ * @return Parent the parentObject
+ */
+ public static Category getRoot(Category category) {
+
+ Category parent = category;
+ if (!StringUtils.isEmpty(category.getParentCatID())) {
+
+ for (Map.Entry<String, Category> entry : ExtensionRegistry
+ .getCategory().entrySet()) {
+
+ if (category.getParentCatID().equals(entry.getKey())) {
+ parent = entry.getValue();
+
+ getRoot(parent);
+ }
+ }
+ }
+
+ return parent;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/helper/ContextHelper.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/helper/ContextHelper.java
new file mode 100644
index 000000000..5d96d1299
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/helper/ContextHelper.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * 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.ui.internal.helper;
+
+import java.util.Map;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jubula.client.analyze.ExtensionRegistry;
+import org.eclipse.jubula.client.analyze.definition.IContext;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.Context;
+import org.eclipse.jubula.client.core.model.IExecObjContPO;
+import org.eclipse.jubula.client.core.model.ISpecObjContPO;
+import org.eclipse.jubula.client.core.persistence.GeneralStorage;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class ContextHelper {
+
+ /** The Selection from the UI */
+ private static Object selection;
+
+ /** Empty because of HelperClass */
+ private ContextHelper() {
+ }
+
+ /**
+ * checks the the isActive state the the Analyzes' Context.
+ * @param analyze
+ * The Given Analyze
+ * @return true if the ContributionItem is enabled, false if it is disabled
+ * caused by a not matching Context
+ */
+ public static boolean isEnabled(Analyze analyze) {
+
+ String[] contextData = contextDataToArray(analyze.getContextType());
+
+ for (Map.Entry<String, Context> c : ExtensionRegistry.getContexts()
+ .entrySet()) {
+ Context context = c.getValue();
+
+ for (int i = 0; i < contextData.length; i++) {
+
+ // check if the Element is the Context of the given Analyze
+ if (contextData[i].equals(context.getID())) {
+
+ IContext iCon = (IContext) context.getContextInstance();
+
+ ISelectionService serv = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getSelectionService();
+ ISelection sel = serv.getSelection();
+
+ if (sel instanceof IStructuredSelection) {
+
+ IStructuredSelection structuredSel =
+ (IStructuredSelection) sel;
+
+ // if the Selection is an instance of IExecObjCont or ISpecObjCont
+ // it is handled as a project because IExecObjCont and ISpecObjCont
+ // Objects cannot be traversed by the TreeTraverser
+ if (structuredSel.getFirstElement()
+ instanceof IExecObjContPO
+ || structuredSel.getFirstElement()
+ instanceof ISpecObjContPO) {
+
+ setSelection(GeneralStorage.
+ getInstance().getProject());
+ } else {
+
+ setSelection(structuredSel.getFirstElement());
+ }
+ if (iCon.isActive(getSelection())) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+ /**
+ * checks the the isActive state the the Analyzes' Context.
+ * @param analyze
+ * The Given Analyze
+ * @return true if the ContributionItem is enabled, false if it is disabled
+ * caused by a not matching Context
+ */
+ public static boolean isEnabledProject(Analyze analyze) {
+
+ String[] contextData = contextDataToArray(analyze.getContextType());
+
+ for (Map.Entry<String, Context> c : ExtensionRegistry.getContexts()
+ .entrySet()) {
+ Context context = c.getValue();
+ IContext iCon = (IContext) context.getContextInstance();
+
+ for (int i = 0; i < contextData.length; i++) {
+
+ // check if the Context of the given Analyze is "projectLoaded"
+ if (contextData[i].equals("projectloaded")
+ && context.getID().equals("projectloaded")) {
+
+ if (GeneralStorage.getInstance().getProject() != null) {
+
+ setSelection(GeneralStorage.getInstance().getProject());
+ if (iCon.isActive(getSelection())) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns an Array of single ContextStrings from the given Analyzes
+ * ContextStrings
+ *
+ * @param context
+ * The given ContextString
+ * @return The ContextArray
+ */
+ public static String[] contextDataToArray(String context) {
+
+ final String pattern = ",";
+
+ Pattern p = Pattern.compile(pattern);
+ String[] contextData = p.split(context, 0);
+ for (int i = 0; i < contextData.length; i++) {
+ contextData[i] = contextData[i].trim().toLowerCase();
+ }
+ return contextData;
+ }
+
+ /**
+ * @return The Selection
+ */
+ public static Object getSelection() {
+ return selection;
+ }
+
+ /**
+ * @param sel
+ * The Selection
+ */
+ public static void setSelection(Object sel) {
+ ContextHelper.selection = sel;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/listener/AnalyzeTreeViewerDoubleClickListener.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/listener/AnalyzeTreeViewerDoubleClickListener.java
new file mode 100644
index 000000000..43edad856
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/listener/AnalyzeTreeViewerDoubleClickListener.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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.ui.internal.listener;
+
+import java.util.Map;
+
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+import org.eclipse.jubula.client.analyze.internal.Renderer;
+import org.eclipse.jubula.client.analyze.internal.helper.RendererSelectionHelper;
+import org.eclipse.jubula.client.analyze.ui.internal.QueryResult;
+import org.eclipse.jubula.client.analyze.ui.internal.definition.IResultRendererUI;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * Handles the DoubleClickBehavior of the Tree in the AnalyzeSearchResultView
+ * @author volker
+ *
+ */
+public class AnalyzeTreeViewerDoubleClickListener implements
+ IDoubleClickListener {
+
+ /** The ResultType */
+ private String m_resultType;
+
+ /** The chosen Renderer */
+ private IResultRendererUI m_chosenRenderer;
+
+ /** The Composite */
+ private final Composite m_comp;
+
+ /**
+ * The AnalyzeTreeViewerDoubleClickListener
+ * @param composite The given Composite
+ */
+ public AnalyzeTreeViewerDoubleClickListener(Composite composite) {
+ this.m_comp = composite;
+ }
+
+ /** @return The chosen Renderer */
+ public IResultRendererUI getChosenRenderer() {
+ return m_chosenRenderer;
+ }
+
+ /** @param renderer The Renderer that is to be set as the chosen Renderer for this Analyze */
+ public void setChosenRenderer (IResultRendererUI renderer) {
+ this.m_chosenRenderer = renderer;
+ }
+
+ /**
+ * @return The ResultType
+ */
+ public String getResultType() {
+ return m_resultType;
+ }
+
+ /**
+ * handles the behavior after a doubleClick on an Analyze in the AnalyzeTree
+ * @param event The given Event
+ */
+ public void doubleClick(DoubleClickEvent event) {
+ // get the QueryResult from the Viewer
+ QueryResult qr = (QueryResult) event.getViewer().getInput();
+ TreeSelection selection = (TreeSelection) event.getSelection();
+ // check if the selected element is an Analyze.
+ Object firstElement = selection.getFirstElement();
+ if (firstElement instanceof Analyze) {
+ Analyze analyze = (Analyze) firstElement;
+ AnalyzeResult result = null;
+
+ for (Map.Entry<Analyze, AnalyzeResult> a : qr
+ .getResultMap().entrySet()) {
+ if (analyze.getID().equals(a.getKey().getID())) {
+ result = a.getValue();
+ }
+ }
+
+ Renderer ren = RendererSelectionHelper.getActiveRenderer(analyze);
+ IResultRendererUI rendererUI = (IResultRendererUI) ren
+ .getRendererInstance();
+ setChosenRenderer(rendererUI);
+ rendererUI.renderResult(result, m_comp);
+
+ if (m_comp.getLayout() instanceof StackLayout) {
+ StackLayout sl = (StackLayout) m_comp.getLayout();
+ sl.topControl = rendererUI.getTopControl();
+ m_comp.layout();
+ }
+ }
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryAnalyzeResultListContentProvider.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryAnalyzeResultListContentProvider.java
new file mode 100644
index 000000000..20de5fe7e
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryAnalyzeResultListContentProvider.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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.ui.internal.provider;
+
+import java.util.Map;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+import org.eclipse.jubula.client.analyze.ui.internal.QueryResult;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class QueryAnalyzeResultListContentProvider implements
+ IStructuredContentProvider {
+ /**
+ * The QueryResult Member
+ */
+ private QueryResult m_qr;
+
+/**
+ * {@inheritDoc}
+ */
+ public void dispose() {
+ }
+
+/**
+ * {@inheritDoc}
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ this.m_qr = (QueryResult) newInput;
+ }
+
+/**
+ * {@inheritDoc}
+ */
+ public Object[] getElements(Object inputElement) {
+
+ int counter = 0;
+ // contains the String ResultValues
+ Object[] value = new Object[m_qr.getResultMap().size()];
+
+
+ for (Map.Entry<Analyze, AnalyzeResult> e : m_qr.getResultMap()
+ .entrySet()) {
+ // put the ResultValues in an Array
+ value[counter] = (Object) e.getValue().getResult();
+ counter++;
+ }
+
+ return value;
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryAnalyzeResultListLabelProvider.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryAnalyzeResultListLabelProvider.java
new file mode 100644
index 000000000..4d6639e44
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryAnalyzeResultListLabelProvider.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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.ui.internal.provider;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+/**
+ *
+ * @author volker
+ *
+ */
+public class QueryAnalyzeResultListLabelProvider extends LabelProvider {
+ /**
+ * @param element element
+ * @return null
+ */
+ public Image getImage(Object element) {
+ return null;
+ }
+ /**
+ * @param element element
+ * @return The Texts
+ */
+ public String getText(Object element) {
+ return element.toString();
+
+ }
+
+
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryTreeContentProvider.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryTreeContentProvider.java
new file mode 100644
index 000000000..0c00d0eef
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryTreeContentProvider.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * 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.ui.internal.provider;
+
+import java.util.HashSet;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jubula.client.analyze.ExtensionRegistry;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+import org.eclipse.jubula.client.analyze.internal.Category;
+import org.eclipse.jubula.client.analyze.ui.internal.QueryResult;
+import org.eclipse.jubula.client.analyze.ui.internal.helper.AnalyzeTreeViewerInputHelper;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class QueryTreeContentProvider implements ITreeContentProvider {
+
+ /**
+ *
+ */
+ private QueryResult m_qr;
+ /**
+ * {@inheritDoc}
+ */
+ public void dispose() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object[] getElements(Object inputElement) {
+ this.m_qr = (QueryResult) inputElement;
+
+ return AnalyzeTreeViewerInputHelper.getTreeInput(m_qr);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object[] getChildren(Object parentElement) {
+
+ // contains the given category or categories by parentElement
+ Category[] category;
+
+ // check if parentElement is instance of Category. If it is not element of
+ // Category it can only be an Category[]
+ if (!(parentElement instanceof Category)) {
+
+ Object[] parent = (Object[]) parentElement;
+ category = new Category[parent.length];
+
+ for (int i = 0; i < parent.length; i++) {
+ category[i] = (Category) parent[i];
+ }
+ } else {
+ category = new Category[1];
+ category[0] = (Category) parentElement;
+ }
+ // contains the ChildCategories
+ HashSet<Category> childCat = new HashSet<Category>();
+ // contains the Analyzes that were executed by the query
+ Analyze[] anaArray = new Analyze[m_qr.getResultMap().size()];
+ // run over the category array
+ for (int i = 0; i < category.length; i++) {
+ // get the registered categories from the ExtensionRegistry and that Category in
+ // the childCat Set, that is a child of the given Category
+ for (Map.Entry<String, Category> c : ExtensionRegistry.getCategory()
+ .entrySet()) {
+ Category ca = c.getValue();
+ if (ca.getParentCatID() != null
+ && ca.getParentCatID().equals(category[i].getID())) {
+ childCat.add(ca);
+ }
+ }
+ // if there are no ChildCategories get the Analyzes of the parentElement Category
+ if (childCat.size() == 0) {
+
+ int counter = 0;
+ for (Map.Entry<Analyze, AnalyzeResult> ana : m_qr.getResultMap()
+ .entrySet()) {
+ // check if the given category is the parent category of this analyze
+ // an put the analyze in the analyze array if its true
+ if (ana.getKey().getCategoryID()
+ .equals(category[i].getID())) {
+ anaArray[counter] = ana.getKey();
+ counter++;
+ }
+ }
+ }
+ }
+ if (childCat.size() != 0) {
+ return childCat.toArray();
+ } else {
+ return anaArray;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getParent(Object element) {
+ Category parentCategory = null;
+ if (element instanceof Analyze) {
+ Analyze analyze = (Analyze) element;
+ for (Map.Entry<String, Category> c : ExtensionRegistry
+ .getCategory().entrySet()) {
+ if (c.getKey().equals(analyze.getCategoryID())) {
+ parentCategory = c.getValue();
+ }
+ }
+ } else {
+ Category cat = (Category) element;
+ for (Map.Entry<String, Category> c : ExtensionRegistry
+ .getCategory().entrySet()) {
+ if (c.getKey().equals(cat.getParentCatID())) {
+ parentCategory = c.getValue();
+ }
+ }
+
+ }
+ return parentCategory;
+ }
+ /**
+ * {@inheritDoc}
+ */
+ public boolean hasChildren(Object element) {
+ return element instanceof Category;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryTreeLabelProvider.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryTreeLabelProvider.java
new file mode 100644
index 000000000..7396ebabf
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/internal/provider/QueryTreeLabelProvider.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.ui.internal.provider;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.Category;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class QueryTreeLabelProvider extends LabelProvider {
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getText(Object element) {
+ if (element instanceof Category) {
+ Category category = (Category) element;
+ return category.getName();
+ }
+ return ((Analyze) element).getName();
+
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/renderer/TableRenderer.java b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/renderer/TableRenderer.java
new file mode 100644
index 000000000..2098dfaa4
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze.ui/src/org/eclipse/jubula/client/analyze/ui/renderer/TableRenderer.java
@@ -0,0 +1,334 @@
+/*******************************************************************************
+ * 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.ui.renderer;
+
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+import org.eclipse.jubula.client.analyze.ui.i18n.Messages;
+import org.eclipse.jubula.client.analyze.ui.internal.definition.IResultRendererUI;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+
+
+/**
+ * @author volker
+ */
+public class TableRenderer implements IResultRendererUI {
+ /**
+ *
+ */
+ private AnalyzeResult m_analyzeResult;
+
+ /** The TopLevelControl of this Renderer */
+ private Control m_topControl;
+
+ /**
+ * The TableRenderer is able to display the AnalyzeResult as a Table
+ */
+ public TableRenderer() {
+ }
+
+ /** @return The TopControl of this Renderer */
+ public Control getTopControl() {
+ return m_topControl;
+ }
+
+ /**
+ * @param control
+ * The Control that is to be set as TopControl of this Renderer
+ */
+ public void setTopControl(Control control) {
+ this.m_topControl = control;
+ }
+
+ /**
+ * @param res
+ * The given AnalyzeResult
+ * @param composite
+ * The given Composite
+ */
+ public void renderResult(AnalyzeResult res, Composite composite) {
+ m_analyzeResult = res;
+
+ if (m_analyzeResult.getResult() instanceof Map) {
+ Map<String, String> resultMap = (Map<String, String>)
+ m_analyzeResult.getResult();
+ ArrayList<TableResult> resultList = new ArrayList<TableResult>();
+
+ for (Map.Entry<String, String> e : resultMap.entrySet()) {
+
+ TableResult tr = new TableResult();
+
+ if (String.valueOf(e.getKey()).equals(
+ "class org.eclipse.jubula.client.core.model.TestSuitePO")) { //$NON-NLS-1$
+ tr.setCol1(Messages.Testsuite);
+ } else if (String.valueOf(e.getKey()).equals(
+ "class org.eclipse.jubula.client.core.model.CategoryPO")) { //$NON-NLS-1$
+ tr.setCol1(Messages.Category);
+ } else if (String.valueOf(e.getKey()).equals(
+ "class org.eclipse.jubula.client.core.model.CapPO")) { //$NON-NLS-1$
+ tr.setCol1(Messages.TestStep);
+ } else if (String.valueOf(e.getKey()).equals(
+ "class org.eclipse.jubula.client.core.model.ExecTestCasePO")) { //$NON-NLS-1$
+ tr.setCol1(Messages.ReferencedTestCase);
+ } else if (String.valueOf(e.getKey()).equals(
+ "class org.eclipse.jubula.client.core.model.ProjectPO")) { //$NON-NLS-1$
+ tr.setCol1(Messages.Project);
+ } else if (String.valueOf(e.getKey()).equals(
+ "class org.eclipse.jubula.client.core.model.SpecTestCasePO")) { //$NON-NLS-1$
+ tr.setCol1(Messages.Testcase);
+ } else if (String.valueOf(e.getKey()).equals(
+ "class org.eclipse.jubula.client.core.model.TestJobPO")) { //$NON-NLS-1$
+ tr.setCol1(Messages.TestJob);
+ } else if (String.valueOf(e.getKey()).equals(
+ "class org.eclipse.jubula.client.core.model.RefTestSuitePO")) { //$NON-NLS-1$
+ tr.setCol1(Messages.ReferencedTestSuite);
+ } else if (String.valueOf(e.getKey()).equals(
+ "class org.eclipse.jubula.client.core.model.ComponentNamePO")) { //$NON-NLS-1$
+ tr.setCol1(Messages.ComponentName);
+ }
+ tr.setCol2(String.valueOf(e.getValue()));
+ resultList.add(tr);
+ }
+ createViewer(composite, resultList);
+ }
+ }
+
+ /**
+ * creates the TableViewer
+ *
+ * @param parent
+ * The parent Composite
+ * @param resultList
+ * The Given resultList
+ */
+ private void createViewer(Composite parent, List<TableResult> resultList) {
+ TableViewer tv = new TableViewer(parent);
+ createColumns(parent, tv);
+
+ Table table = tv.getTable();
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ tv.setContentProvider(new ArrayContentProvider());
+ // set the Sorter
+
+ tv.setSorter(new TableResultSorter());
+
+ tv.setInput(resultList);
+ // set the crontrol of the TreeViewer as the TopControl of this Renderer
+ setTopControl(tv.getControl());
+ }
+
+ /**
+ *
+ * @param cmp
+ * the parent composite
+ * @param viewer
+ * The TableViewer
+ */
+ private void createColumns(Composite cmp, TableViewer viewer) {
+ String[] titles = { Messages.NodeType, Messages.Amount };
+ int[] colType = { 0, 1 };
+
+ // set the bounds of the table to the aspect ratio 1/3 and 2/3
+ int c1 = (((cmp.getBounds().width) / 3) * 2);
+ int c2 = ((cmp.getBounds().width) / 3);
+ int[] bounds = { c1, c2 };
+ // First column
+ TableViewerColumn col = createTabelViewerColumn(titles[0], bounds[0],
+ viewer, colType[0]);
+ col.setLabelProvider(new ColumnLabelProvider() {
+ @Override
+ public String getText(Object element) {
+ TableResult tr = (TableResult) element;
+ return tr.getCol1();
+ }
+ });
+ // Second column
+ col = createTabelViewerColumn(titles[1], bounds[1], viewer, colType[1]);
+ col.setLabelProvider(new ColumnLabelProvider() {
+ @Override
+ public String getText(Object element) {
+
+ TableResult tr = (TableResult) element;
+ return tr.getCol2();
+ }
+ });
+ }
+
+ /**
+ * @param title
+ * The columnTitle
+ * @param bounds
+ * The bounds of the Column
+ * @param viewer
+ * The parent Viewer
+ * @param colType
+ * The columnType
+ * @return The TableViewerColumn
+ */
+ private TableViewerColumn createTabelViewerColumn(String title, int bounds,
+ TableViewer viewer, int colType) {
+
+ final TableViewerColumn viewerColumn = new TableViewerColumn(viewer,
+ SWT.NONE);
+
+ final int c = colType;
+
+ final TableColumn column = viewerColumn.getColumn();
+ final TableViewer tv = viewer;
+
+ column.setText(title);
+ column.setWidth(bounds);
+ column.setResizable(true);
+ column.setMoveable(true);
+ column.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent event) {
+ ((TableResultSorter) tv.getSorter()).doSort(c);
+ tv.refresh();
+ }
+ });
+ return viewerColumn;
+ }
+
+ /**
+ * This class is used to sort the TableResults
+ *
+ * @author volker
+ */
+ class TableResultSorter extends ViewerSorter {
+ /** */
+ private static final int ASCENDING = 0;
+ /** */
+ private static final int DESCENDING = 1;
+ /** */
+ private int m_column;
+ /** */
+ private int m_direction;
+
+ /**
+ * checks if the direction ascending/descending
+ *
+ * @param column
+ * the column that has to be sorted
+ */
+ public void doSort(int column) {
+ if (column == this.m_column) {
+ m_direction = 1 - m_direction;
+ } else {
+ this.m_column = column;
+ m_direction = ASCENDING;
+ }
+ }
+
+ /** {@inheritDoc} */
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ int rc = 0;
+ TableResult tr1 = (TableResult) e1;
+ TableResult tr2 = (TableResult) e2;
+
+ // create a new Collator for the comparison
+ Collator col = Collator.getInstance();
+ switch (m_column) {
+ case 0:
+ rc = col.compare(tr1.getCol1(), tr2.getCol1());
+ break;
+ case 1:
+ if (new Integer(tr1.getCol2())
+ < (new Integer(tr2.getCol2()))) {
+ rc = -1;
+ } else if (new Integer(tr1.getCol2()) == (new Integer(
+ tr2.getCol2()))) {
+ rc = 0;
+ } else if (new Integer(tr1.getCol2()) > (new Integer(
+ tr2.getCol2()))) {
+ rc = 1;
+ }
+ break;
+ default:
+ break;
+ }
+ if (m_direction == DESCENDING) {
+ rc = -rc;
+ }
+ return rc;
+ }
+ }
+
+ /**
+ * This class is used to provide a Result, that could be used from
+ * TableRenderer with two columns
+ *
+ * @author volker
+ *
+ */
+ public class TableResult {
+ /**
+ * the value which will be shown in the first column
+ */
+ private String m_col1;
+ /**
+ * the value which will be shown in the second column
+ */
+ private String m_col2;
+
+ /**
+ * the value which will be shown in the first column
+ *
+ * @return the value which will be shown in the first column
+ */
+ public String getCol1() {
+ return m_col1;
+ }
+
+ /**
+ * the value which will be shown in the first column
+ *
+ * @param col1
+ * the value which will be shown in the first column
+ */
+ public void setCol1(String col1) {
+ this.m_col1 = col1;
+ }
+
+ /**
+ * @return the value which will be shown in the second column
+ */
+ public String getCol2() {
+ return m_col2;
+ }
+
+ /**
+ * @param col2
+ * the value which will be shown in the second column
+ */
+ public void setCol2(String col2) {
+ this.m_col2 = col2;
+ }
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/.checkstyle b/org.eclipse.jubula.client.analyze/.checkstyle
new file mode 100644
index 000000000..e004d731f
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/.checkstyle
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true">
+ <fileset name="all" enabled="true" check-config-name="Jubula" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+ <filter name="FilesFromPackage" enabled="true">
+ <filter-data value="src/org/eclipse/jubula/client/analyze/i18n"/>
+ </filter>
+</fileset-config>
diff --git a/org.eclipse.jubula.client.analyze/.classpath b/org.eclipse.jubula.client.analyze/.classpath
new file mode 100644
index 000000000..64c5e31b7
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jubula.client.analyze/.gitignore b/org.eclipse.jubula.client.analyze/.gitignore
new file mode 100644
index 000000000..934e0e06f
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/.gitignore
@@ -0,0 +1,2 @@
+/bin
+/target
diff --git a/org.eclipse.jubula.client.analyze/.project b/org.eclipse.jubula.client.analyze/.project
new file mode 100644
index 000000000..cf5915375
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jubula.client.analyze</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jubula.client.analyze/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jubula.client.analyze/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..5e5224eac
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Dec 06 15:30:01 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.eclipse.jubula.client.analyze/META-INF/MANIFEST.MF b/org.eclipse.jubula.client.analyze/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..607e806dc
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Jubula Analyze Core
+Bundle-SymbolicName: org.eclipse.jubula.client.analyze;singleton:=true
+Bundle-Version: 1.2.0.qualifier
+Bundle-Activator: org.eclipse.jubula.client.analyze.Activator
+Bundle-Vendor: BREDEX GmbH
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.7.0.v20110110,4.0.0)",
+ org.slf4j.api;bundle-version="[1.5.11,2.0.0)",
+ org.eclipse.jubula.tools;bundle-version="[1.2.0,1.3.0)",
+ org.apache.commons.lang;bundle-version="[2.4.0,3.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.jubula.client.analyze,
+ org.eclipse.jubula.client.analyze.definition,
+ org.eclipse.jubula.client.analyze.internal,
+ org.eclipse.jubula.client.analyze.internal.helper
+
diff --git a/org.eclipse.jubula.client.analyze/build.properties b/org.eclipse.jubula.client.analyze/build.properties
new file mode 100644
index 000000000..9a76c051f
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/build.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ schema/,\
+ .,\
+ plugin.xml
diff --git a/org.eclipse.jubula.client.analyze/plugin.xml b/org.eclipse.jubula.client.analyze/plugin.xml
new file mode 100644
index 000000000..50c841df7
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ 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
+ -->
+<plugin>
+ <extension-point id="definition" name="AnalyzeDefinition" schema="schema/definition.exsd"/>
+
+</plugin>
diff --git a/org.eclipse.jubula.client.analyze/pom.xml b/org.eclipse.jubula.client.analyze/pom.xml
new file mode 100644
index 000000000..ba7157c98
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/pom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+ -->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>com.bredexsw.guidancer.project.configuration</artifactId>
+ <groupId>com.bredexsw.guidancer</groupId>
+ <version>6.0.0-SNAPSHOT</version>
+ <relativePath>../com.bredexsw.guidancer.project.configuration</relativePath>
+ </parent>
+ <groupId>org.eclipse.jubula</groupId>
+ <artifactId>org.eclipse.jubula.client.analyze</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.jubula.client.analyze/schema/definition.exsd b/org.eclipse.jubula.client.analyze/schema/definition.exsd
new file mode 100644
index 000000000..9891541b9
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/schema/definition.exsd
@@ -0,0 +1,286 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jubula.client.analyze" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.jubula.client.analyze" id="definition" name="AnalyzeDefinition"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="Analyze" minOccurs="1" maxOccurs="unbounded"/>
+ <element ref="ResultRenderer" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="Category"/>
+ <element ref="Context"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="Analyze">
+ <complexType>
+ <sequence>
+ <element ref="AnalyzeParameter" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jubula.client.analyze.definition.IAnalyze"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="CategoryID" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.jubula.client.analyze.definition/Category/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="ResultType" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.jubula.client.analyze.definition/ResultRenderer/@ResultType"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="ContextType" type="string" use="required">
+ <annotation>
+ <documentation>
+ ContextIDs separated by commas &apos; , &apos;
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="ResultRenderer">
+ <complexType>
+ <sequence>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="ResultType" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="rendererClass" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jubula.client.analyze.definition.IResultRenderer"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="Category">
+ <complexType>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="categoryid" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="Context">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jubula.client.analyze.definition.IContext"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="AnalyzeParameter">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="defaultValue" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/Activator.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/Activator.java
new file mode 100644
index 000000000..3d6423b17
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/Activator.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.jubula.client.analyze.constants.AnalyzeConstants;
+import org.osgi.framework.BundleContext;
+
+
+
+/**
+ * @author Volker Hotzan
+ */
+public class Activator extends Plugin {
+
+ /** The plug-in ID */
+ public static final String PLUGIN_ID =
+ AnalyzeConstants.PLUGIN_ID;
+
+ /** The shared instance */
+ private static Activator plugin;
+
+ /** Constructor */
+ public Activator() {
+ }
+
+ /** {@inheritDoc} */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ ExtensionRegistry.getInstance().start();
+ }
+
+ /** {@inheritDoc} */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ }
+
+ /** @return plugin */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/ExtensionRegistry.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/ExtensionRegistry.java
new file mode 100644
index 000000000..cf0b208b1
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/ExtensionRegistry.java
@@ -0,0 +1,305 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jubula.client.analyze.constants.AnalyzeConstants;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeParameter;
+import org.eclipse.jubula.client.analyze.internal.Category;
+import org.eclipse.jubula.client.analyze.internal.Context;
+import org.eclipse.jubula.client.analyze.internal.Renderer;
+import org.eclipse.jubula.tools.constants.DebugConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ *
+ * @author volker
+ *
+ */
+public class ExtensionRegistry {
+
+ /** the logger */
+ private static Logger log = LoggerFactory
+ .getLogger(ExtensionRegistry.class);
+
+ /** singleton */
+ private static ExtensionRegistry plugin;
+
+ /** HashMap of loaded Analyzes */
+ private static HashMap<String, Analyze> analyzeMap =
+ new HashMap<String, Analyze>();
+
+ /** HashMap of registered Renderer */
+ private static HashMap<String, Renderer> rendererMap =
+ new HashMap<String, Renderer>();
+
+ /** HashMap of registered Categories */
+ private static HashMap<String, Category> categoryMap =
+ new HashMap<String, Category>();
+
+ /** HashMap of registered Contexts */
+ private static HashMap<String, Context> contextMap =
+ new HashMap<String, Context>();
+
+ /** Constructor */
+ private ExtensionRegistry() {
+ }
+
+ /**
+ * @return unmodifiable Map of registered Analyzes
+ */
+ public static Map<String, Analyze> getAnalyze() {
+ return Collections.unmodifiableMap(analyzeMap);
+ }
+
+ /**
+ *
+ * @return unmodifiable Map of registered Renderer
+ */
+ public static Map<String, Renderer> getRenderer() {
+ return Collections.unmodifiableMap(rendererMap);
+ }
+
+ /**
+ * @return unmodifiable Map of registered Categories
+ */
+ public static Map<String, Category> getCategory() {
+ return Collections.unmodifiableMap(categoryMap);
+ }
+
+ /**
+ * @return unmodifiable Map of registered Contexts
+ */
+ public static Map<String, Context> getContexts() {
+ return Collections.unmodifiableMap(contextMap);
+ }
+
+ /**
+ * @return The Instance of the Plugin
+ */
+ public static ExtensionRegistry getInstance() {
+ if (plugin == null) {
+ plugin = new ExtensionRegistry();
+ }
+ return plugin;
+ }
+
+ /**
+ * @return all of the extensions my extension point provides
+ */
+ private static IExtension[] getExtensions() {
+ IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = extensionRegistry
+ .getExtensionPoint(AnalyzeConstants.EPDEF_ID);
+ return extensionPoint.getExtensions();
+ }
+
+ /**
+ * Initialization of all declared Analyzes
+ */
+ private static void initializeAnalyze() {
+ for (IExtension extension : getExtensions()) {
+ for (IConfigurationElement analyze : extension
+ .getConfigurationElements()) {
+ if (AnalyzeConstants.ANA.equals(analyze.getName())) {
+ handleAnalyze(analyze);
+ }
+ }
+ }
+ }
+
+ /**
+ * Initialization of all declared ResultRenderer
+ */
+ private static void initializeResultRenderer() {
+ for (IExtension extension : getExtensions()) {
+ for (IConfigurationElement renderer : extension
+ .getConfigurationElements()) {
+ if (AnalyzeConstants.RENDERER.equals(renderer.getName())) {
+ handleResultRenderer(renderer);
+ }
+ }
+ }
+ }
+
+ /**
+ * Initialization of all declared Categories
+ */
+ private static void initializeCategories() {
+ for (IExtension extension : getExtensions()) {
+ for (IConfigurationElement category : extension
+ .getConfigurationElements()) {
+ if (AnalyzeConstants.CATEGORY.equals(category.getName())) {
+ handleCategories(category);
+ }
+ }
+ }
+ }
+
+ /**
+ * Initialization of all declared Contexts
+ */
+ private static void initializeContexts() {
+ for (IExtension extension : getExtensions()) {
+ for (IConfigurationElement context : extension
+ .getConfigurationElements()) {
+ if (AnalyzeConstants.CONTEXT.equals(context.getName())) {
+ handleContexts(context);
+ }
+ }
+ }
+ }
+
+ /**
+ * loads all declared Analyzes with their AnalyzeParameters and fills the
+ * different HashMaps
+ *
+ * @param analyzeConfig
+ * the Analyze that is going to be handled
+ */
+ private static void handleAnalyze(IConfigurationElement analyzeConfig) {
+ try {
+ ArrayList<AnalyzeParameter> parameterList =
+ new ArrayList<AnalyzeParameter>();
+ // run over the AnalyzeParameter-children of the Analyze and write
+ // them in the AnalyzeParameterMap
+ for (IConfigurationElement param : analyzeConfig.getChildren()) {
+
+ AnalyzeParameter anaParam = new AnalyzeParameter(
+ param.getAttribute(AnalyzeConstants.PARAM_ID),
+ param.getAttribute(
+ AnalyzeConstants.PARAM_DEFAULT_VALUE),
+ param.getAttribute(AnalyzeConstants.PARAM_NAME),
+ param.getAttribute(AnalyzeConstants.PARAM_DESCRIPTION),
+ "");
+ parameterList.add(anaParam);
+ }
+
+ // write the just created createExecutableExtension and its id in
+ // the HashMap of the AnalzeCommandHandler
+ Analyze ana = new Analyze(
+ analyzeConfig.getAttribute(AnalyzeConstants.ANA_ID),
+ analyzeConfig.getAttribute(AnalyzeConstants.ANA_NAME),
+ analyzeConfig.getAttribute(AnalyzeConstants.ANA_CLASS),
+ analyzeConfig.getAttribute(AnalyzeConstants.ANA_CAT_ID),
+ analyzeConfig
+ .getAttribute(AnalyzeConstants.ANA_CONTEXT_TYPE),
+ analyzeConfig
+ .getAttribute(AnalyzeConstants.ANA_RESULT_TYPE));
+
+ ana.setExecutableExtension(analyzeConfig
+ .createExecutableExtension(AnalyzeConstants.ANA_CLASS));
+ ana.setAnalyzeParameter(parameterList);
+
+ // put the registered Analyze in the AnalyzeMap
+ analyzeMap.put(analyzeConfig.getAttribute(AnalyzeConstants.ANA_ID),
+ ana);
+ } catch (CoreException e) {
+ log.error(DebugConstants.ERROR, e);
+ }
+ }
+
+ /**
+ * loads all declared ResultRenderer and fills the HashMap
+ *
+ * @param rendererConfig
+ * the ResultRenderer that is going to be handled
+ */
+ private static void handleResultRenderer(
+ IConfigurationElement rendererConfig) {
+
+ try {
+ Renderer renderer = new Renderer(
+ rendererConfig.getAttribute(AnalyzeConstants.RENDERER_ID),
+ rendererConfig
+ .getAttribute(AnalyzeConstants.RENDERER_CLASS),
+ rendererConfig
+ .getAttribute(
+ AnalyzeConstants.RENDERER_RESULT_TYPE),
+ rendererConfig
+ .createExecutableExtension(
+ AnalyzeConstants.RENDERER_CLASS));
+ // put the registered Renderer in the RendererMap
+ rendererMap.put(
+ rendererConfig.getAttribute(AnalyzeConstants.RENDERER_ID),
+ renderer);
+ } catch (CoreException e) {
+ log.error(DebugConstants.ERROR, e);
+ }
+ }
+
+ /**
+ * loads all declared Categories and fills the HashMap
+ *
+ * @param categoryConfig
+ * the Category that is going to be handled
+ */
+ private static void handleCategories(IConfigurationElement categoryConfig) {
+
+ Category category = new Category(
+ categoryConfig.getAttribute(AnalyzeConstants.CATEGORY_ID),
+ categoryConfig.getAttribute(AnalyzeConstants.CATEGORY_NAME),
+ categoryConfig
+ .getAttribute(AnalyzeConstants.CATEGORY_TOP_CAT_ID));
+ // put the registered Category in the CategoryMap
+ categoryMap.put(
+ categoryConfig.getAttribute(AnalyzeConstants.CATEGORY_ID),
+ category);
+ }
+
+ /**
+ * loads all declared Contexts and fills the Context HashMap
+ *
+ * @param contextConfig
+ * the Category that is going to be handled
+ */
+ private static void handleContexts(IConfigurationElement contextConfig) {
+
+ Context context;
+ try {
+ context = new Context(
+ contextConfig.getAttribute(AnalyzeConstants.CONTEXT_ID),
+ contextConfig.getAttribute(AnalyzeConstants.CONTEXT_NAME),
+ contextConfig.createExecutableExtension(
+ AnalyzeConstants.CONTEXT_CLASS));
+ // put the registered Context in the ContextMap
+ contextMap.put(
+ contextConfig.getAttribute(AnalyzeConstants.CONTEXT_ID),
+ context);
+ } catch (CoreException e) {
+ log.error(DebugConstants.ERROR, e);
+ }
+ }
+
+ /**
+ * This method is called when the Bundle starts.
+ */
+ public void start() {
+
+ initializeAnalyze();
+ initializeResultRenderer();
+ initializeCategories();
+ initializeContexts();
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/constants/AnalyzeConstants.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/constants/AnalyzeConstants.java
new file mode 100644
index 000000000..1f326cec4
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/constants/AnalyzeConstants.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * 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.constants;
+/**
+ * This class includes the constants for the ANALYZE framework.
+ * @author volker
+ */
+public class AnalyzeConstants {
+
+
+ /*
+ * Constants for the ExtensionPoint Analyze
+ */
+ /** ID of the extension point definition */
+ public static final String EPDEF_ID = "org.eclipse.jubula.client.analyze.definition"; //$NON-NLS-1$
+ /** ID of the analyze Plugin */
+ public static final String PLUGIN_ID = "org.eclipse.jubula.analyze"; //$NON-NLS-1$
+
+ /*
+ * Constants for the analyze-Element in the Extension
+ */
+ /** The analyze */
+ public static final String ANA = "Analyze"; //$NON-NLS-1$
+ /** The name */
+ public static final String ANA_NAME = "name"; //$NON-NLS-1$
+ /** The id */
+ public static final String ANA_ID = "id"; //$NON-NLS-1$
+ /** The class*/
+ public static final String ANA_CLASS = "class"; //$NON-NLS-1$
+ /** The CategoryID */
+ public static final String ANA_CAT_ID = "CategoryID"; //$NON-NLS-1$
+ /** The ContextType */
+ public static final String ANA_CONTEXT_TYPE = "ContextType"; //$NON-NLS-1$
+ /** The ResultType */
+ public static final String ANA_RESULT_TYPE = "ResultType"; //$NON-NLS-1$
+
+ /*
+ * Constants for the AnalyzeParameter-Element in the Extension
+ */
+ /** The AnalyzeParameter */
+ public static final String PARAM = "AnalyzeParameter"; //$NON-NLS-1$
+ /** The AnalyzeParameterID */
+ public static final String PARAM_ID = "id"; //$NON-NLS-1$
+ /** The AnalyzeParamName */
+ public static final String PARAM_NAME = "name"; //$NON-NLS-1$
+ /** The AnalyzeParamDescription */
+ public static final String PARAM_DESCRIPTION = "description"; //$NON-NLS-1$
+ /** The AnalyzeParamDefaultVaule */
+ public static final String PARAM_DEFAULT_VALUE = "defaultValue"; //$NON-NLS-1$
+
+ /*
+ * Constants for the Context-Element in the Extension
+ */
+ /** The Context */
+ public static final String CONTEXT = "Context"; //$NON-NLS-1$
+ /** The ContextID*/
+ public static final String CONTEXT_ID = "id"; //$NON-NLS-1$
+ /** The ContextName */
+ public static final String CONTEXT_NAME = "name"; //$NON-NLS-1$
+ /** The ContextClass */
+ public static final String CONTEXT_CLASS = "class"; //$NON-NLS-1$
+
+ /*
+ * Constants for the ResultRenderer-Element in the Extension
+ */
+ /** The ResultRenderer */
+ public static final String RENDERER = "ResultRenderer"; //$NON-NLS-1$
+ /** The id */
+ public static final String RENDERER_ID = "id"; //$NON-NLS-1$
+ /** The ResultType */
+ public static final String RENDERER_RESULT_TYPE = "ResultType"; //$NON-NLS-1$
+ /** The class*/
+ public static final String RENDERER_CLASS = "rendererClass"; //$NON-NLS-1$
+
+ /*
+ * Constants for the Category-Element in the Extension
+ */
+ /** The Category */
+ public static final String CATEGORY = "Category"; //$NON-NLS-1
+ /** The id */
+ public static final String CATEGORY_ID = "id"; //$NON-NLS-1
+ /** The name */
+ public static final String CATEGORY_NAME = "name"; //$NON-NLS-1
+ /** The id of the topLevelCategory */
+ public static final String CATEGORY_TOP_CAT_ID = "categoryid"; //$NON-NLS-1
+
+ /**
+ * Empty constructor
+ */
+ private AnalyzeConstants() {
+
+ }
+
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IAnalyze.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IAnalyze.java
new file mode 100644
index 000000000..8a54370cc
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IAnalyze.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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.definition;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeParameter;
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+
+
+/**
+ * @author volker
+ */
+public interface IAnalyze {
+
+ /**
+ * executes the Analyze
+ * @param obj2analyze
+ * The Object that is going to be analyzed
+ * @param resultType
+ * The ResultType of this Analyze
+ * @param monitor
+ * The monitor
+ * @param param
+ * A Map which includes the Parameters
+ * of this Analyze
+ * @param analyzeName
+ * The name of the Analyze. It is used for the ProgressMonitor
+ * @return the AnalyzeResult
+ */
+ public AnalyzeResult execute(Object obj2analyze, IProgressMonitor monitor,
+ String resultType, List<AnalyzeParameter> param, String analyzeName);
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IContext.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IContext.java
new file mode 100644
index 000000000..fcc749699
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IContext.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.definition;
+
+
+/**
+ * @author volker
+ */
+public interface IContext {
+
+ /**
+ * checks if the Context is active or not
+ * @return true if the Context is active or not
+ * @param obj The Object that has to be checked
+ */
+ boolean isActive(Object obj);
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IResultRenderer.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IResultRenderer.java
new file mode 100644
index 000000000..6cba30b3d
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/definition/IResultRenderer.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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.definition;
+
+import org.eclipse.jubula.client.analyze.internal.AnalyzeResult;
+
+/**
+ *
+ * @author volker
+ *
+ */
+public interface IResultRenderer {
+ /**
+ * renders the given result
+ * @param result The given AnalyzeResult
+ */
+ void renderResult(AnalyzeResult result);
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/i18n/Messages.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/i18n/Messages.java
new file mode 100644
index 000000000..426348438
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/i18n/Messages.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.i18n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * i18n string internationalization
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.jubula.client.analyze.i18n.messages"; //$NON-NLS-1$
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+ /** Constructor */
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/i18n/messages.properties b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/i18n/messages.properties
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/i18n/messages.properties
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Analyze.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Analyze.java
new file mode 100644
index 000000000..79ef865c6
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Analyze.java
@@ -0,0 +1,196 @@
+/*******************************************************************************
+ * 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.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This class is a model for an Analyze. It is used to save the different
+ * attributes of an Analyze, when the Analyze is registered when the plugin
+ * starts.
+ *
+ * @author volker
+ *
+ */
+public class Analyze {
+ /** Analyze ID */
+ private String m_id;
+
+ /** Analyze Name */
+ private String m_name;
+
+ /** Analyze Class */
+ private String m_class;
+
+ /** Analyze CategoryID */
+ private String m_categoryID;
+
+ /** Analyze ContextType */
+ private String m_contextType;
+
+ /** Analyze ResultType */
+ private String m_resultType;
+
+ /** The Instance of this Analyze */
+ private Object m_executableExtension;
+
+ /** Map containing the Parameters of this Analyze */
+ private ArrayList<AnalyzeParameter> m_analyzeParameter;
+
+ /**
+ * @param id
+ * The Analyze-ID
+ * @param name
+ * The Analyze-Name
+ * @param clazz
+ * The Analyze-Class
+ * @param catID
+ * The CategoryID
+ * @param contextType
+ * The ContextType
+ * @param resultType
+ * The ResultType
+ */
+ public Analyze(String id, String name, String clazz, String catID,
+ String contextType, String resultType) {
+ setID(id);
+ setName(name);
+ setClass(clazz);
+ setCategoryID(catID);
+ setContextType(contextType);
+ setResultType(resultType);
+ }
+
+ ///////////////////////////
+ // Getters and Setters //
+ ///////////////////////////
+ /**
+ * @return The Analyze-Instance
+ */
+ public Object getExecutableExtension() {
+ return m_executableExtension;
+ }
+
+ /**
+ * @param executableExtension
+ * The Analyze-Instance
+ */
+ public void setExecutableExtension(Object executableExtension) {
+ this.m_executableExtension = executableExtension;
+ }
+
+ /**
+ * @return The Analyze-ID String
+ */
+ public String getID() {
+ return m_id;
+ }
+
+ /**
+ * @param id
+ * The Analyze-ID
+ */
+ public void setID(String id) {
+ this.m_id = id;
+ }
+
+ /**
+ * @return The Analyze-Name String
+ */
+ public String getName() {
+ return m_name;
+ }
+
+ /**
+ * @param name
+ * The Analyze-Name
+ */
+ public void setName(String name) {
+ this.m_name = name;
+ }
+
+ /**
+ * @return String Class
+ */
+ public String getAnalyzeClass() {
+ return m_class;
+ }
+
+ /**
+ * @param analyzeClass
+ * The Analyze-Class
+ */
+ public void setClass(String analyzeClass) {
+ this.m_class = analyzeClass;
+ }
+
+ /**
+ * @return The Category-ID String
+ */
+ public String getCategoryID() {
+ return m_categoryID;
+ }
+
+ /**
+ * @param categoryID
+ * The Category-ID
+ */
+ public void setCategoryID(String categoryID) {
+ this.m_categoryID = categoryID;
+ }
+
+ /**
+ * @return The ContextType String
+ */
+ public String getContextType() {
+ return m_contextType;
+ }
+
+ /**
+ * @param contextType
+ * The ContextType
+ */
+ public void setContextType(String contextType) {
+ this.m_contextType = contextType;
+ }
+
+ /**
+ * @return The resultType String
+ */
+ public String getResultType() {
+ return m_resultType;
+ }
+
+ /**
+ * @param resultType
+ * The resultType
+ */
+ public void setResultType(String resultType) {
+ this.m_resultType = resultType;
+ }
+
+ /**
+ * @param analyzeParameter
+ * A List which contains the AnalyzeParameters of this Analyze
+ */
+ public void setAnalyzeParameter(List<AnalyzeParameter> analyzeParameter) {
+ this.m_analyzeParameter =
+ (ArrayList<AnalyzeParameter>) analyzeParameter;
+ }
+
+ /**
+ * @return A List which contains the AnalyzeParameters of this Analyze
+ */
+ public List<AnalyzeParameter> getAnalyzeParameter() {
+ return m_analyzeParameter;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeParameter.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeParameter.java
new file mode 100644
index 000000000..7e896501d
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeParameter.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * 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.internal;
+
+import org.apache.commons.lang.StringUtils;
+/**
+ * This class is a model for an AnalyzeParameter. It is used to save the
+ * different attributes of an AnalyzeParameter, when the AnalyzeParameter is
+ * registered when the plugin starts.
+ *
+ * @author volker
+ *
+ */
+public class AnalyzeParameter {
+
+ /** The AnalyzeParameter-ID */
+ private String m_id;
+
+ /** The AnalyzeParameter-defaultValue */
+ private String m_defaultValue;
+
+ /** The AnalyzeParameter-modifiedValue */
+ private String m_modifiedValue;
+
+ /** The AnalyzeParameter-name */
+ private String m_name;
+
+ /** The AnalyzeParameter-description */
+ private String m_description;
+
+ /**
+ *
+ * @param id
+ * The AnalyzeParameter-ID
+ * @param defaultValue
+ * The AnalyzeParameter-DefaultVaule
+ * @param name
+ * The AnalyzeParameter-name
+ * @param description
+ * The AnalyzeParameter-description
+ * @param modifiedValue
+ * The AnalyzeParameter-modified value
+ */
+ public AnalyzeParameter(String id, String defaultValue, String name,
+ String description, String modifiedValue) {
+ setID(id);
+ setDefaultValue(defaultValue);
+ setName(name);
+ setDescription(description);
+ setModifiedValue(modifiedValue);
+ }
+
+ /**
+ * @return m_name The name of the AnalyzeParameter
+ */
+ public String getName() {
+ return m_name;
+ }
+
+ /**
+ * @param name
+ * The name of the AnalyzeParameter
+ */
+ public void setName(String name) {
+ this.m_name = name;
+ }
+
+ /**
+ * @return m_description The description of the AnalyzeParameter
+ */
+ public String getDescription() {
+ return m_description;
+ }
+
+ /**
+ * @param description
+ * The description of the AnalyzeParameterDescription
+ */
+ public void setDescription(String description) {
+ this.m_description = description;
+ }
+
+ /**
+ * @return The id of the AnalyzeParameter
+ */
+ public String getID() {
+ return m_id;
+ }
+
+ /**
+ * @param id
+ * The id of the AnalyzeParameter
+ */
+ public void setID(String id) {
+ this.m_id = id;
+ }
+
+ /**
+ * @return String The defaultValue of the AnalyzeParameter
+ */
+ public String getDefaultValue() {
+ return m_defaultValue;
+ }
+
+ /**
+ * @param defaultValue
+ * The defaultValue of the AnalyzeParameter
+ */
+ public void setDefaultValue(String defaultValue) {
+ this.m_defaultValue = defaultValue;
+ }
+
+ /**
+ * @return The modifiedValue of the AnalyzeParameter
+ */
+ public String getModifiedValue() {
+ return m_modifiedValue;
+ }
+
+ /**
+ * @param modifiedValue
+ * The modifiedValue of the AnalyzeParameter
+ */
+ public void setModifiedValue(String modifiedValue) {
+ this.m_modifiedValue = modifiedValue;
+ }
+ /**
+ * @return The defaultValue if there is no modified Value.
+ */
+ public String getValue() {
+ if (StringUtils.isEmpty(m_modifiedValue)) {
+ return m_defaultValue;
+ } else {
+ return m_modifiedValue;
+ }
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeResult.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeResult.java
new file mode 100644
index 000000000..3c60dc14a
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeResult.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * 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.internal;
+
+/**
+ * This class is a model for an AnalyzeResult. It is used to save the different
+ * attributes of an AnalyzeResult, when the AnalyzeResult is registered when the plugin
+ * starts.
+ * @author volker
+ *
+ */
+public class AnalyzeResult {
+
+ /**
+ * ResultType identifier for the Renderer selection in the ResultRendererHandler
+ * has to be int
+ */
+ private String m_rType = "";
+
+ /** Analyze ID */
+ private String m_analyzeID = "";
+
+ /** CategoryID */
+ private String m_catID = "";
+
+ /** ContextType */
+ private String m_context = "";
+
+ /** The result-Object */
+ private Object m_analyzeResult;
+
+ /**
+ * Constructor
+ * @param resultType The ResultType
+ * @param result The ResultValue
+ */
+ public AnalyzeResult(String resultType, Object result) {
+ setResultType(resultType);
+ setResult(result);
+ }
+ /**
+ * @return The resultType
+ */
+ public String getResultType() {
+ return m_rType;
+ }
+
+ /**
+ * @param resultType The resultType
+ */
+ public void setResultType(String resultType) {
+ m_rType = resultType;
+ }
+
+ /**
+ * @return ID The ID of the results Analyze
+ */
+ public String getId() {
+ return m_analyzeID;
+ }
+
+ /**
+ * @param id The ID of the results Analyze
+ */
+ public void setID(String id) {
+ m_analyzeID = id;
+ }
+
+ /**
+ * @return The resultValue of this analyze
+ */
+ public Object getResult() {
+ return m_analyzeResult;
+ }
+
+ /**
+ * @param result The resultValue of this Analyze
+ */
+ private void setResult(Object result) {
+ m_analyzeResult = result;
+ }
+
+ /**
+ * @return The CategoryID
+ */
+ public String getCategoryID() {
+ return m_catID;
+ }
+
+ /**
+ * @param categoryID The CategoryID
+ */
+ public void setCategoryID(String categoryID) {
+ m_catID = categoryID;
+ }
+
+ /**
+ * @return The contextType
+ */
+ public String getContextType() {
+ return m_context;
+ }
+
+ /**
+ * @param contextType The contextType
+ */
+ public void setContextType(String contextType) {
+ m_context = contextType;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeRun.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeRun.java
new file mode 100644
index 000000000..0b1d99896
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/AnalyzeRun.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * An AnalyzeRun contains at least one Analyze. If there is more than one Analyze in an
+ * AnalyzeRun, they will be executed one after another.
+ * @author volker
+ *
+ */
+public class AnalyzeRun {
+ /**
+ * This List represents an AnalyzeRun. It contains every Analyze that has to be executed
+ */
+ private ArrayList<Analyze> m_runList;
+ /**
+ * @param runList The given AnalyzeRun List
+ */
+ public void setAnalyzeRunMap(List<Analyze> runList) {
+ this.m_runList = new ArrayList<Analyze>(runList);
+ }
+ /**
+ * @return The AnalyzeRun represented as a List of Analyzes
+ */
+ public List<Analyze> getAnalyzeRunList() {
+ return m_runList;
+ }
+ /**
+ * This method creates the AnalyzeRun
+ * @param analyzeList The given List contains the Analyzes to be run
+ * @return The AnalyzeRun ArrayList
+ *
+ */
+ public List<Analyze> createAnalyzeRun(List<Analyze> analyzeList) {
+ this.setAnalyzeRunMap(analyzeList);
+ return m_runList;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Category.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Category.java
new file mode 100644
index 000000000..840917828
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Category.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * 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.internal;
+
+/**
+ * This class is a model for a Category. It is used to save the different
+ * attributes of a Category, when the Category is registered when the plugin
+ * starts.
+ *
+ * @author volker
+ *
+ */
+public class Category {
+
+ /** The Category ID */
+ private String m_id;
+
+ /** The Category Name */
+ private String m_name;
+
+ /** The ParentCategoryID */
+ private String m_parentCatID;
+
+
+ /**
+ * @param id The CategoryID
+ * @param name The Category-Name
+ * @param parentCatID The ParentCategoryID
+ */
+ public Category(String id, String name, String parentCatID) {
+ setID(id);
+ setName(name);
+ setParentCatID(parentCatID);
+ }
+
+ /////////////////////////
+ // Getters and Setters //
+ /////////////////////////
+
+ /**
+ * @return The CategoryID
+ */
+ public String getID() {
+ return m_id;
+ }
+
+ /**
+ * @param id The CategoryID
+ */
+ public void setID(String id) {
+ this.m_id = id;
+ }
+
+ /**
+ * @return The Category-Name
+ */
+ public String getName() {
+ return m_name;
+ }
+
+ /**
+ * @param name The Category-Name
+ */
+ public void setName(String name) {
+ this.m_name = name;
+ }
+
+ /**
+ * @return String ParentCategoryID
+ */
+ public String getParentCatID() {
+ return m_parentCatID;
+ }
+
+ /**
+ * @param parentCatID The ParentCategoryID
+ */
+ public void setParentCatID(String parentCatID) {
+ this.m_parentCatID = parentCatID;
+ }
+
+ /**
+ * Checks if there is a ParentCategory
+ * @return returns true if there is a ParentCategory
+ */
+ public boolean hasTopLevelCat() {
+ if (this.getParentCatID() == null
+ || this.getParentCatID().length() == 0) {
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Context.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Context.java
new file mode 100644
index 000000000..23d943cb7
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Context.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * 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.internal;
+/**
+ * This class is a model for a Context. It is used to save the different
+ * attributes of a Context, when the Context is registered when the plugin
+ * starts.
+ * @author volker
+ *
+ */
+public class Context {
+
+ /** The Context ID */
+ private String m_id;
+
+ /** The Context ID */
+ private String m_name;
+
+ /** The Instance of this context (Executable Extension) */
+ private Object m_contextInstance;
+
+ /**
+ * @param contextID The given contextType
+ * @param name The given contextName
+ * @param executableExtension The given Instance of this Context
+ */
+ public Context(String contextID, String name, Object executableExtension) {
+ setID(contextID);
+ setName(name);
+ setContextInstance(executableExtension);
+ }
+
+ /**
+ * @return The ContextID
+ */
+ public String getID() {
+ return m_id;
+ }
+
+ /**
+ * @param id
+ * The given ContextID
+ */
+ public void setID(String id) {
+ this.m_id = id;
+ }
+
+ /**
+ * @return The Context-Name
+ */
+ public String getName() {
+ return m_name;
+ }
+
+ /**
+ * @param name
+ * The Context-Name
+ */
+ public void setName(String name) {
+ this.m_name = name;
+ }
+
+ /**
+ * @return The Instance of this Context (Executable Extension)
+ */
+ public Object getContextInstance() {
+ return m_contextInstance;
+ }
+
+ /**
+ * @param executableExtension The Instance of this Context (Executable Extension)
+ */
+ public void setContextInstance(Object executableExtension) {
+ this.m_contextInstance = executableExtension;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Renderer.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Renderer.java
new file mode 100644
index 000000000..aabc8473a
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/Renderer.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * 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.internal;
+/**
+ * This class is a model for a Renderer. It is used to save the different
+ * attributes of a Renderer, when the Renderer is registered when the plugin
+ * starts. *
+ * @author volker
+ */
+public class Renderer {
+ /** Renderer-ID */
+ private String m_id;
+
+ /** Renderer-Class */
+ private String m_class;
+
+ /** Analyze ResultType */
+ private String m_resultType;
+
+ /** The Instance of this Renderer */
+ private Object m_executableExtension;
+
+ /**
+ * @param rendererId Renderer-ID
+ * @param rendererClass Renderer-Class
+ * @param rendererResultType The Analyze ResultType
+ * @param obj The Instance of this Renderer
+ */
+ public Renderer(String rendererId, String rendererClass,
+ String rendererResultType, Object obj) {
+ setID(rendererId);
+ setClass(rendererClass);
+ setResultType(rendererResultType);
+ setRendererInstance(obj);
+ }
+
+ /////////////////////////
+ // Getters and Setters //
+ /////////////////////////
+ /**
+ * @return The Instance of this Renderer
+ */
+ public Object getRendererInstance() {
+ return m_executableExtension;
+ }
+
+ /**
+ * @param executableExtension The Instance of this Renderer
+ */
+ public void setRendererInstance(Object executableExtension) {
+ this.m_executableExtension = executableExtension;
+ }
+
+ /**
+ * @return The RendererID
+ */
+ public String getID() {
+ return m_id;
+ }
+ /**
+ *
+ * @param id The Renderer ID
+ */
+ public void setID(String id) {
+ this.m_id = id;
+ }
+
+ /**
+ * @return The RendererClass
+ */
+ public String getRendererClass() {
+ return m_class;
+ }
+
+ /**
+ * @param rendererClass The RendererClass
+ */
+ public void setClass(String rendererClass) {
+ this.m_class = rendererClass;
+ }
+
+ /**
+ * @return String The resultType
+ */
+ public String getResultType() {
+ return m_resultType;
+ }
+
+ /**
+ * @param resultType The resultType
+ */
+ public void setResultType(String resultType) {
+ this.m_resultType = resultType;
+ }
+}
diff --git a/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/helper/RendererSelectionHelper.java b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/helper/RendererSelectionHelper.java
new file mode 100644
index 000000000..1daefc82f
--- /dev/null
+++ b/org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/internal/helper/RendererSelectionHelper.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.internal.helper;
+
+import java.util.Map;
+
+import org.eclipse.jubula.client.analyze.ExtensionRegistry;
+import org.eclipse.jubula.client.analyze.internal.Analyze;
+import org.eclipse.jubula.client.analyze.internal.Renderer;
+
+/**
+ * Helper to select the Renderer for the AnalyzeResult
+ *
+ * @author volker
+ *
+ */
+public class RendererSelectionHelper {
+ /** Empty Constructor for this HelperClass */
+ private RendererSelectionHelper() {
+ }
+
+ /**
+ * Checks which Renderer has to be taken to render the result of this
+ * Analyze
+ *
+ * @param analyze
+ * The given Analyze
+ * @return The active Renderer or null if no matching Renderer could be
+ * found
+ */
+ public static Renderer getActiveRenderer(Analyze analyze) {
+ for (Map.Entry<String, Renderer> e : ExtensionRegistry.getRenderer()
+ .entrySet()) {
+ Renderer r = e.getValue();
+ if (r.getResultType().equals(analyze.getResultType())) {
+ return r;
+ }
+ }
+ return null;
+ }
+}

Back to the top