Skip to main content
summaryrefslogtreecommitdiffstats
blob: 25a91985acc22642746a050005efa2b7fe191497 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

<%
/**
 * Copyright (c) 2002-2005 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; String key = genModel.getPluginKey(); boolean hasKey = key != null && !key.equals(""); /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>

<%@ egf:patternCall patternId="platform:/plugin/org.eclipse.egf.emf.pattern.base/egf/EMF_Pattern_Base.fcore#LogicalName=org.eclipse.egf.emf.pattern.base.HeaderXml" args="parameter:argument"%>

<%if (genModel.isBundleManifest()) {%>
<plugin>
<%} else {%>
<plugin
      name="%pluginName"
      id="<%=genModel.getModelPluginID()%>"
      version="1.0.0"
  <%if (genModel.hasModelPluginClass()) { %>
      provider-name="%providerName"
      class="<%=genModel.getQualifiedModelPluginClassName()%>$Implementation">
  <%} else {%>
      provider-name="%providerName">
  <%}%>

   <requires>
  <%for (String pluginID : genModel.getModelRequiredPlugins()) {%>
      <import plugin="<%=pluginID%>"<%if (!pluginID.startsWith("org.eclipse.core.runtime")) {%> export="true"<%}%>/>
  <%}%>
   </requires>

   <runtime>
  <%if (genModel.isRuntimeJar()) {%>
      <library name="<%=genModel.getModelPluginID()%>.jar">
  <%} else {%>
      <library name=".">
  <%}%>
         <export name="*"/>
      </library>
   </runtime>
<%}%>
<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>

   <extension point="org.eclipse.emf.ecore.generated_package">
  <%if (hasKey) {%>
      <!-- @generated <%=key%> -->
  <%}%>
      <package
            uri="<%=genPackage.getNSURI()%>"
  <%if (genModel.hasLocalGenModel()) {%>
            class="<%=genPackage.getQualifiedPackageInterfaceName()%>"
            genModel="<%=genModel.getRelativeGenModelLocation()%>"/>
  <%} else {%>
            class="<%=genPackage.getQualifiedPackageInterfaceName()%>"/>
  <%}%>
   </extension>
  <%if (genPackage.isContentType()) {%>

   <extension point="org.eclipse.emf.ecore.content_parser">
  <%if (hasKey) {%>
      <!-- @generated <%=key%> -->
  <%}%>
      <parser
            contentTypeIdentifier="<%=genPackage.getContentTypeIdentifier()%>"
            class="<%=genPackage.getQualifiedEffectiveResourceFactoryClassName()%>"/>
   </extension>

   <extension point="org.eclipse.core.contenttype.contentTypes">
  <%if (hasKey) {%>
      <!-- @generated <%=key%> -->
  <%}%>
      <content-type
            base-type="<%=genPackage.isXMIResource() ? "org.eclipse.emf.ecore.xmi" : "org.eclipse.core.runtime.xml"%>"
            file-extensions="<%=genPackage.getFileExtensions()%>"
            id="<%=genPackage.getContentTypeIdentifier()%>"
            name="%_UI_<%=genPackage.getPrefix()%>_content_type"
            priority="normal">
         <describer class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
    <%if (genPackage.hasTargetNamespace()) {%>
            <parameter name="namespace" value="<%=genPackage.getNSURI()%>"/>
    <%}%>
    <%if (genPackage.isXMIResource()) {%>
            <parameter name="kind" value="xmi"/>
    <%}%>
         </describer>
      </content-type>
   </extension>
  <%} else if (genPackage.getResource() != GenResourceKind.NONE_LITERAL) {%>

   <extension point="org.eclipse.emf.ecore.extension_parser">
    <%if (hasKey) {%>
      <!-- @generated <%=key%> -->
    <%}%>
    <%for (String fileExtension : genPackage.getFileExtensionList()) {%>
      <parser
            type="<%=fileExtension%>"
            class="<%=genPackage.getQualifiedResourceFactoryClassName()%>"/>
    <%}%>
   </extension>
  <%}%>
<%}%>

</plugin>

Back to the top