Jetemplate cannot be put into fragment
Brought to you by:
hotzst
When a jetemplate is defined in a fragment, the data is displayed in the dropdown list, but the the JETEmitter cannot load the ressource.
java.io.FileNotFoundException: /jet_templates/hashmapbo.javajet at org.eclipse.osgi.framework.internal.protocol.bundleentry.Handler.findBundleEntry(Handler.java:44) at org.eclipse.osgi.framework.internal.core.BundleResourceHandler.openConnection(BundleResourceHandler.java:175) at java.net.URL.openConnection(URL.java:945) at java.net.URL.openStream(URL.java:1010) at org.eclipse.emf.codegen.jet.JETCompiler.openStream(JETCompiler.java:753) at org.eclipse.emf.codegen.jet.JETCompiler.<init>(JETCompiler.java:118) at ch.sahits.codegen.internal.jet.JETEmitterInitializer$MyBaseJETCompiler.<init>(JETEmitterInitializer.java:579) at ch.sahits.codegen.internal.jet.JETEmitterInitializer.initialize(JETEmitterInitializer.java:144)
The same problem occurs when the template is deployed as a plug-in. The difference is though the the fragment approach does not work in the when Eclipse is started from within the IDE, the plug-in solution does.
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.zip.ZipFile.<init>(ZipFile.java:131)
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:251)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.basicOpen(ZipBundleFile.java:88)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getZipFile(ZipBundleFile.java:101)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.checkedOpen(ZipBundleFile.java:74)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getEntry(ZipBundleFile.java:246)
at org.eclipse.osgi.baseadaptor.BaseData.getEntry0(BaseData.java:111)
at org.eclipse.osgi.baseadaptor.BaseData.getEntry(BaseData.java:102)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getEntry0(AbstractBundle.java:1232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getEntry(AbstractBundle.java:1227)
at ch.sahits.codegen.model.Config.getUri(Config.java:210)
at ch.sahits.codegen.model.Config.getTemplateFullUri(Config.java:172)
at ch.sahits.codegen.generator.JETGateway.getJETEmitter(JETGateway.java:235)
at ch.sahits.codegen.generator.JETGateway.generate(JETGateway.java:91)
at ch.sahits.codegen.generator.JETGateway.generate(JETGateway.java:174)
at ch.sahits.codegen.java.wizards.BasicHeadlessJavaCodeGenerator.doFinish(BasicHeadlessJavaCodeGenerator.java:59)
at ch.sahits.codegen.ui.internal.wizards.JavaCodeGenerator.performFinish(JavaCodeGenerator.java:74)
at ch.sahits.codegen.ui.internal.wizards.JavaCodegenWizard$1.run(JavaCodegenWizard.java:107)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)