<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginXML" version="$Id: plugin.xmljet,v 1.4 2004/05/16 17:25:39 emerks Exp $" %>
<%
/**
 * <copyright>
 *
 * Copyright (c) 2002-2004 IBM Corporation and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors: 
 *   IBM - Initial API and implementation
 *
 * </copyright>
 */
%>
<%GenModel genModel = (GenModel)argument;%>
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>

<!--
<%@ include file="../Header.jetinc"%>
-->

<plugin
    name = "%pluginName"
    id = "<%=genModel.getEditPluginID()%>"
    version = "1.0.0"
    provider-name = "%providerName"
    class = "<%=genModel.getQualifiedEditPluginClassName()%>$Implementation">

  <requires>
<%for (Iterator j=genModel.getEditRequiredPlugins().iterator(); j.hasNext();) { String pluginID = (String)j.next();%>
    <import plugin="<%=pluginID%>" <%if (!pluginID.startsWith("org.eclipse.core.runtime")) {%>export="true"<%}%>/>
<%}%>
  </requires>

  <runtime>
<%if (genModel.isRuntimeJar()) {%>
    <library name="runtime/<%=genModel.getEditPluginID()%>.jar">
<%} else {%>
    <library name="runtime/">
<%}%>
      <export name="*"/>
    </library>
  </runtime>
<%if (genModel.sameModelEditProject()) {%>
  <% for (Iterator i = genModel.getAllGenPackagesWithClassifiers().iterator(); i.hasNext(); ) { GenPackage genPackage = (GenPackage)i.next(); %>

  <extension point="org.eclipse.emf.ecore.generated_package">
    <package
       uri = "<%=genPackage.getNSURI()%>"
       class = "<%=genPackage.getQualifiedPackageInterfaceName()%>" />
  </extension>
    <%if (genPackage.getResource() != GenResourceKind.NONE_LITERAL) {%>

  <extension point="org.eclipse.emf.ecore.extension_parser">
    <parser
       type="<%=genPackage.getPrefix().toLowerCase()%>"
       class="<%=genPackage.getQualifiedResourceFactoryClassName()%>" />
  </extension>
    <%}%>
  <%}%>
<%}%>

</plugin>

