Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Create a new Emitter with an existing Emitter - HTML
Samo
Hello,<br />
<br />
I'm creating a modified HTML Emitter. It seems pretty complex to develop a totally new Emitter so I would like to use the existing HTML Emitter and I could modify it.<br />
I've created a test Emitter to check if this kind of purpose is possible or not.<br />
<br />
- My first step was to copy the entire project and renamed it. (org.eclipse.birt.report.engine.emitter.html)<br />
<br />
- There are three packages:<br />
-> org.eclipse.birt.report.engine.emitter.html -> *.html5<br />
-> org.eclipse.birt.report.engine.emitter.html.plugin -> *.html5.plugin<br />
-> org.eclipse.birt.report.engine.emitter.html.util -> *.html5.util<br />
<br />
I renamed all the packages as you can so. So far I don't have any errors in my project.<br />
- I updated the path of the Activator (Overview -> Activator) in my plugin.xml<br />
- Updated the Exported Packages<br />
- Updated te Extension Element Details to:<br />
class: org.eclipse.birt.report.engine.emitter.html5.HTMLReportEmitter<br />
format: html5<br />
id: org.eclipse.birt.report.engine.emitter.html5<br />
- Updated the MANIFEST.MF<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: BIRT HTML Emitter
Bundle-SymbolicName: org.eclipse.birt.report.engine.emitter.html5;singleton:=true
Bundle-Version: 4.2.1.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.birt.report.engine.emitter.html5.plugin.HTMLEmitterPlugin
Bundle-Vendor: Eclipse BIRT Project
Bundle-Localization: plugin
Export-Package: org.eclipse.birt.report.engine.emitter.html5
Import-Package: org.eclipse.birt.chart.model
Require-Bundle: org.eclipse.birt.core;bundle-version="[2.1.0,5.0.0)",
org.eclipse.birt.report.model;bundle-version="[2.1.0,5.0.0)",
org.eclipse.birt.report.engine;bundle-version="[2.1.0,5.0.0)",
org.eclipse.birt.data;bundle-version="[2.1.0,5.0.0)"
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5</pre>
<br />
- My plugin.xml<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.birt.report.engine.emitters"
name = "Engine html Emitters">
<emitter
id="org.eclipse.birt.report.engine.emitter.html5"
class="org.eclipse.birt.report.engine.emitter.html5.HTMLReportEmitter"
format="html5"
pagination="no-pagination"
outputDisplayNone="true"
mimeType="text/html"
supportedImageFormats="PNG;GIF;JPG;BMP;SWF;SVG" >
</emitter>
</extension>
</plugin></pre>
<br />
- I also created a HTML5RenderOption Class:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>public class HTML5RenderOption extends RenderOption{
public static final String HTML5 = "HTML5";
public HTML5RenderOption( ) {
}
}</pre>
<br />
<br />
Now when I deploy my emitter on my tomcat I get following error:<br />
Find more posts tagged with
Comments
mwilliams
Any way you can attach all of the code or send it to me in email so I can test on it?
Samo
Hi,
I attached my project. Actually there is nothing special, It's still almost the same as the HTMl -Emitter.
Regards,
Samo
mwilliams
I imported your project into 3.7.2 and launched eclipse from the manifest.mf and was able to run a design with HTML5. I'll try in 4.2.1, next. Did you only experience the issue when deployed to Tomcat? Are you using the web viewer and calling by URL when you see the error?
mwilliams
The html emitter has an emitter config jar. Did you happen to duplicate this as well? If not, that might be the issue.
Samo
Hi,
It works. My runtime didn't load the plug in. I had some problems with the folder structure of the osgi-runtime.
Thanks.
Samo
mwilliams
Great. Thanks for the update!