diff --git a/JasperReports/META-INF/MANIFEST.MF b/JasperReports/META-INF/MANIFEST.MF
index d53ef053d5..d597e307a4 100644
--- a/JasperReports/META-INF/MANIFEST.MF
+++ b/JasperReports/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JasperReports
-Bundle-SymbolicName: org.adempiere.JasperReports
+Bundle-SymbolicName: org.adempiere.JasperReports;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: JasperReports.jar
Export-Package: org.compiere.interfaces,
diff --git a/JasperReports/build.properties b/JasperReports/build.properties
index fbee266820..a6dea0a54a 100644
--- a/JasperReports/build.properties
+++ b/JasperReports/build.properties
@@ -1,4 +1,5 @@
source.JasperReports.jar = src/
output.JasperReports.jar = build/
bin.includes = META-INF/,\
- JasperReports.jar
+ JasperReports.jar,\
+ plugin.xml
diff --git a/JasperReports/plugin.xml b/JasperReports/plugin.xml
new file mode 100644
index 0000000000..a605b3e2ec
--- /dev/null
+++ b/JasperReports/plugin.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/JasperReports/schema/org.compiere.report.JRViewerProvider.exsd b/JasperReports/schema/org.compiere.report.JRViewerProvider.exsd
new file mode 100644
index 0000000000..68aa0fce21
--- /dev/null
+++ b/JasperReports/schema/org.compiere.report.JRViewerProvider.exsd
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+ [Enter description of this extension point.]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [Enter the first release in which this extension point appears.]
+
+
+
+
+
+
+
+
+ [Enter extension point usage example here.]
+
+
+
+
+
+
+
+
+ [Enter API information here.]
+
+
+
+
+
+
+
+
+ [Enter information about supplied implementation of this extension point.]
+
+
+
+
+
diff --git a/JasperReports/src/org/compiere/report/ReportStarter.java b/JasperReports/src/org/compiere/report/ReportStarter.java
index a5eccd6fb4..7e1c0da54e 100644
--- a/JasperReports/src/org/compiere/report/ReportStarter.java
+++ b/JasperReports/src/org/compiere/report/ReportStarter.java
@@ -59,6 +59,7 @@ import net.sf.jasperreports.engine.export.JRPrintServiceExporter;
import net.sf.jasperreports.engine.export.JRPrintServiceExporterParameter;
import net.sf.jasperreports.engine.util.JRLoader;
+import org.adempiere.base.Service;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.DBException;
import org.compiere.model.MAttachment;
@@ -102,7 +103,6 @@ public class ReportStarter implements ProcessCall, ClientProcess
private static CLogger log = CLogger.getCLogger(ReportStarter.class);
private static File REPORT_HOME = null;
- private static JRViewerProvider viewerProvider = null;
private static JasperPrint jasperPrint;
static {
@@ -540,7 +540,7 @@ public class ReportStarter implements ProcessCall, ClientProcess
// JasperExportManager.exportReportToPdfFile(jasperPrint, "BasicReport.pdf");
} else {
log.info( "ReportStarter.startProcess run report -"+jasperPrint.getName());
- JRViewerProvider viewerLauncher = getReportViewerProvider();
+ JRViewerProvider viewerLauncher = Service.locate(JRViewerProvider.class);
viewerLauncher.openViewer(jasperPrint, pi.getTitle()+" - " + reportPath);
}
} catch (JRException e) {
@@ -1090,24 +1090,6 @@ public class ReportStarter implements ProcessCall, ClientProcess
}
}
- /**
- * Set jasper report viewer provider.
- * @param provider
- */
- public static void setReportViewerProvider(JRViewerProvider provider) {
- if (provider == null)
- throw new IllegalArgumentException("Cannot set report viewer provider to null");
- viewerProvider = provider;
- }
-
- /**
- * Get the current jasper report viewer provider
- * @return JRViewerProvider
- */
- public static JRViewerProvider getReportViewerProvider() {
- return viewerProvider;
- }
-
class ReportData {
private String reportFilePath;
private boolean directPrint;
diff --git a/JasperReportsClient/.settings/org.eclipse.pde.core.prefs b/JasperReportsClient/.settings/org.eclipse.pde.core.prefs
index 07d7fc10bd..0f8fd9b2cd 100644
--- a/JasperReportsClient/.settings/org.eclipse.pde.core.prefs
+++ b/JasperReportsClient/.settings/org.eclipse.pde.core.prefs
@@ -1,4 +1,4 @@
-#Thu Aug 19 17:50:42 MYT 2010
+#Mon Aug 23 13:20:48 MYT 2010
eclipse.preferences.version=1
-pluginProject.extensions=false
+pluginProject.extensions=true
resolve.requirebundle=false
diff --git a/JasperReportsClient/META-INF/MANIFEST.MF b/JasperReportsClient/META-INF/MANIFEST.MF
index 5d39231275..77075511f6 100644
--- a/JasperReportsClient/META-INF/MANIFEST.MF
+++ b/JasperReportsClient/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JasperReportsClient
-Bundle-SymbolicName: org.adempiere.apps.JasperReportsClient
+Bundle-SymbolicName: org.adempiere.apps.JasperReportsClient;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.adempiere.base;bundle-version="1.0.0",
diff --git a/JasperReportsClient/build.properties b/JasperReportsClient/build.properties
index 34d2e4d2da..e9863e281e 100644
--- a/JasperReportsClient/build.properties
+++ b/JasperReportsClient/build.properties
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ plugin.xml
diff --git a/JasperReportsClient/plugin.xml b/JasperReportsClient/plugin.xml
new file mode 100644
index 0000000000..fd7d2d83e4
--- /dev/null
+++ b/JasperReportsClient/plugin.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
diff --git a/JasperReportsClient/src/org/compiere/report/JasperReportsClientActivator.java b/JasperReportsClient/src/org/compiere/report/JasperReportsClientActivator.java
index d0a990c3f0..434a3cda50 100644
--- a/JasperReportsClient/src/org/compiere/report/JasperReportsClientActivator.java
+++ b/JasperReportsClient/src/org/compiere/report/JasperReportsClientActivator.java
@@ -21,7 +21,6 @@ public class JasperReportsClientActivator implements BundleActivator {
@Override
public void start(BundleContext arg0) throws Exception {
- ReportStarter.setReportViewerProvider(new SwingJRViewerProvider());
}
@Override
diff --git a/client/.project b/client/.project
index f35cc99699..6340049334 100644
--- a/client/.project
+++ b/client/.project
@@ -31,6 +31,11 @@
+
+ org.eclipse.pde.ds.core.builder
+
+
+
org.eclipse.jem.workbench.JavaEMFNature
diff --git a/client/build.properties b/client/build.properties
index cbbfa30fd1..74f145892c 100644
--- a/client/build.properties
+++ b/client/build.properties
@@ -1,5 +1,6 @@
-source.client.jar = src/
-output.client.jar = build/
bin.includes = META-INF/,\
client.jar,\
- plugin.xml
+ plugin.xml,\
+ component.xml
+source.client.jar = src/
+output.client.jar = build/
diff --git a/client/plugin.xml b/client/plugin.xml
index 1132256ec1..7c99768293 100644
--- a/client/plugin.xml
+++ b/client/plugin.xml
@@ -18,5 +18,11 @@
+
+
+
+
diff --git a/client/src/org/compiere/apps/AMenu.java b/client/src/org/compiere/apps/AMenu.java
index 7640eaa82a..d567680c67 100644
--- a/client/src/org/compiere/apps/AMenu.java
+++ b/client/src/org/compiere/apps/AMenu.java
@@ -194,7 +194,7 @@ public final class AMenu extends CFrame
//
Env.addEventListener(this);
//
- ReportCtl.setReportViewerProvider(new SwingViewerProvider());
+// ReportCtl.setReportViewerProvider(new SwingViewerProvider());
//
splash.dispose();
splash = null;
diff --git a/uibase/.project b/uibase/.project
index 97a1edc033..710a73f14b 100644
--- a/uibase/.project
+++ b/uibase/.project
@@ -20,6 +20,11 @@
+
+ org.eclipse.pde.ds.core.builder
+
+
+
org.eclipse.pde.PluginNature
diff --git a/uibase/.settings/org.eclipse.pde.core.prefs b/uibase/.settings/org.eclipse.pde.core.prefs
index 2cbb9a1de4..e248100860 100644
--- a/uibase/.settings/org.eclipse.pde.core.prefs
+++ b/uibase/.settings/org.eclipse.pde.core.prefs
@@ -1,4 +1,4 @@
-#Mon Aug 09 17:35:10 MYT 2010
+#Mon Aug 23 12:23:34 MYT 2010
eclipse.preferences.version=1
-pluginProject.extensions=false
+pluginProject.extensions=true
resolve.requirebundle=false
diff --git a/uibase/META-INF/MANIFEST.MF b/uibase/META-INF/MANIFEST.MF
index 2bd6fc9ca9..1bbcb4a543 100644
--- a/uibase/META-INF/MANIFEST.MF
+++ b/uibase/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: UI base
-Bundle-SymbolicName: org.adempiere.ui.base
+Bundle-SymbolicName: org.adempiere.ui.base;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.adempiere.base;bundle-version="1.0.0"
diff --git a/uibase/build.properties b/uibase/build.properties
index d2f304d4af..2e07bb616a 100644
--- a/uibase/build.properties
+++ b/uibase/build.properties
@@ -1,6 +1,8 @@
-source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
org-netbeans-api-visual.jar,\
- org-openide-util.jar
+ org-openide-util.jar,\
+ component.xml,\
+ plugin.xml
+source.. = src/
diff --git a/uibase/plugin.xml b/uibase/plugin.xml
new file mode 100644
index 0000000000..2124941648
--- /dev/null
+++ b/uibase/plugin.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/uibase/schema/org.compiere.print.ReportViewerProvider.exsd b/uibase/schema/org.compiere.print.ReportViewerProvider.exsd
new file mode 100644
index 0000000000..d73b5851c7
--- /dev/null
+++ b/uibase/schema/org.compiere.print.ReportViewerProvider.exsd
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+ [Enter description of this extension point.]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [Enter the first release in which this extension point appears.]
+
+
+
+
+
+
+
+
+ [Enter extension point usage example here.]
+
+
+
+
+
+
+
+
+ [Enter API information here.]
+
+
+
+
+
+
+
+
+ [Enter information about supplied implementation of this extension point.]
+
+
+
+
+
diff --git a/uibase/src/org/compiere/print/ReportCtl.java b/uibase/src/org/compiere/print/ReportCtl.java
index 3cb68cd7dd..42ec3e958f 100644
--- a/uibase/src/org/compiere/print/ReportCtl.java
+++ b/uibase/src/org/compiere/print/ReportCtl.java
@@ -19,6 +19,7 @@ package org.compiere.print;
import java.util.Properties;
import java.util.logging.Level;
+import org.adempiere.base.Service;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MPaySelectionCheck;
import org.compiere.model.MProcess;
@@ -65,8 +66,6 @@ public class ReportCtl
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (ReportCtl.class);
- private static ReportViewerProvider viewerProvider = null;
-
/**
* Create Report.
* Called from ProcessCtl.
@@ -374,19 +373,8 @@ public class ReportCtl
*/
public static void preview(ReportEngine re)
{
- ReportViewerProvider provider = getReportViewerProvider();
- provider.openViewer(re);
+ ReportViewerProvider viewer = Service.locate(ReportViewerProvider.class);
+ viewer.openViewer(re);
}
- public static void setReportViewerProvider(ReportViewerProvider provider)
- {
- if (provider == null)
- throw new IllegalArgumentException("Cannot set report viewer provider to null");
- viewerProvider = provider;
- }
-
- public static ReportViewerProvider getReportViewerProvider()
- {
- return viewerProvider;
- }
} // ReportCtl
diff --git a/zkwebui/.project b/zkwebui/.project
index 736c7b18af..263a7a75fa 100644
--- a/zkwebui/.project
+++ b/zkwebui/.project
@@ -32,6 +32,11 @@
+
+ org.eclipse.pde.ds.core.builder
+
+
+
org.eclipse.wst.common.project.facet.core.nature
diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java b/zkwebui/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java
index 27df4ae81c..60b9e8d8d1 100644
--- a/zkwebui/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java
+++ b/zkwebui/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java
@@ -28,11 +28,7 @@ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.adempiere.webui.window.ZkJRViewerProvider;
-import org.adempiere.webui.window.ZkReportViewerProvider;
import org.compiere.Adempiere;
-import org.compiere.print.ReportCtl;
-import org.compiere.report.ReportStarter;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
import org.compiere.util.Ini;
@@ -88,8 +84,6 @@ public class WebUIServlet extends DHtmlLayoutServlet
// hengsin: temporary solution for problem with zk client
Ini.setProperty(Ini.P_ADEMPIERESYS, false);
- ReportCtl.setReportViewerProvider(new ZkReportViewerProvider());
- ReportStarter.setReportViewerProvider(new ZkJRViewerProvider());
logger.log(Level.OFF, "ADempiere web ui service started successfully");
/**
* End ADempiere Start
diff --git a/zkwebui/build.properties b/zkwebui/build.properties
index 883a916bfb..a9575cfded 100644
--- a/zkwebui/build.properties
+++ b/zkwebui/build.properties
@@ -1,4 +1,3 @@
-source.. = WEB-INF/src/
output.. = WEB-INF/classes/
bin.includes = META-INF/,\
WEB-INF/,\
@@ -12,9 +11,8 @@ bin.includes = META-INF/,\
zul/,\
WEB-INF/classes/,\
timeout.zul,\
- plugin.xml
-bin.excludes = WEB-INF/src/,\
- WEB-INF/web-2.5.xml
+ plugin.xml,\
+ component.xml
src.includes = WEB-INF/classes/,\
WEB-INF/lib/,\
WEB-INF/tld/,\
@@ -29,3 +27,6 @@ src.includes = WEB-INF/classes/,\
theme/,\
theme.zs,\
zul/
+source.. = WEB-INF/src/
+bin.excludes = WEB-INF/src/,\
+ WEB-INF/web-2.5.xml
diff --git a/zkwebui/plugin.xml b/zkwebui/plugin.xml
index d4f09ef2fd..fc55cf1d01 100644
--- a/zkwebui/plugin.xml
+++ b/zkwebui/plugin.xml
@@ -2,5 +2,17 @@
+
+
+
+
+
+
+
+