<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ManifestMF"%>
<%
/**
 * Copyright (c) 2005-2007 IBM Corporation and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v20.html
 * 
 * Contributors: 
 *   IBM - Initial API and implementation
 */
%>
<%GenModel genModel = (GenModel)argument;%>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: <%=genModel.getModelBundleNameKey()%>
Bundle-SymbolicName: <%=genModel.getModelPluginID()%>;singleton:=true
Automatic-Module-Name: <%=genModel.getModelPluginID()%>
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: <%if (genModel.isRuntimeJar()) {%><%=genModel.getModelPluginID()%>.jar<%}else{%>.<%}%>
<%if (genModel.hasModelPluginClass()) {%>
Bundle-Activator: <%=genModel.getQualifiedModelPluginClassName()%>$Implementation<%if (genModel.isOSGiCompatible()) {%>$Activator<%}%>
<%}%>
Bundle-Vendor: <%=genModel.getModelBundleVendorKey()%>
Bundle-Localization: <%=genModel.getModelBundleLocalization()%>
<%if (genModel.getComplianceLevel() == GenJDKLevel.JDK50_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: J2SE-1.5
<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK60_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK70_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK80_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK90_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: JavaSE-9
<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK100_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: JavaSE-10
<%}%>
<%Iterator<String> packagesIterator = genModel.getModelQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
 <%=pack%><%}%>
<%}%>
<%Iterator<String> requiredPluginIterator = genModel.getModelRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();%>
Require-Bundle: <%=pluginID%><%if (pluginID.startsWith("org.eclipse.core.runtime")) {if (genModel.isOSGiCompatible()) {%>;resolution:=optional;x-installation:=greedy<%}} else {%>;visibility:=reexport<%} while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();%>,
 <%=pluginID%><%if (pluginID.startsWith("org.eclipse.core.runtime")) {if (genModel.isOSGiCompatible()) {%>;resolution:=optional;x-installation:=greedy<%}} else if (!pluginID.equals("org.eclipse.xtext.xbase.lib") && !pluginID.equals("org.eclipse.emf.ecore.xcore.lib")) {%>;visibility:=reexport<%}}%>
<%}%>
<%if (genModel.isOSGiCompatible() && genModel.hasModelPluginClass()) {%>
Import-Package: org.osgi.framework
<%}%>
<%if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {%>
Eclipse-LazyStart: true
<%}%>
Bundle-ActivationPolicy: lazy
