Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/org.eclipse.osee.ats.feature.source/feature.xml7
-rw-r--r--features/org.eclipse.osee.ats.feature/feature.xml7
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/META-INF/MANIFEST.MF52
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/build.properties12
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/plugin.xml8
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/hours/HourBurndownTab.java27
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/issues/IssueBurndownTab.java27
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/AbstractBurndownTab.java74
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurdownInputParameters.java39
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownAtsReport.java86
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownItem.java105
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java121
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/LoadBurndownDataOperation.java70
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/ProjectModuleReports.java42
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/META-INF/MANIFEST.MF42
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/build.properties13
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/plugin.xml11
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java92
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyItem.java96
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/LoadEfficiencyDataOperation.java45
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/TeamEfficiencyLineTab.java82
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/TeamEfficiencyTab.java82
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/META-INF/MANIFEST.MF50
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/build.properties14
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/plugin.xml11
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionAtsReport.java84
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionItem.java104
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/LoadDistributionDataOperation.java54
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/ai/AITab.java83
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/state/StateTab.java81
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/team/TeamTab.java81
-rw-r--r--plugins/org.eclipse.osee.ats.reports/.classpath7
-rw-r--r--plugins/org.eclipse.osee.ats.reports/.project28
-rw-r--r--plugins/org.eclipse.osee.ats.reports/META-INF/MANIFEST.MF26
-rw-r--r--plugins/org.eclipse.osee.ats.reports/build.properties9
-rw-r--r--plugins/org.eclipse.osee.ats.reports/plugin.xml11
-rw-r--r--plugins/org.eclipse.osee.ats.reports/pom.xml35
-rw-r--r--plugins/org.eclipse.osee.ats.reports/schema/AtsReportItem.exsd102
-rw-r--r--plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/AtsReport.java34
-rw-r--r--plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/ReportTabFactory.java29
-rw-r--r--plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/Activator.java37
-rw-r--r--plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/AtsReportXNavigateItemAction.java59
-rw-r--r--plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/BirtReportViewerTab.java71
-rw-r--r--plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/ProjectModuleReports.java44
-rw-r--r--plugins/org.eclipse.osee.client.parent/pom.xml1
45 files changed, 1184 insertions, 1011 deletions
diff --git a/features/org.eclipse.osee.ats.feature.source/feature.xml b/features/org.eclipse.osee.ats.feature.source/feature.xml
index b5fc0cdeef..c9b834e73c 100644
--- a/features/org.eclipse.osee.ats.feature.source/feature.xml
+++ b/features/org.eclipse.osee.ats.feature.source/feature.xml
@@ -74,6 +74,13 @@
unpack="false"/>
<plugin
+ id="org.eclipse.osee.ats.reports.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
id="org.eclipse.osee.ats.reports.burndown.source"
download-size="0"
install-size="0"
diff --git a/features/org.eclipse.osee.ats.feature/feature.xml b/features/org.eclipse.osee.ats.feature/feature.xml
index 287db31d3e..816bfcb378 100644
--- a/features/org.eclipse.osee.ats.feature/feature.xml
+++ b/features/org.eclipse.osee.ats.feature/feature.xml
@@ -74,6 +74,13 @@
unpack="false"/>
<plugin
+ id="org.eclipse.osee.ats.reports"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
id="org.eclipse.osee.ats.reports.burndown"
download-size="0"
install-size="0"
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.reports.burndown/META-INF/MANIFEST.MF
index 53cb7c7c2b..3844bd19d8 100644
--- a/plugins/org.eclipse.osee.ats.reports.burndown/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.reports.burndown/META-INF/MANIFEST.MF
@@ -1,29 +1,39 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Burndown
+Bundle-Name: OSEE ATS Burndown Reports (Incubation)
Bundle-SymbolicName: org.eclipse.osee.ats.reports.burndown;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 0.10.3.qualifier
Bundle-Activator: org.eclipse.osee.ats.reports.burndown.Activator
-Bundle-Vendor: BOSCH
+Bundle-Vendor: Eclipse Open System Engineering Environment
Require-Bundle: org.eclipse.ui,
- org.eclipse.birt.report.viewer,
- org.eclipse.birt.chart.engine,
- org.eclipse.osee.ats,
- org.eclipse.osee.framework.core,
- org.eclipse.osee.framework.logging,
- org.eclipse.osee.framework.skynet.core,
- org.eclipse.osee.framework.ui.plugin,
- org.eclipse.osee.framework.ui.swt,
- org.eclipse.osee.framework.ui.skynet,
- org.eclipse.osee.ats.reports.efficiency,
- org.eclipse.osee.ats.reports.split,
- org.eclipse.osee.ats.core.client,
- org.eclipse.osee.ats.api,
- org.eclipse.osee.ats.core,
- org.eclipse.osee.framework.core.model,
org.eclipse.ui.forms
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.osee.ats.reports.burndown.hours,
- org.eclipse.osee.ats.reports.burndown.issues,
- org.eclipse.osee.ats.reports.burndown.ui
+Import-Package: org.eclipse.core.runtime,
+ org.eclipse.osee.ats,
+ org.eclipse.osee.ats.api,
+ org.eclipse.osee.ats.api.data,
+ org.eclipse.osee.ats.api.team,
+ org.eclipse.osee.ats.api.version,
+ org.eclipse.osee.ats.core.client.config,
+ org.eclipse.osee.ats.core.client.config.store,
+ org.eclipse.osee.ats.core.client.team,
+ org.eclipse.osee.ats.core.client.workflow,
+ org.eclipse.osee.ats.core.client.workflow.log,
+ org.eclipse.osee.ats.core.config,
+ org.eclipse.osee.ats.reports,
+ org.eclipse.osee.framework.core.data,
+ org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.core.exception,
+ org.eclipse.osee.framework.core.model,
+ org.eclipse.osee.framework.core.operation,
+ org.eclipse.osee.framework.core.util,
+ org.eclipse.osee.framework.logging,
+ org.eclipse.osee.framework.skynet.core.artifact,
+ org.eclipse.osee.framework.ui.plugin.xnavigate,
+ org.eclipse.osee.framework.ui.skynet,
+ org.eclipse.osee.framework.ui.skynet.results,
+ org.eclipse.osee.framework.ui.skynet.util,
+ org.eclipse.osee.framework.ui.skynet.widgets,
+ org.eclipse.osee.framework.ui.swt,
+ org.osgi.framework
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/build.properties b/plugins/org.eclipse.osee.ats.reports.burndown/build.properties
index bcaa80baf7..5062013ba2 100644
--- a/plugins/org.eclipse.osee.ats.reports.burndown/build.properties
+++ b/plugins/org.eclipse.osee.ats.reports.burndown/build.properties
@@ -4,3 +4,15 @@ bin.includes = META-INF/,\
.,\
plugin.xml,\
reports/
+additional.bundles = org.eclipse.osee.ats.reports,\
+ org.eclipse.osee.framework.core,\
+ org.eclipse.osee.framework.logging,\
+ org.eclipse.osee.ats,\
+ org.eclipse.osee.framework.core.model,\
+ org.eclipse.osee.framework.ui.plugin,\
+ org.eclipse.osee.framework.skynet.core,\
+ org.eclipse.osee.framework.ui.skynet,\
+ org.eclipse.osee.framework.ui.swt,\
+ org.eclipse.osee.ats.core,\
+ org.eclipse.osee.ats.core.client,\
+ org.eclipse.osee.ats.api
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/plugin.xml b/plugins/org.eclipse.osee.ats.reports.burndown/plugin.xml
index a607a62f29..6ccbf68961 100644
--- a/plugins/org.eclipse.osee.ats.reports.burndown/plugin.xml
+++ b/plugins/org.eclipse.osee.ats.reports.burndown/plugin.xml
@@ -2,10 +2,10 @@
<?eclipse version="3.4"?>
<plugin>
<extension
- point="org.eclipse.osee.ats.AtsNavigateItem">
- <AtsNavigateItem
- classname="org.eclipse.osee.ats.reports.burndown.ui.ProjectModuleReports">
- </AtsNavigateItem>
+ point="org.eclipse.osee.ats.reports.AtsReportItem">
+ <AtsReportItem
+ classname="org.eclipse.osee.ats.reports.burndown.ui.BurndownAtsReport">
+ </AtsReportItem>
</extension>
</plugin>
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/hours/HourBurndownTab.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/hours/HourBurndownTab.java
deleted file mode 100644
index 3fd3ab7964..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/hours/HourBurndownTab.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.burndown.hours;
-
-import org.eclipse.osee.ats.reports.burndown.ui.AbstractBurndownTab;
-
-/**
- * Class that represents the UI Component
- *
- * @author Praveen Joseph
- */
-public class HourBurndownTab extends AbstractBurndownTab {
-
- @Override
- public String getTabName() {
- return "Hour Burndown";
- }
-
- @Override
- public String getReport() {
- return "HourBurndown.rptdesign";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/issues/IssueBurndownTab.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/issues/IssueBurndownTab.java
deleted file mode 100644
index e101b50f01..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/issues/IssueBurndownTab.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.burndown.issues;
-
-import org.eclipse.osee.ats.reports.burndown.ui.AbstractBurndownTab;
-
-/**
- * Class representing the UI Component
- *
- * @author Praveen Joseph
- */
-public class IssueBurndownTab extends AbstractBurndownTab {
-
- @Override
- public String getTabName() {
- return "Issue Burndown";
- }
-
- @Override
- public String getReport() {
- return "IssueBurndown.rptdesign";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/AbstractBurndownTab.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/AbstractBurndownTab.java
deleted file mode 100644
index 59a3ee6aea..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/AbstractBurndownTab.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.burndown.ui;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.birt.report.viewer.utilities.WebViewer;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osee.ats.reports.burndown.Activator;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.widgets.Composite;
-import org.osgi.framework.Bundle;
-
-/**
- * Class that implements IResultsEditorTab to crate the tab in the UI
- *
- * @author Praveen Joseph
- */
-public abstract class AbstractBurndownTab implements IResultsEditorTab {
-
- private Browser browser;
-
- @SuppressWarnings("deprecation")
- @Override
- public Composite createTab(final Composite parent, final ResultsEditor resultsEditor) {
-
- String path = getReportPath();
- this.browser = new Browser(parent, SWT.NONE);
- WebViewer.display(path, WebViewer.HTML, this.browser, "frameset");
- this.browser.refresh();
- return this.browser;
- }
-
- /**
- * @return the report path
- */
- public String getReportPath() {
- String path = null;
- try {
- Bundle bundle = Platform.getBundle(getPluginID());
- URL url = FileLocator.find(bundle, new Path("reports/" + getReport()), null);
- path = FileLocator.toFileURL(url).getPath();
- } catch (MalformedURLException me) {
- System.out.println("Fehler bei URL " + me.getStackTrace());
- return null;
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- return path;
- }
-
- /**
- * @return the plug-in ID
- */
- public String getPluginID() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @return Abstract method to return report Path
- */
- public abstract String getReport();
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurdownInputParameters.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurdownInputParameters.java
new file mode 100644
index 0000000000..f48564ec4b
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurdownInputParameters.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
+ */
+package org.eclipse.osee.ats.reports.burndown.ui;
+
+import java.util.Date;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+
+/**
+ * @author Praveen Joseph
+ */
+public class BurdownInputParameters {
+
+ private final Artifact version;
+ private final Date startDate;
+ private final Date endDate;
+
+ public BurdownInputParameters(Artifact version, Date startDate, Date endDate) {
+ super();
+ this.version = version;
+ this.startDate = startDate;
+ this.endDate = endDate;
+ }
+
+ public Artifact getVersion() {
+ return version;
+ }
+
+ public Date getStartDate() {
+ return startDate;
+ }
+
+ public Date getEndDate() {
+ return endDate;
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownAtsReport.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownAtsReport.java
new file mode 100644
index 0000000000..079e0ccb6c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownAtsReport.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
+ */
+package org.eclipse.osee.ats.reports.burndown.ui;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.reports.AtsReport;
+import org.eclipse.osee.ats.reports.ReportTabFactory;
+import org.eclipse.osee.ats.reports.burndown.Activator;
+import org.eclipse.osee.framework.core.enums.Active;
+import org.eclipse.osee.framework.core.operation.IOperation;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
+import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorProvider;
+import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
+import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
+import org.eclipse.osee.framework.ui.swt.KeyedImage;
+
+/**
+ * @author Praveen Joseph
+ */
+public class BurndownAtsReport implements AtsReport<BurdownInputParameters, Object> {
+
+ @Override
+ public String getName() {
+ return "Burndown Reports";
+ }
+
+ @Override
+ public KeyedImage getKeyedImage() {
+ return AtsImage.REPORT;
+ }
+
+ @Override
+ public BurdownInputParameters getInputParameters() {
+ BurdownInputParameters params = null;
+ BurndownSelectionDialog dlg = new BurndownSelectionDialog(Active.Both);
+ int open = dlg.open();
+ if (open == 0) {
+ Artifact version = dlg.getSelectedVersion();
+ Date startDate = dlg.getStartDate();
+ Date endDate = dlg.getEndDate();
+ params = new BurdownInputParameters(version, startDate, endDate);
+ }
+ return params;
+ }
+
+ @Override
+ public IOperation createReportOperation(BurdownInputParameters input, Object output, TableLoadOption... tableLoadOptions) {
+ return new LoadBurndownDataOperation(input.getVersion(), input.getStartDate(), input.getEndDate());
+ }
+
+ @Override
+ public Object createOutputParameters() {
+ // None using a static shared object
+ return null;
+ }
+
+ @Override
+ public void displayResults(Object output) {
+ ResultsEditor.open(new IResultsEditorProvider() {
+
+ @Override
+ public String getEditorName() {
+ return getName();
+ }
+
+ @Override
+ public List<IResultsEditorTab> getResultsEditorTabs() {
+ List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>();
+ tabs.add(createTab("Hour Burndown", "reports/HourBurndown.rptdesign"));
+ tabs.add(createTab("Issue Burndown", "reports/IssueBurndown.rptdesign"));
+ return tabs;
+ }
+ });
+ }
+
+ private IResultsEditorTab createTab(String name, String rptDesingName) {
+ return ReportTabFactory.createBirtReportTab(Activator.PLUGIN_ID, name, rptDesingName);
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownItem.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownItem.java
deleted file mode 100644
index deeed9f72d..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownItem.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.burndown.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.api.version.IAtsVersion;
-import org.eclipse.osee.ats.core.client.config.VersionsClient;
-import org.eclipse.osee.ats.core.client.config.store.VersionArtifactStore;
-import org.eclipse.osee.ats.core.config.AtsConfigCache;
-import org.eclipse.osee.ats.reports.burndown.hours.HourBurndownLog;
-import org.eclipse.osee.ats.reports.burndown.hours.HourBurndownModel;
-import org.eclipse.osee.ats.reports.burndown.hours.HourBurndownTab;
-import org.eclipse.osee.ats.reports.burndown.issues.IssueBurndownLog;
-import org.eclipse.osee.ats.reports.burndown.issues.IssueBurndownModel;
-import org.eclipse.osee.ats.reports.burndown.issues.IssueBurndownTab;
-import org.eclipse.osee.framework.core.enums.Active;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorProvider;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-
-/**
- * Class to extract data from workflows and fills the HourBurndownModel and IssueBurndownModel
- *
- * @author Praveen Joseph
- */
-public class BurndownItem extends XNavigateItemAction {
-
- /**
- * Constructor which calls its parent constructor
- *
- * @param parent :
- */
- public BurndownItem(final XNavigateItem parent) {
- super(parent, "Burndown Reports", AtsImage.REPORT);
- }
-
- @Override
- public void run(final TableLoadOption... tableLoadOptions) throws Exception {
- // Get input from the user.
- BurndownSelectionDialog dlg = new BurndownSelectionDialog(Active.Both);
- int open = dlg.open();
- if (open == 0) {
- populateModel(dlg);
- ResultsEditor.open(new IResultsEditorProvider() {
-
- @Override
- public String getEditorName() {
- return "Burndown Reports";
- }
-
- @Override
- public List<IResultsEditorTab> getResultsEditorTabs() {
- List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>();
- tabs.add(new HourBurndownTab());
- tabs.add(new IssueBurndownTab());
- return tabs;
- }
-
- });
- }
- }
-
- private boolean populateModel(final BurndownSelectionDialog dlg) {
- try {
- @SuppressWarnings("cast")
- Artifact art = (Artifact) dlg.getSelectedVersion();
- AtsConfigCache atsConfigCache = new AtsConfigCache();
- VersionArtifactStore artifactStore = new VersionArtifactStore(art, atsConfigCache);
- IAtsVersion version = artifactStore.getVersion();
-
- // HourBurndown
- HourBurndownLog log = new HourBurndownLog();
- log.getArtifacts().addAll(VersionsClient.getTargetedForTeamWorkflows(version));
- log.setStartDate(dlg.getStartDate());
- log.setEndDate(dlg.getEndDate());
- log.compute();
- HourBurndownModel.setLog(log);
-
- // Issue Burndown
- IssueBurndownLog issueLog = new IssueBurndownLog();
- issueLog.getArtifacts().addAll(VersionsClient.getTargetedForTeamWorkflows(version));
- issueLog.setStartDate(dlg.getStartDate());
- issueLog.setEndDate(dlg.getEndDate());
- issueLog.compute();
- IssueBurndownModel.setLog(issueLog);
-
- } catch (OseeCoreException e) {
- e.printStackTrace();
- return false;
- }
-
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java
index 0a6007b023..d1905006f8 100644
--- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java
+++ b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java
@@ -44,27 +44,24 @@ import org.eclipse.ui.dialogs.SelectionDialog;
*/
public class BurndownSelectionDialog extends SelectionDialog {
- XComboViewer teamCombo = new XComboViewer("Team", SWT.READ_ONLY);
- XComboViewer versionCombo = new XComboViewer("Version", SWT.READ_ONLY);
- XDate startDateCombo = new XDate("StartDate");
- XDate endDateCombo = new XDate("End Date");
- Artifact selectedVersion = null;
- Artifact selectedTeamDef = null;
- Date startDate;
- Date endDate;
+ private final XComboViewer teamCombo = new XComboViewer("Team", SWT.READ_ONLY);
+ private final XComboViewer versionCombo = new XComboViewer("Version", SWT.READ_ONLY);
+ private final XDate startDateCombo = new XDate("StartDate");
+ private final XDate endDateCombo = new XDate("End Date");
+
private final IAtsTeamDefinition teamDef;
- Artifact project;
private final Active active;
+ private Artifact selectedVersion;
+ private Artifact selectedTeamDef;
+ private Date startDate;
+ private Date endDate;
+
/**
* @param active :
*/
public BurndownSelectionDialog(final Active active) {
- super(Displays.getActiveShell());
- this.active = active;
- this.teamDef = null;
- setTitle("Select Version");
- setMessage("Select Version");
+ this(null, active);
}
/**
@@ -81,7 +78,6 @@ public class BurndownSelectionDialog extends SelectionDialog {
@Override
protected Control createDialogArea(final Composite container) {
-
List<Object> objs = new ArrayList<Object>();
try {
Set<IAtsTeamDefinition> teamReleaseableDefinitions =
@@ -99,15 +95,15 @@ public class BurndownSelectionDialog extends SelectionDialog {
comp.setLayout(new GridLayout(2, false));
comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- if (this.teamDef == null) {
- this.teamCombo.setInput(objs);
- this.teamCombo.setLabelProvider(new ArtifactDescriptiveLabelProvider());
- this.teamCombo.setContentProvider(new ArrayContentProvider());
- this.teamCombo.setSorter(new ArtifactViewerSorter());
- this.teamCombo.setGrabHorizontal(true);
- this.teamCombo.createWidgets(comp, 2);
- this.teamCombo.getCombo().setVisibleItemCount(20);
- this.teamCombo.addSelectionListener(new SelectionListener() {
+ if (teamDef == null) {
+ teamCombo.setInput(objs);
+ teamCombo.setLabelProvider(new ArtifactDescriptiveLabelProvider());
+ teamCombo.setContentProvider(new ArrayContentProvider());
+ teamCombo.setSorter(new ArtifactViewerSorter());
+ teamCombo.setGrabHorizontal(true);
+ teamCombo.createWidgets(comp, 2);
+ teamCombo.getCombo().setVisibleItemCount(20);
+ teamCombo.addSelectionListener(new SelectionListener() {
@Override
public void widgetDefaultSelected(final SelectionEvent e) {
@@ -119,13 +115,12 @@ public class BurndownSelectionDialog extends SelectionDialog {
ArrayList<Object> objs1 = new ArrayList<Object>();
try {
- BurndownSelectionDialog.this.selectedTeamDef =
- (Artifact) BurndownSelectionDialog.this.teamCombo.getSelected();
+ selectedTeamDef = (Artifact) teamCombo.getSelected();
- for (Artifact versionArtifact : BurndownSelectionDialog.this.selectedTeamDef.getRelatedArtifacts(AtsRelationTypes.TeamDefinitionToVersion_Version)) {
+ for (Artifact versionArtifact : selectedTeamDef.getRelatedArtifacts(AtsRelationTypes.TeamDefinitionToVersion_Version)) {
objs1.add(versionArtifact);
}
- BurndownSelectionDialog.this.versionCombo.setInput(objs1);
+ versionCombo.setInput(objs1);
} catch (Exception ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
@@ -133,24 +128,23 @@ public class BurndownSelectionDialog extends SelectionDialog {
}
});
} else {
- TeamDefinitionArtifactStore store = new TeamDefinitionArtifactStore(this.teamDef);
+ TeamDefinitionArtifactStore store = new TeamDefinitionArtifactStore(teamDef);
Artifact teamArt = null;
try {
teamArt = store.getArtifact();
- } catch (OseeCoreException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
- this.selectedTeamDef = teamArt;
+ selectedTeamDef = teamArt;
}
- this.versionCombo.setLabelProvider(new ArtifactDescriptiveLabelProvider());
- this.versionCombo.setContentProvider(new ArrayContentProvider());
- this.versionCombo.setSorter(new ArtifactViewerSorter());
- this.versionCombo.setGrabHorizontal(true);
- this.versionCombo.createWidgets(comp, 2);
- this.versionCombo.getCombo().setVisibleItemCount(20);
- this.versionCombo.addSelectionListener(new SelectionListener() {
+ versionCombo.setLabelProvider(new ArtifactDescriptiveLabelProvider());
+ versionCombo.setContentProvider(new ArrayContentProvider());
+ versionCombo.setSorter(new ArtifactViewerSorter());
+ versionCombo.setGrabHorizontal(true);
+ versionCombo.createWidgets(comp, 2);
+ versionCombo.getCombo().setVisibleItemCount(20);
+ versionCombo.addSelectionListener(new SelectionListener() {
@Override
public void widgetDefaultSelected(final SelectionEvent e) {
@@ -159,48 +153,47 @@ public class BurndownSelectionDialog extends SelectionDialog {
@Override
public void widgetSelected(final SelectionEvent e) {
- BurndownSelectionDialog.this.selectedVersion =
- (Artifact) BurndownSelectionDialog.this.versionCombo.getSelected();
+ selectedVersion = (Artifact) versionCombo.getSelected();
validatePage();
}
});
- if (this.teamDef != null) {
+ if (teamDef != null) {
objs = new ArrayList<Object>();
try {
- for (Artifact versionArtifact : this.selectedTeamDef.getRelatedArtifacts(AtsRelationTypes.TeamDefinitionToVersion_Version)) {
+ for (Artifact versionArtifact : selectedTeamDef.getRelatedArtifacts(AtsRelationTypes.TeamDefinitionToVersion_Version)) {
IAtsVersion version =
AtsConfigCache.instance.getSoleByGuid(versionArtifact.getGuid(), IAtsVersion.class);
VersionArtifactStore store = new VersionArtifactStore(version);
Artifact verArt = store.getArtifact();
objs.add(verArt);
}
- this.versionCombo.setInput(objs);
+ versionCombo.setInput(objs);
} catch (Exception ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
}
// Date
- this.startDateCombo.setFormat("MM/dd/yyyy");
- this.startDateCombo.setRequiredEntry(true);
- this.startDateCombo.createWidgets(comp, 2);
- this.startDateCombo.addXModifiedListener(new XModifiedListener() {
+ startDateCombo.setFormat("MM/dd/yyyy");
+ startDateCombo.setRequiredEntry(true);
+ startDateCombo.createWidgets(comp, 2);
+ startDateCombo.addXModifiedListener(new XModifiedListener() {
@Override
public void widgetModified(final XWidget widget) {
- BurndownSelectionDialog.this.startDate = BurndownSelectionDialog.this.startDateCombo.getDate();
+ startDate = startDateCombo.getDate();
validatePage();
}
});
- this.endDateCombo.setFormat("MM/dd/yyyy");
- this.endDateCombo.setRequiredEntry(true);
- this.endDateCombo.createWidgets(comp, 2);
- this.endDateCombo.addXModifiedListener(new XModifiedListener() {
+ endDateCombo.setFormat("MM/dd/yyyy");
+ endDateCombo.setRequiredEntry(true);
+ endDateCombo.createWidgets(comp, 2);
+ endDateCombo.addXModifiedListener(new XModifiedListener() {
@Override
public void widgetModified(final XWidget widget) {
- BurndownSelectionDialog.this.endDate = BurndownSelectionDialog.this.endDateCombo.getDate();
+ endDate = endDateCombo.getDate();
validatePage();
}
});
@@ -211,27 +204,27 @@ public class BurndownSelectionDialog extends SelectionDialog {
* Method for validations
*/
public void validatePage() {
- if (this.teamCombo.getSelected() == null) {
+ if (teamCombo.getSelected() == null) {
setMessage("Please Select a Team");
getOkButton().setEnabled(false);
return;
}
- if (this.versionCombo.getSelected() == null) {
+ if (versionCombo.getSelected() == null) {
setMessage("Please Select a Version");
getOkButton().setEnabled(false);
return;
}
- if (this.startDateCombo.getDate() == null) {
+ if (startDateCombo.getDate() == null) {
setMessage("Please Select the Start Date");
getOkButton().setEnabled(false);
return;
}
- if (this.endDateCombo.getDate() == null) {
+ if (endDateCombo.getDate() == null) {
setMessage("Please Select the End Date");
getOkButton().setEnabled(false);
return;
}
- if (!this.endDateCombo.getDate().after(this.startDateCombo.getDate())) {
+ if (!endDateCombo.getDate().after(startDateCombo.getDate())) {
setMessage("End Date must occur after Start Date!!");
getOkButton().setEnabled(false);
return;
@@ -244,28 +237,28 @@ public class BurndownSelectionDialog extends SelectionDialog {
* @return selected version
*/
public Artifact getSelectedVersion() {
- return this.selectedVersion;
+ return selectedVersion;
}
/**
* @return the selectedTeamDef
*/
public Artifact getSelectedTeamDef() {
- return this.selectedTeamDef;
+ return selectedTeamDef;
}
/**
* @return the start date
*/
public Date getStartDate() {
- return this.startDate;
+ return startDate;
}
/**
* @return the end date
*/
public Date getEndDate() {
- return this.endDate;
+ return endDate;
}
}
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/LoadBurndownDataOperation.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/LoadBurndownDataOperation.java
new file mode 100644
index 0000000000..53a79f68b0
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/LoadBurndownDataOperation.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
+ */
+package org.eclipse.osee.ats.reports.burndown.ui;
+
+import java.util.Collection;
+import java.util.Date;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osee.ats.api.version.IAtsVersion;
+import org.eclipse.osee.ats.core.client.config.VersionsClient;
+import org.eclipse.osee.ats.core.client.config.store.VersionArtifactStore;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.config.AtsConfigCache;
+import org.eclipse.osee.ats.reports.burndown.Activator;
+import org.eclipse.osee.ats.reports.burndown.hours.HourBurndownLog;
+import org.eclipse.osee.ats.reports.burndown.hours.HourBurndownModel;
+import org.eclipse.osee.ats.reports.burndown.issues.IssueBurndownLog;
+import org.eclipse.osee.ats.reports.burndown.issues.IssueBurndownModel;
+import org.eclipse.osee.framework.core.operation.AbstractOperation;
+import org.eclipse.osee.framework.core.util.Conditions;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+
+/**
+ * Class to extract data from workflows and fills the HourBurndownModel and IssueBurndownModel
+ *
+ * @author Praveen Joseph
+ */
+public class LoadBurndownDataOperation extends AbstractOperation {
+
+ private final Artifact version;
+ private final Date startDate;
+ private final Date endDate;
+
+ public LoadBurndownDataOperation(Artifact version, Date startDate, Date endDate) {
+ super("Load Burndown Data", Activator.PLUGIN_ID);
+ this.version = version;
+ this.startDate = startDate;
+ this.endDate = endDate;
+ }
+
+ @Override
+ protected void doWork(IProgressMonitor monitor) throws Exception {
+ Conditions.checkNotNull(version, "version");
+
+ AtsConfigCache atsConfigCache = new AtsConfigCache();
+ VersionArtifactStore artifactStore = new VersionArtifactStore(version, atsConfigCache);
+ IAtsVersion version = artifactStore.getVersion();
+
+ Collection<TeamWorkFlowArtifact> workflows = VersionsClient.getTargetedForTeamWorkflows(version);
+
+ // HourBurndown
+ HourBurndownLog log = new HourBurndownLog();
+ log.getArtifacts().addAll(workflows);
+ log.setStartDate(startDate);
+ log.setEndDate(endDate);
+ log.compute();
+ HourBurndownModel.setLog(log);
+
+ // Issue Burndown
+ IssueBurndownLog issueLog = new IssueBurndownLog();
+ issueLog.getArtifacts().addAll(workflows);
+ issueLog.setStartDate(startDate);
+ issueLog.setEndDate(endDate);
+ issueLog.compute();
+ IssueBurndownModel.setLog(issueLog);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/ProjectModuleReports.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/ProjectModuleReports.java
deleted file mode 100644
index 40fce6525d..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/ProjectModuleReports.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.burndown.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.navigate.IAtsNavigateItem;
-import org.eclipse.osee.ats.reports.efficiency.ui.EfficiencyItem;
-import org.eclipse.osee.ats.reports.split.ui.DistributionItem;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-
-/**
- * Class to create the navigate items
- *
- * @author Praveen Joseph
- */
-public class ProjectModuleReports implements IAtsNavigateItem {
-
- /**
- * Default Constructor
- */
- public ProjectModuleReports() {
- //
- }
-
- @Override
- public List<XNavigateItem> getNavigateItems(final XNavigateItem parentItem) {
- List<XNavigateItem> items = new ArrayList<XNavigateItem>();
-
- XNavigateItem autoseeReportItem = new XNavigateItem(parentItem, "ProjectModule Reports", AtsImage.REPORT);
- new BurndownItem(autoseeReportItem);
- new DistributionItem(autoseeReportItem);
- new EfficiencyItem(autoseeReportItem);
- items.add(autoseeReportItem);
- return items;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.reports.efficiency/META-INF/MANIFEST.MF
index e7c99a16eb..9b41e633c4 100644
--- a/plugins/org.eclipse.osee.ats.reports.efficiency/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.reports.efficiency/META-INF/MANIFEST.MF
@@ -1,23 +1,31 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Efficiency
-Bundle-SymbolicName: org.eclipse.osee.ats.reports.efficiency
-Bundle-Version: 1.0.0.qualifier
+Bundle-Name: OSEE ATS Efficiency Reports (Incubation)
+Bundle-SymbolicName: org.eclipse.osee.ats.reports.efficiency;singleton:=true
+Bundle-Version: 0.10.3.qualifier
Bundle-Activator: org.eclipse.osee.ats.reports.efficiency.Activator
-Bundle-Vendor: BOSCH
+Bundle-Vendor: Eclipse Open System Engineering Environment
Require-Bundle: org.eclipse.ui,
- org.eclipse.ui.forms,
- org.eclipse.birt.report.viewer,
- org.eclipse.osee.ats,
- org.eclipse.osee.framework.core,
- org.eclipse.osee.framework.ui.skynet,
- org.eclipse.osee.framework.ui.plugin,
- org.eclipse.osee.ats.core.client,
- org.eclipse.osee.framework.ui.swt,
- org.eclipse.osee.framework.skynet.core,
- org.eclipse.osee.ats.api,
- org.eclipse.osee.ats.core
+ org.eclipse.ui.forms
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.osee.ats.reports.efficiency.team,
- org.eclipse.osee.ats.reports.efficiency.ui
+Import-Package: org.eclipse.core.runtime,
+ org.eclipse.osee.ats,
+ org.eclipse.osee.ats.api.team,
+ org.eclipse.osee.ats.api.version,
+ org.eclipse.osee.ats.core.client.config,
+ org.eclipse.osee.ats.core.client.team,
+ org.eclipse.osee.ats.core.client.workflow,
+ org.eclipse.osee.ats.core.config,
+ org.eclipse.osee.ats.reports,
+ org.eclipse.osee.ats.util.widgets.dialog,
+ org.eclipse.osee.framework.core.data,
+ org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.core.exception,
+ org.eclipse.osee.framework.core.operation,
+ org.eclipse.osee.framework.core.util,
+ org.eclipse.osee.framework.skynet.core.artifact,
+ org.eclipse.osee.framework.ui.plugin.xnavigate,
+ org.eclipse.osee.framework.ui.skynet.results,
+ org.eclipse.osee.framework.ui.swt,
+ org.osgi.framework
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/build.properties b/plugins/org.eclipse.osee.ats.reports.efficiency/build.properties
index 3a7f2ee524..cdc2f95fb8 100644
--- a/plugins/org.eclipse.osee.ats.reports.efficiency/build.properties
+++ b/plugins/org.eclipse.osee.ats.reports.efficiency/build.properties
@@ -2,4 +2,15 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- reports/
+ reports/,\
+ plugin.xml
+additional.bundles = org.eclipse.osee.ats.reports,\
+ org.eclipse.osee.ats,\
+ org.eclipse.osee.framework.core,\
+ org.eclipse.osee.framework.ui.skynet,\
+ org.eclipse.osee.framework.ui.plugin,\
+ org.eclipse.osee.ats.core.client,\
+ org.eclipse.osee.framework.ui.swt,\
+ org.eclipse.osee.framework.skynet.core,\
+ org.eclipse.osee.ats.api,\
+ org.eclipse.osee.ats.core
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/plugin.xml b/plugins/org.eclipse.osee.ats.reports.efficiency/plugin.xml
new file mode 100644
index 0000000000..8597a245e8
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports.efficiency/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.osee.ats.reports.AtsReportItem">
+ <AtsReportItem
+ classname="org.eclipse.osee.ats.reports.efficiency.ui.EfficiencyAtsReport">
+ </AtsReportItem>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java
new file mode 100644
index 0000000000..40920a8fb9
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
+ */
+package org.eclipse.osee.ats.reports.efficiency.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
+import org.eclipse.osee.ats.core.config.TeamDefinitions;
+import org.eclipse.osee.ats.reports.AtsReport;
+import org.eclipse.osee.ats.reports.ReportTabFactory;
+import org.eclipse.osee.ats.reports.efficiency.Activator;
+import org.eclipse.osee.ats.util.widgets.dialog.TeamDefinitionDialog;
+import org.eclipse.osee.framework.core.enums.Active;
+import org.eclipse.osee.framework.core.operation.IOperation;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
+import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorProvider;
+import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
+import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
+import org.eclipse.osee.framework.ui.swt.KeyedImage;
+
+/**
+ * @author Praveen Joseph
+ */
+public class EfficiencyAtsReport implements AtsReport<IAtsTeamDefinition, Object> {
+
+ @Override
+ public String getName() {
+ return "Efficiency Report";
+ }
+
+ @Override
+ public KeyedImage getKeyedImage() {
+ return AtsImage.REPORT;
+ }
+
+ @Override
+ public IAtsTeamDefinition getInputParameters() {
+ IAtsTeamDefinition atsTeamDefinition = null;
+ TeamDefinitionDialog dlg =
+ new TeamDefinitionDialog("Team Efficiency Report", "Please Select the Team Definition");
+ dlg.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Both));
+ int open = dlg.open();
+ if (open == 0) {
+ Object[] result = dlg.getResult();
+ if (result != null && result.length > 0) {
+ Object res = result[0];
+ if (res instanceof IAtsTeamDefinition) {
+ atsTeamDefinition = (IAtsTeamDefinition) res;
+ }
+ }
+ }
+ return atsTeamDefinition;
+ }
+
+ @Override
+ public IOperation createReportOperation(IAtsTeamDefinition input, Object output, TableLoadOption... tableLoadOptions) {
+ return new LoadEfficiencyDataOperation(input);
+ }
+
+ @Override
+ public Object createOutputParameters() {
+ // None using a static shared object
+ return null;
+ }
+
+ @Override
+ public void displayResults(Object output) {
+ ResultsEditor.open(new IResultsEditorProvider() {
+
+ @Override
+ public String getEditorName() {
+ return getName();
+ }
+
+ @Override
+ public List<IResultsEditorTab> getResultsEditorTabs() {
+ List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>();
+ tabs.add(createTab("Team Efficiency", "reports/TeamEfficiencyBar.rptdesign"));
+ tabs.add(createTab("Team Efficiency Trend", "reports/TeamEfficiencyLine.rptdesign"));
+ return tabs;
+ }
+ });
+ }
+
+ private IResultsEditorTab createTab(String name, String rptDesingName) {
+ return ReportTabFactory.createBirtReportTab(Activator.PLUGIN_ID, name, rptDesingName);
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyItem.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyItem.java
deleted file mode 100644
index 6814eab03f..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyItem.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.efficiency.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
-import org.eclipse.osee.ats.api.version.IAtsVersion;
-import org.eclipse.osee.ats.core.config.TeamDefinitions;
-import org.eclipse.osee.ats.reports.efficiency.team.TeamEfficiencyModel;
-import org.eclipse.osee.ats.reports.efficiency.team.VersionEfficiency;
-import org.eclipse.osee.ats.util.widgets.dialog.TeamDefinitionDialog;
-import org.eclipse.osee.framework.core.enums.Active;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorProvider;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-
-/**
- * Class to take inputs from user and populate TeamEfficiencyModel
- *
- * @author Praveen Joseph
- */
-public class EfficiencyItem extends XNavigateItemAction {
-
- /**
- * Constructor that calls its parent constructor
- *
- * @param parent :
- */
- public EfficiencyItem(final XNavigateItem parent) {
- super(parent, "Efficiency Report", AtsImage.REPORT);
- }
-
- @Override
- public void run(final TableLoadOption... tableLoadOptions) throws Exception {
- // Get input from the user.
- TeamDefinitionDialog dlg =
- new TeamDefinitionDialog("Team Efficiency Report", "Please Select the Team Definition");
- dlg.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Both));
- int open = dlg.open();
- if (open == 0) {
- populateModel(dlg);
- ResultsEditor.open(new IResultsEditorProvider() {
-
- @Override
- public String getEditorName() {
- return "Efficiency Report";
- }
-
- @Override
- public List<IResultsEditorTab> getResultsEditorTabs() {
- List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>();
- tabs.add(new TeamEfficiencyTab());
- tabs.add(new TeamEfficiencyLineTab());
- return tabs;
- }
-
- });
- }
- }
-
- private boolean populateModel(final TeamDefinitionDialog dlg) {
- try {
- Object[] result = dlg.getResult();
- if ((result == null) || (result.length == 0)) {
- return false;
- }
- Object res = result[0];
- if (res instanceof IAtsTeamDefinition) {
- IAtsTeamDefinition teamDef = (IAtsTeamDefinition) res;
- List<VersionEfficiency> verEffs = new ArrayList<VersionEfficiency>();
- for (IAtsVersion version : teamDef.getVersions()) {
- VersionEfficiency eff = new VersionEfficiency(version);
- eff.compute();
- verEffs.add(eff);
- }
- TeamEfficiencyModel.setVersionEfficiency(verEffs);
- }
- } catch (OseeCoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- return false;
- }
-
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/LoadEfficiencyDataOperation.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/LoadEfficiencyDataOperation.java
new file mode 100644
index 0000000000..4669811742
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/LoadEfficiencyDataOperation.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
+ */
+package org.eclipse.osee.ats.reports.efficiency.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
+import org.eclipse.osee.ats.api.version.IAtsVersion;
+import org.eclipse.osee.ats.reports.efficiency.Activator;
+import org.eclipse.osee.ats.reports.efficiency.team.TeamEfficiencyModel;
+import org.eclipse.osee.ats.reports.efficiency.team.VersionEfficiency;
+import org.eclipse.osee.framework.core.operation.AbstractOperation;
+import org.eclipse.osee.framework.core.util.Conditions;
+
+/**
+ * Class to extract data from workflows and fills the TeamEfficiencyModel
+ *
+ * @author Praveen Joseph
+ */
+public class LoadEfficiencyDataOperation extends AbstractOperation {
+
+ private final IAtsTeamDefinition teamDef;
+
+ public LoadEfficiencyDataOperation(IAtsTeamDefinition teamDef) {
+ super("Load Efficiency Data", Activator.PLUGIN_ID);
+ this.teamDef = teamDef;
+ }
+
+ @Override
+ protected void doWork(IProgressMonitor monitor) throws Exception {
+ Conditions.checkNotNull(teamDef, "teamDefinition");
+ List<VersionEfficiency> verEffs = new ArrayList<VersionEfficiency>();
+ for (IAtsVersion version : teamDef.getVersions()) {
+ VersionEfficiency eff = new VersionEfficiency(version);
+ eff.compute();
+ verEffs.add(eff);
+ }
+ TeamEfficiencyModel.setVersionEfficiency(verEffs);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/TeamEfficiencyLineTab.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/TeamEfficiencyLineTab.java
deleted file mode 100644
index 912e5cffbf..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/TeamEfficiencyLineTab.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.efficiency.ui;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.birt.report.viewer.utilities.WebViewer;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osee.ats.reports.efficiency.Activator;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.widgets.Composite;
-import org.osgi.framework.Bundle;
-
-/**
- * Class to create the tab in the ui
- *
- * @author Praveen Joseph
- */
-public class TeamEfficiencyLineTab implements IResultsEditorTab {
-
- private Browser browser;
-
- @SuppressWarnings("deprecation")
- @Override
- public Composite createTab(final Composite parent, final ResultsEditor resultsEditor) {
- String path = getReportPath();
- this.browser = new Browser(parent, SWT.NONE);
- WebViewer.display(path, WebViewer.HTML, this.browser, "frameset");
- this.browser.refresh();
- return this.browser;
- }
-
- /**
- * Method to return the report path
- *
- * @return the report path
- */
- public String getReportPath() {
- String path = null;
- try {
- Bundle bundle = Platform.getBundle(getPluginID());
- URL url = FileLocator.find(bundle, new Path("reports/" + getReport()), null);
- path = FileLocator.toFileURL(url).getPath();
- } catch (MalformedURLException me) {
- System.out.println("Fehler bei URL " + me.getStackTrace());
- return null;
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- return path;
- }
-
- /**
- * @return the plugin ID
- */
- public String getPluginID() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @return the name of the report
- */
- public String getReport() {
- return "TeamEfficiencyLine.rptdesign";
- }
-
- @Override
- public String getTabName() {
- return "Team Efficiency Trend";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/TeamEfficiencyTab.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/TeamEfficiencyTab.java
deleted file mode 100644
index 4281d60ece..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/TeamEfficiencyTab.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.efficiency.ui;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.birt.report.viewer.utilities.WebViewer;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osee.ats.reports.efficiency.Activator;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.widgets.Composite;
-import org.osgi.framework.Bundle;
-
-/**
- * Class to create the tab in UI
- *
- * @author Praveen Joseph
- */
-public class TeamEfficiencyTab implements IResultsEditorTab {
-
- private Browser browser;
-
- @SuppressWarnings("deprecation")
- @Override
- public Composite createTab(final Composite parent, final ResultsEditor resultsEditor) {
- String path = getReportPath();
- this.browser = new Browser(parent, SWT.NONE);
- WebViewer.display(path, WebViewer.HTML, this.browser, "frameset");
- this.browser.refresh();
- return this.browser;
- }
-
- /**
- * Method to return the report path
- *
- * @return the report path
- */
- public String getReportPath() {
- String path = null;
- try {
- Bundle bundle = Platform.getBundle(getPluginID());
- URL url = FileLocator.find(bundle, new Path("reports/" + getReport()), null);
- path = FileLocator.toFileURL(url).getPath();
- } catch (MalformedURLException me) {
- System.out.println("Fehler bei URL " + me.getStackTrace());
- return null;
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- return path;
- }
-
- /**
- * @return the plugin ID
- */
- public String getPluginID() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @return the report name
- */
- public String getReport() {
- return "TeamEfficiencyBar.rptdesign";
- }
-
- @Override
- public String getTabName() {
- return "Team Efficiency";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.split/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.reports.split/META-INF/MANIFEST.MF
index 9e5aab1a22..2838613063 100644
--- a/plugins/org.eclipse.osee.ats.reports.split/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.reports.split/META-INF/MANIFEST.MF
@@ -1,27 +1,39 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Split
+Bundle-Name: OSEE ATS Split Reports (Incubation)
Bundle-SymbolicName: org.eclipse.osee.ats.reports.split;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 0.10.3.qualifier
Bundle-Activator: org.eclipse.osee.ats.reports.split.Activator
-Bundle-Vendor: BOSCH
+Bundle-Vendor: Eclipse Open System Engineering Environment
Require-Bundle: org.eclipse.ui,
- org.eclipse.osee.ats.core,
- org.eclipse.osee.framework.core,
+ org.eclipse.ui.forms
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.core.runtime,
+ org.eclipse.osee.ats,
+ org.eclipse.osee.ats.api,
+ org.eclipse.osee.ats.api.ai,
+ org.eclipse.osee.ats.api.data,
+ org.eclipse.osee.ats.api.version,
+ org.eclipse.osee.ats.api.workdef,
+ org.eclipse.osee.ats.core.client.config,
+ org.eclipse.osee.ats.core.client.config.store,
+ org.eclipse.osee.ats.core.client.team,
+ org.eclipse.osee.ats.core.client.workflow,
+ org.eclipse.osee.ats.reports,
+ org.eclipse.osee.ats.util,
+ org.eclipse.osee.ats.util.widgets,
+ org.eclipse.osee.ats.util.widgets.dialog,
+ org.eclipse.osee.framework.core.data,
+ org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.core.exception,
+ org.eclipse.osee.framework.core.operation,
+ org.eclipse.osee.framework.core.util,
org.eclipse.osee.framework.skynet.core,
- org.eclipse.osee.framework.ui.skynet,
+ org.eclipse.osee.framework.skynet.core.artifact,
org.eclipse.osee.framework.ui.plugin,
- org.eclipse.osee.ats,
- org.eclipse.birt.report.viewer,
- org.eclipse.osee.ats.core.client,
+ org.eclipse.osee.framework.ui.plugin.xnavigate,
+ org.eclipse.osee.framework.ui.skynet,
+ org.eclipse.osee.framework.ui.skynet.results,
org.eclipse.osee.framework.ui.swt,
- org.eclipse.ui.forms,
- org.eclipse.osee.ats.api,
- org.eclipse.osee.framework.core.model
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.osee.ats.reports.split.model,
- org.eclipse.osee.ats.reports.split.ui,
- org.eclipse.osee.ats.reports.split.ui.ai,
- org.eclipse.osee.ats.reports.split.ui.state,
- org.eclipse.osee.ats.reports.split.ui.team
+ org.osgi.framework
diff --git a/plugins/org.eclipse.osee.ats.reports.split/build.properties b/plugins/org.eclipse.osee.ats.reports.split/build.properties
index 3a7f2ee524..4c45e04c9d 100644
--- a/plugins/org.eclipse.osee.ats.reports.split/build.properties
+++ b/plugins/org.eclipse.osee.ats.reports.split/build.properties
@@ -2,4 +2,16 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- reports/
+ reports/,\
+ plugin.xml
+additional.bundles = org.eclipse.osee.ats.reports,\
+ org.eclipse.osee.ats.core,\
+ org.eclipse.osee.framework.core,\
+ org.eclipse.osee.framework.skynet.core,\
+ org.eclipse.osee.framework.ui.skynet,\
+ org.eclipse.osee.framework.ui.plugin,\
+ org.eclipse.osee.ats,\
+ org.eclipse.osee.ats.core.client,\
+ org.eclipse.osee.framework.ui.swt,\
+ org.eclipse.osee.ats.api,\
+ org.eclipse.osee.framework.core.model
diff --git a/plugins/org.eclipse.osee.ats.reports.split/plugin.xml b/plugins/org.eclipse.osee.ats.reports.split/plugin.xml
new file mode 100644
index 0000000000..b8c31f1a21
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports.split/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.osee.ats.reports.AtsReportItem">
+ <AtsReportItem
+ classname="org.eclipse.osee.ats.reports.split.ui.DistributionAtsReport">
+ </AtsReportItem>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionAtsReport.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionAtsReport.java
new file mode 100644
index 0000000000..8ec394b71c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionAtsReport.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
+ */
+package org.eclipse.osee.ats.reports.split.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.api.version.IAtsVersion;
+import org.eclipse.osee.ats.reports.AtsReport;
+import org.eclipse.osee.ats.reports.ReportTabFactory;
+import org.eclipse.osee.ats.reports.split.Activator;
+import org.eclipse.osee.ats.util.widgets.dialog.TeamVersionListDialog;
+import org.eclipse.osee.framework.core.enums.Active;
+import org.eclipse.osee.framework.core.operation.IOperation;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
+import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorProvider;
+import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
+import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
+import org.eclipse.osee.framework.ui.swt.KeyedImage;
+
+/**
+ * @author Praveen Joseph
+ */
+public class DistributionAtsReport implements AtsReport<IAtsVersion, Object> {
+
+ @Override
+ public String getName() {
+ return "Distribution Reports";
+ }
+
+ @Override
+ public KeyedImage getKeyedImage() {
+ return AtsImage.REPORT;
+ }
+
+ @Override
+ public IAtsVersion getInputParameters() {
+ IAtsVersion param = null;
+ TeamVersionListDialog dlg = new TeamVersionListDialog(Active.Both);
+ int open = dlg.open();
+ if (open == 0) {
+ param = dlg.getSelectedVersion();
+ }
+ return param;
+ }
+
+ @Override
+ public IOperation createReportOperation(IAtsVersion input, Object output, TableLoadOption... tableLoadOptions) {
+ return new LoadDistributionDataOperation(input);
+ }
+
+ @Override
+ public Object createOutputParameters() {
+ // None using a static shared object
+ return null;
+ }
+
+ @Override
+ public void displayResults(Object output) {
+ ResultsEditor.open(new IResultsEditorProvider() {
+
+ @Override
+ public String getEditorName() {
+ return getName();
+ }
+
+ @Override
+ public List<IResultsEditorTab> getResultsEditorTabs() {
+ List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>();
+ tabs.add(createTab("Actionable Item", "reports/aiDistribution.rptdesign"));
+ tabs.add(createTab("Team-Work", "reports/teamWorkDistribution.rptdesign"));
+ tabs.add(createTab("Workflow State", "reports/stateWorkDistribution.rptdesign"));
+ return tabs;
+ }
+ });
+ }
+
+ private IResultsEditorTab createTab(String name, String rptDesingName) {
+ return ReportTabFactory.createBirtReportTab(Activator.PLUGIN_ID, name, rptDesingName);
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionItem.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionItem.java
deleted file mode 100644
index 6aba780213..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionItem.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.split.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.ats.api.version.IAtsVersion;
-import org.eclipse.osee.ats.core.client.config.store.VersionArtifactStore;
-import org.eclipse.osee.ats.reports.split.model.AIDistributionEntry;
-import org.eclipse.osee.ats.reports.split.model.DistributionModel;
-import org.eclipse.osee.ats.reports.split.model.StateDistributionEntry;
-import org.eclipse.osee.ats.reports.split.model.TeamDistributionEntry;
-import org.eclipse.osee.ats.reports.split.ui.ai.AITab;
-import org.eclipse.osee.ats.reports.split.ui.state.StateTab;
-import org.eclipse.osee.ats.reports.split.ui.team.TeamTab;
-import org.eclipse.osee.ats.util.widgets.dialog.TeamVersionListDialog;
-import org.eclipse.osee.framework.core.enums.Active;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorProvider;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-
-/**
- * Class to create the navigate item in the UI and to populate the model
- *
- * @author Chandan Bandemutt
- */
-public class DistributionItem extends XNavigateItemAction {
-
- /**
- * Constructor that calls super
- *
- * @param parent :
- */
- public DistributionItem(final XNavigateItem parent) {
- super(parent, "Distribution Reports", AtsImage.REPORT);
- }
-
- @Override
- public void run(final TableLoadOption... tableLoadOptions) throws Exception {
- // Get input from the user.
- TeamVersionListDialog dlg = new TeamVersionListDialog(Active.Both);
- int open = dlg.open();
- if (open == 0) {
- populateModel(dlg);
- ResultsEditor.open(new IResultsEditorProvider() {
-
- @Override
- public String getEditorName() {
- return "Distribution Reports";
- }
-
- @Override
- public List<IResultsEditorTab> getResultsEditorTabs() {
- List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>();
- tabs.add(new AITab());
- tabs.add(new TeamTab());
- tabs.add(new StateTab());
- return tabs;
- }
-
- });
- }
- }
-
- private boolean populateModel(final TeamVersionListDialog dlg) {
- try {
- // AI Split
- @SuppressWarnings("cast")
- IAtsVersion version = (IAtsVersion) dlg.getSelectedVersion();
- VersionArtifactStore artifactStore = new VersionArtifactStore(version);
- Artifact artifact = artifactStore.getArtifact();
-
- AIDistributionEntry aiSplitEntry = new AIDistributionEntry(artifact);
- aiSplitEntry.computeAISplit();
-
- TeamDistributionEntry teamSplitEntry = new TeamDistributionEntry(artifact);
- teamSplitEntry.computeTeamSplit();
-
- StateDistributionEntry stateSplitEntry = new StateDistributionEntry(artifact);
- stateSplitEntry.computeStateSplit();
-
- DistributionModel.setAiSplitEntry(aiSplitEntry);
- DistributionModel.setTeamSplitEntry(teamSplitEntry);
- DistributionModel.setStateSplitEntry(stateSplitEntry);
-
- } catch (OseeCoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- return false;
- }
-
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/LoadDistributionDataOperation.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/LoadDistributionDataOperation.java
new file mode 100644
index 0000000000..46a3457398
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/LoadDistributionDataOperation.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
+ */
+package org.eclipse.osee.ats.reports.split.ui;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osee.ats.api.version.IAtsVersion;
+import org.eclipse.osee.ats.core.client.config.store.VersionArtifactStore;
+import org.eclipse.osee.ats.reports.split.Activator;
+import org.eclipse.osee.ats.reports.split.model.AIDistributionEntry;
+import org.eclipse.osee.ats.reports.split.model.DistributionModel;
+import org.eclipse.osee.ats.reports.split.model.StateDistributionEntry;
+import org.eclipse.osee.ats.reports.split.model.TeamDistributionEntry;
+import org.eclipse.osee.framework.core.operation.AbstractOperation;
+import org.eclipse.osee.framework.core.util.Conditions;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+
+/**
+ * Class to extract data from workflows and fills the DistributionModel
+ *
+ * @author Praveen Joseph
+ */
+public class LoadDistributionDataOperation extends AbstractOperation {
+
+ private final IAtsVersion version;
+
+ public LoadDistributionDataOperation(IAtsVersion version) {
+ super("Load Work Distribution Data", Activator.PLUGIN_ID);
+ this.version = version;
+ }
+
+ @Override
+ protected void doWork(IProgressMonitor monitor) throws Exception {
+ Conditions.checkNotNull(version, "teamDefinition");
+ VersionArtifactStore artifactStore = new VersionArtifactStore(version);
+ Artifact artifact = artifactStore.getArtifact();
+
+ AIDistributionEntry aiSplitEntry = new AIDistributionEntry(artifact);
+ aiSplitEntry.computeAISplit();
+
+ TeamDistributionEntry teamSplitEntry = new TeamDistributionEntry(artifact);
+ teamSplitEntry.computeTeamSplit();
+
+ StateDistributionEntry stateSplitEntry = new StateDistributionEntry(artifact);
+ stateSplitEntry.computeStateSplit();
+
+ DistributionModel.setAiSplitEntry(aiSplitEntry);
+ DistributionModel.setTeamSplitEntry(teamSplitEntry);
+ DistributionModel.setStateSplitEntry(stateSplitEntry);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/ai/AITab.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/ai/AITab.java
deleted file mode 100644
index 0fe52c4265..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/ai/AITab.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.split.ui.ai;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.birt.report.viewer.utilities.WebViewer;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osee.ats.reports.split.Activator;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.widgets.Composite;
-import org.osgi.framework.Bundle;
-
-/**
- * Class to create the tab in UI
- *
- * @author Chandan Bandemutt
- */
-public class AITab implements IResultsEditorTab {
-
- private Browser browser;
-
- @SuppressWarnings("deprecation")
- @Override
- public Composite createTab(final Composite parent, final ResultsEditor resultsEditor) {
-
- String path = getReportPath();
- this.browser = new Browser(parent, SWT.NONE);
- WebViewer.display(path, WebViewer.HTML, this.browser, "frameset");
- this.browser.refresh();
- return this.browser;
- }
-
- /**
- * Method to return the report path
- *
- * @return the report tab
- */
- public String getReportPath() {
- String path = null;
- try {
- Bundle bundle = Platform.getBundle(getPluginID());
- URL url = FileLocator.find(bundle, new Path("reports/" + getReport()), null);
- path = FileLocator.toFileURL(url).getPath();
- } catch (MalformedURLException me) {
- System.out.println("Fehler bei URL " + me.getStackTrace());
- return null;
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- return path;
- }
-
- /**
- * @return teh plug in ID
- */
- public String getPluginID() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @return the report name
- */
- public String getReport() {
- return "aiDistribution.rptdesign";
- }
-
- @Override
- public String getTabName() {
- return "Actionable Item";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/state/StateTab.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/state/StateTab.java
deleted file mode 100644
index a0d22f3669..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/state/StateTab.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.split.ui.state;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.birt.report.viewer.utilities.WebViewer;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osee.ats.reports.split.Activator;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.widgets.Composite;
-import org.osgi.framework.Bundle;
-
-/**
- * Class to create the tab in UI
- *
- * @author Chandan Bandemutt
- */
-public class StateTab implements IResultsEditorTab {
-
- private Browser browser;
-
- @SuppressWarnings("deprecation")
- @Override
- public Composite createTab(final Composite parent, final ResultsEditor resultsEditor) {
-
- String path = getReportPath();
- this.browser = new Browser(parent, SWT.NONE);
- WebViewer.display(path, WebViewer.HTML, this.browser, "frameset");
- this.browser.refresh();
- return this.browser;
- }
-
- /**
- * @return the report path
- */
- public String getReportPath() {
- String path = null;
- try {
- Bundle bundle = Platform.getBundle(getPluginID());
- URL url = FileLocator.find(bundle, new Path("reports/" + getReport()), null);
- path = FileLocator.toFileURL(url).getPath();
- } catch (MalformedURLException me) {
- System.out.println("Fehler bei URL " + me.getStackTrace());
- return null;
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- return path;
- }
-
- /**
- * @return the plugin ID
- */
- public String getPluginID() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @return the report name
- */
- public String getReport() {
- return "stateWorkDistribution.rptdesign";
- }
-
- @Override
- public String getTabName() {
- return "Workflow State";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/team/TeamTab.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/team/TeamTab.java
deleted file mode 100644
index 7e7100bcae..0000000000
--- a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/team/TeamTab.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
- */
-package org.eclipse.osee.ats.reports.split.ui.team;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.birt.report.viewer.utilities.WebViewer;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osee.ats.reports.split.Activator;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.widgets.Composite;
-import org.osgi.framework.Bundle;
-
-/**
- * Class to create teh tab in UI
- *
- * @author Chandan Bandemutt
- */
-public class TeamTab implements IResultsEditorTab {
-
- private Browser browser;
-
- @SuppressWarnings("deprecation")
- @Override
- public Composite createTab(final Composite parent, final ResultsEditor resultsEditor) {
-
- String path = getReportPath();
- this.browser = new Browser(parent, SWT.NONE);
- WebViewer.display(path, WebViewer.HTML, this.browser, "frameset");
- this.browser.refresh();
- return this.browser;
- }
-
- /**
- * @return the report Path
- */
- public String getReportPath() {
- String path = null;
- try {
- Bundle bundle = Platform.getBundle(getPluginID());
- URL url = FileLocator.find(bundle, new Path("reports/" + getReport()), null);
- path = FileLocator.toFileURL(url).getPath();
- } catch (MalformedURLException me) {
- System.out.println("Fehler bei URL " + me.getStackTrace());
- return null;
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- return path;
- }
-
- /**
- * @return the plugin ID
- */
- public String getPluginID() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @return the report name
- */
- public String getReport() {
- return "teamWorkDistribution.rptdesign";
- }
-
- @Override
- public String getTabName() {
- return "Team-Work";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.reports/.classpath b/plugins/org.eclipse.osee.ats.reports/.classpath
new file mode 100644
index 0000000000..ad32c83a78
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.osee.ats.reports/.project b/plugins/org.eclipse.osee.ats.reports/.project
new file mode 100644
index 0000000000..c6c33e2b14
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osee.ats.reports</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>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.osee.ats.reports/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.reports/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..3802c76213
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: OSEE ATS Reports (Incubation)
+Bundle-SymbolicName: org.eclipse.osee.ats.reports;singleton:=true
+Bundle-Version: 0.10.3.qualifier
+Bundle-Activator: org.eclipse.osee.ats.reports.internal.Activator
+Bundle-Vendor: Eclipse Open System Engineering Environment
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.eclipse.birt.report.viewer.utilities,
+ org.eclipse.core.runtime,
+ org.eclipse.core.runtime.jobs,
+ org.eclipse.osee.ats,
+ org.eclipse.osee.ats.navigate,
+ org.eclipse.osee.framework.core.exception,
+ org.eclipse.osee.framework.core.operation,
+ org.eclipse.osee.framework.logging,
+ org.eclipse.osee.framework.plugin.core.util,
+ org.eclipse.osee.framework.ui.plugin.xnavigate,
+ org.eclipse.osee.framework.ui.skynet.blam,
+ org.eclipse.osee.framework.ui.skynet.results,
+ org.eclipse.osee.framework.ui.swt,
+ org.osgi.framework
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.osee.framework.ui.skynet
+Export-Package: org.eclipse.osee.ats.reports
diff --git a/plugins/org.eclipse.osee.ats.reports/build.properties b/plugins/org.eclipse.osee.ats.reports/build.properties
new file mode 100644
index 0000000000..43a4492a96
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
+additional.bundles = org.eclipse.osee.framework.ui.plugin,\
+ org.eclipse.osee.ats,\
+ org.eclipse.osee.framework.ui.swt,\
+ org.eclipse.osee.framework.core
diff --git a/plugins/org.eclipse.osee.ats.reports/plugin.xml b/plugins/org.eclipse.osee.ats.reports/plugin.xml
new file mode 100644
index 0000000000..9a2483cf0c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="AtsReportItem" name="AtsReportItem" schema="schema/AtsReportItem.exsd"/>
+ <extension
+ point="org.eclipse.osee.ats.AtsNavigateItem">
+ <AtsNavigateItem
+ classname="org.eclipse.osee.ats.reports.internal.ProjectModuleReports">
+ </AtsNavigateItem>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.osee.ats.reports/pom.xml b/plugins/org.eclipse.osee.ats.reports/pom.xml
new file mode 100644
index 0000000000..d969c7439e
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/pom.xml
@@ -0,0 +1,35 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osee</groupId>
+ <artifactId>org.eclipse.osee.client.parent</artifactId>
+ <version>0.10.3-SNAPSHOT</version>
+ <relativePath>../../plugins/org.eclipse.osee.client.parent</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.osee.ats.reports</artifactId>
+ <packaging>eclipse-plugin</packaging>
+ <name>OSEE ATS Reports (Incubation)</name>
+
+ <build>
+ <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.reports/schema/AtsReportItem.exsd b/plugins/org.eclipse.osee.ats.reports/schema/AtsReportItem.exsd
new file mode 100644
index 0000000000..558e94c721
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/schema/AtsReportItem.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.osee.ats.reports" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.osee.ats.reports" id="AtsReportItem" name="AtsReportItem"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="AtsReportItem"/>
+ </sequence>
+ <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="AtsReportItem">
+ <complexType>
+ <attribute name="classname" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.osee.ats.reports.AtsReport"/>
+ </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/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/AtsReport.java b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/AtsReport.java
new file mode 100644
index 0000000000..44b888cbac
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/AtsReport.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Boeing.
+ * 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:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.reports;
+
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.operation.IOperation;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
+import org.eclipse.osee.framework.ui.swt.KeyedImage;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public interface AtsReport<IN, OUT> {
+
+ String getName();
+
+ KeyedImage getKeyedImage();
+
+ IN getInputParameters() throws OseeCoreException;
+
+ OUT createOutputParameters() throws OseeCoreException;
+
+ IOperation createReportOperation(IN input, OUT output, TableLoadOption... tableLoadOptions) throws OseeCoreException;
+
+ void displayResults(OUT output) throws OseeCoreException;
+}
diff --git a/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/ReportTabFactory.java b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/ReportTabFactory.java
new file mode 100644
index 0000000000..d1d7f9d71e
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/ReportTabFactory.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Boeing.
+ * 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:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.reports;
+
+import org.eclipse.osee.ats.reports.internal.BirtReportViewerTab;
+import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
+
+/**
+ * @author Roberto Escobar
+ */
+public class ReportTabFactory {
+
+ private ReportTabFactory() {
+ //
+ }
+
+ public static IResultsEditorTab createBirtReportTab(String bundleId, String tabName, String rptDesingPath) {
+ return new BirtReportViewerTab(bundleId, tabName, rptDesingPath);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/Activator.java b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/Activator.java
new file mode 100644
index 0000000000..7f5184e988
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/Activator.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Boeing.
+ * 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:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.reports.internal;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ @Override
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ @Override
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/AtsReportXNavigateItemAction.java b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/AtsReportXNavigateItemAction.java
new file mode 100644
index 0000000000..903d4e9500
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/AtsReportXNavigateItemAction.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Boeing.
+ * 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:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.reports.internal;
+
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.osee.ats.reports.AtsReport;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.operation.IOperation;
+import org.eclipse.osee.framework.core.operation.Operations;
+import org.eclipse.osee.framework.logging.OseeLevel;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public class AtsReportXNavigateItemAction<IN, OUT> extends XNavigateItemAction {
+
+ private final AtsReport<IN, OUT> atsReport;
+
+ public AtsReportXNavigateItemAction(final XNavigateItem parent, AtsReport<IN, OUT> atsReport) {
+ super(parent, atsReport.getName(), atsReport.getKeyedImage());
+ this.atsReport = atsReport;
+ }
+
+ @Override
+ public void run(final TableLoadOption... tableLoadOptions) throws Exception {
+ IN input = atsReport.getInputParameters();
+ if (input != null) {
+ final OUT output = atsReport.createOutputParameters();
+ IOperation operation = atsReport.createReportOperation(input, output, tableLoadOptions);
+ Operations.executeAsJob(operation, true, Job.LONG, new JobChangeAdapter() {
+
+ @Override
+ public void done(IJobChangeEvent event) {
+ super.done(event);
+ try {
+ atsReport.displayResults(output);
+ } catch (OseeCoreException ex) {
+ OseeLog.logf(Activator.class, OseeLevel.SEVERE_POPUP, ex, "Error displaying [%s]",
+ atsReport.getName());
+ }
+ }
+ });
+ }
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/BirtReportViewerTab.java b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/BirtReportViewerTab.java
new file mode 100644
index 0000000000..a3467894f7
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/BirtReportViewerTab.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
+ */
+package org.eclipse.osee.ats.reports.internal;
+
+import java.net.URL;
+import org.eclipse.birt.report.viewer.utilities.WebViewer;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeExceptions;
+import org.eclipse.osee.framework.logging.OseeLevel;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
+import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.widgets.Composite;
+import org.osgi.framework.Bundle;
+
+/**
+ * Class that implements IResultsEditorTab to crate the tab in the UI
+ *
+ * @author Praveen Joseph
+ */
+public class BirtReportViewerTab implements IResultsEditorTab {
+
+ private final String tabName;
+ private final String bundleId;
+ private final String rptDesingPath;
+
+ public BirtReportViewerTab(String bundleId, String tabName, String rptDesingPath) {
+ this.tabName = tabName;
+ this.bundleId = bundleId;
+ this.rptDesingPath = rptDesingPath;
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public Composite createTab(final Composite parent, final ResultsEditor resultsEditor) {
+ Browser browser = new Browser(parent, SWT.NONE);
+ try {
+ URL reportLocation = getReportPath(bundleId, rptDesingPath);
+ WebViewer.display(reportLocation.getPath(), WebViewer.HTML, browser, "frameset");
+ browser.refresh();
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+ return browser;
+ }
+
+ @Override
+ public String getTabName() {
+ return tabName;
+ }
+
+ private URL getReportPath(String bundleId, String reportPath) throws OseeCoreException {
+ URL url = null;
+ try {
+ Bundle bundle = Platform.getBundle(bundleId);
+ url = FileLocator.find(bundle, new Path(reportPath), null);
+ url = FileLocator.toFileURL(url);
+ } catch (Exception ex) {
+ OseeExceptions.wrapAndThrow(ex);
+ }
+ return url;
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/ProjectModuleReports.java b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/ProjectModuleReports.java
new file mode 100644
index 0000000000..3c2f9a9aa3
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.reports/src/org/eclipse/osee/ats/reports/internal/ProjectModuleReports.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. 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
+ */
+package org.eclipse.osee.ats.reports.internal;
+
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.navigate.IAtsNavigateItem;
+import org.eclipse.osee.ats.reports.AtsReport;
+import org.eclipse.osee.framework.plugin.core.util.ExtensionDefinedObjects;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
+
+/**
+ * Class to create the navigate items
+ *
+ * @author Praveen Joseph
+ */
+public class ProjectModuleReports implements IAtsNavigateItem {
+
+ private static final String EXTENSION_POINT_ID = "org.eclipse.osee.ats.reports.AtsReportItem";
+ private static final String CLASSNAME = "classname";
+ private static final String EXTENSION_POINT_NAME = "AtsReportItem";
+ private static final String PROJECT_REPORTS = "Project Reports";
+
+ @Override
+ public List<XNavigateItem> getNavigateItems(final XNavigateItem parentItem) {
+ XNavigateItem parent = new XNavigateItem(parentItem, PROJECT_REPORTS, AtsImage.REPORT);
+ ExtensionDefinedObjects<AtsReport<?, ?>> atsReports =
+ new ExtensionDefinedObjects<AtsReport<?, ?>>(EXTENSION_POINT_ID, EXTENSION_POINT_NAME,
+ CLASSNAME, true);
+ for (AtsReport<?, ?> reportItem : atsReports.getObjects()) {
+ createReportItem(parent, reportItem);
+ }
+ return Collections.singletonList(parent);
+ }
+
+ private <IN, OUT> XNavigateItem createReportItem(XNavigateItem parent, AtsReport<IN, OUT> atsReport) {
+ return new AtsReportXNavigateItemAction<IN, OUT>(parent, atsReport);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.client.parent/pom.xml b/plugins/org.eclipse.osee.client.parent/pom.xml
index 34ab9f70a9..c1c13f3e34 100644
--- a/plugins/org.eclipse.osee.client.parent/pom.xml
+++ b/plugins/org.eclipse.osee.client.parent/pom.xml
@@ -55,6 +55,7 @@
<module>../../plugins/org.eclipse.osee.ats.config.demo</module>
<module>../../plugins/org.eclipse.osee.ats.impl</module>
+ <module>../../plugins/org.eclipse.osee.ats.reports</module>
<module>../../plugins/org.eclipse.osee.ats.reports.burndown</module>
<module>../../plugins/org.eclipse.osee.ats.reports.efficiency</module>
<module>../../plugins/org.eclipse.osee.ats.reports.split</module>

Back to the top