Skip to main content
summaryrefslogtreecommitdiffstats
blob: cda3f8216dddbee3e7b735205001f99a895a7499 (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
     Copyright (c) 2010, 2011  Oracle. All rights reserved.
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v1.0, which accompanies this distribution
     and is available at http://www.eclipse.org/legal/epl-v10.html
     
     Contributors: 
     	Oracle - initial API and implementation
 -->

<plugin>
	
	<!-- ***** extension points ***** -->
	
	<extension-point
		id="jaxbPlatforms"
		name="%JAXB_PLATFORMS"
		schema="schema/jaxbPlatforms.exsd"/>
	
	
	<!-- ***** extensions ***** -->
	
	<extension 
		point="org.eclipse.core.expressions.propertyTesters">
		
		<propertyTester
			id="org.eclipse.jpt.jaxb.core.propertyTester.platformResource"
			type="org.eclipse.core.resources.IResource"
			namespace="org.eclipse.jpt.jaxb.core"
			properties="jaxbPlatform, jaxbPlatformGroup"
			class="org.eclipse.jpt.jaxb.core.internal.JaxbPlatformTester"/>
		
		<propertyTester
			id="org.eclipse.jpt.jaxb.core.propertyTester.javaElement"
			type="org.eclipse.jdt.core.IJavaElement"
			namespace="org.eclipse.jpt.jaxb.core"
			properties="jaxbPlatform, jaxbPlatformGroup"
			class="org.eclipse.jpt.jaxb.core.internal.JaxbPlatformTester"/>
		
		<propertyTester
			id="org.eclipse.jpt.jaxb.core.propertyTester.jaxbPlatformDescription"
			type="org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDescription"
			namespace="org.eclipse.jpt.jaxb.core"
			properties="jaxbPlatform, jaxbPlatformGroup"
			class="org.eclipse.jpt.jaxb.core.internal.JaxbPlatformTester"/>
			
		<propertyTester
			id="org.eclipse.jpt.jaxb.core.propertyTester.jaxbLibraryProviderConfig"
			type="org.eclipse.jpt.jaxb.core.libprov.JaxbLibraryProviderInstallOperationConfig"
			namespace="org.eclipse.jpt.jaxb.core"
			properties="jaxbPlatform, jaxbPlatformGroup"
			class="org.eclipse.jpt.jaxb.core.internal.JaxbPlatformTester"/>
			
	</extension>
			
	<!-- =================================================================================== -->
	<!-- Extension: JAXB Problem Marker                                                       -->
	<!-- **** Do NOT qualify the marker id with org.eclipse.jpt.jaxb.core, see bug 252891 		 -->
	<!-- =================================================================================== -->
	<extension
		point="org.eclipse.core.resources.markers"
		id="jaxbProblemMarker" 
		name="%JAXB_PROBLEM_MARKER">

		<persistent value="true"/>
		
		<!-- Can't use text marker until we have specific models for each input type (XML, java)
		<super type="org.eclipse.core.resources.textmarker"/>
		-->
		
		<super type="org.eclipse.wst.validation.problemmarker2"/>
		<super type="org.eclipse.jdt.core.problem"/>
	</extension>
	
	
	<extension
		point="org.eclipse.jpt.jaxb.core.jaxbPlatforms">
		
		<jaxbPlatformGroup
        	id="generic"
        	label="%GENERIC_PLATFORM_GROUP_LABEL"/>
		
		<jaxbPlatform
			id="generic_2_1"
			label="%GENERIC_2_1_PLATFORM_LABEL"
			factoryClass="org.eclipse.jpt.jaxb.core.internal.jaxb21.GenericJaxb_2_1_PlatformDefinitionFactory"
			group="generic"
			jaxbFacetVersion="2.1"
			default="false"/>

		<jaxbPlatform
       	 	id="generic_2_2"
       	 	label="%GENERIC_2_2_PLATFORM_LABEL"
       	 	factoryClass="org.eclipse.jpt.jaxb.core.internal.jaxb22.GenericJaxb_2_2_PlatformDefinitionFactory"
        	group="generic"
        	jaxbFacetVersion="2.2"
        	default="false"/>
		
	</extension>
	
	
	<extension
		point="org.eclipse.jpt.common.core.libraryValidators">
		
		<libraryValidator
			id="jaxbJreLibraryValidator"
			class="org.eclipse.jpt.jaxb.core.internal.libval.JaxbJreLibraryValidator">
			<enablement>
				<with variable="libraryProvider">
					<test property="org.eclipse.jpt.common.core.extendsId" value="jaxb-jre-library-provider"/>
				</with>
			</enablement>
		</libraryValidator>
		
		<libraryValidator
			id="genericJaxbUserLibraryValidator"
			class="org.eclipse.jpt.jaxb.core.internal.libval.GenericJaxbUserLibraryValidator">
			<enablement>
				<with variable="libraryProvider">
					<test property="org.eclipse.jpt.common.core.extendsId" value="jaxb-user-library-provider"/>
				</with>
			</enablement>
		</libraryValidator>
		
		<!--
		<libraryValidator
			id="genericEclipselinkBundlesLibraryValidator"
			class="org.eclipse.jpt.core.internal.libval.GenericEclipseLinkBundlesLibraryValidator">
			<enablement>
				<with variable="libraryProvider">
					<test property="org.eclipse.jpt.core.extendsId" value="eclipselink-bundles-library-provider"/>
				</with>
			</enablement>
		</libraryValidator>
		-->
		
	</extension>
	
	
	<extension 
		point="org.eclipse.jst.common.project.facet.core.libraryProviders">
		
		<provider
			id="jaxb-no-op-library-provider"
			extends="jpt-no-op-library-provider">
			<param name="message" value="%JAXB_NO_OP_LIBRARY_PROVIDER_MESSAGE"/>
			<enablement>
				<with variable="requestingProjectFacet">
					<test 
						property="org.eclipse.wst.common.project.facet.core.projectFacet" 
						value="jpt.jaxb" forcePluginActivation="true"/>
				</with>
			</enablement>
		</provider>
		
		<provider
			id="jaxb-jre-library-provider">
			<label>%JAXB_JRE_LIBRARY_PROVIDER_LABEL</label>
			<priority>900</priority>
			<param name="message" value="%JAXB_JRE_LIBRARY_PROVIDER_MESSAGE"/>
      		<enablement>
      			<and>
					<with variable="requestingProjectFacet">
						<test property="org.eclipse.wst.common.project.facet.core.projectFacet" 
							value="jpt.jaxb" forcePluginActivation="true"/>
					</with>
				</and>
			</enablement>
			<action type="INSTALL">
				<config class="org.eclipse.jpt.jaxb.core.internal.libprov.JaxbJreLibraryProviderInstallOperationConfig"/>
				<operation class="org.eclipse.jst.common.project.facet.core.libprov.NoOpLibraryProviderOperation"/>
			</action>
			<action type="UNINSTALL">
				<operation class="org.eclipse.jst.common.project.facet.core.libprov.NoOpLibraryProviderOperation"/>
			</action>
		</provider>
		
		<provider
			id="jaxb-user-library-provider"
			extends="wtp-user-library-provider">
			<enablement>
				<with variable="requestingProjectFacet">
					<test property="org.eclipse.wst.common.project.facet.core.projectFacet" 
						value="jpt.jaxb" forcePluginActivation="true"/>
				</with>
			</enablement>
			<action type="INSTALL">
				<config class="org.eclipse.jpt.jaxb.core.internal.libprov.JaxbUserLibraryProviderInstallOperationConfig"/>
				<operation class="org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperation"/>
			</action>
		</provider>
		
		<!--
		<provider 
			id="jaxb-osgi-bundles-library-provider"
			extends="wtp-osgi-bundles-library-provider"
			abstract="true">
			<enablement>
				<with variable="requestingProjectFacet">
					<test property="org.eclipse.wst.common.project.facet.core.projectFacet" 
						value="jpt.jaxb" forcePluginActivation="true"/>
				</with>
			</enablement>
			<action type="INSTALL">
				<config class="org.eclipse.jpt.jaxb.core.internal.libprov.JaxbOsgiBundlesLibraryProviderInstallOperationConfig"/>
				<operation class="org.eclipse.jst.j2ee.internal.common.classpath.WtpOsgiBundlesLibraryProviderInstallOperation"/>
			</action>
		</provider>
		
		<provider
			id="jaxb-eclipselink-bundles-library-provider"
			extends="jaxb-osgi-bundles-library-provider"
			abstract="true"/>
		-->
		
	</extension>
	
	
	<extension 
		point="org.eclipse.wst.common.project.facet.core.runtimes">
		
		<supported>
			<facet id="jpt.jaxb"/>
			<runtime-component any="true"/>
		</supported>
		
	</extension>
	
	
	<extension
		point="org.eclipse.wst.common.project.facet.core.facets">
		
		<project-facet id="jpt.jaxb">
			<label>%JAXB_FACET_LABEL</label>
			<description>%JAXB_FACET_DESCRIPTION</description>
		</project-facet>
		
		<project-facet-version facet="jpt.jaxb" version="2.1">
			<constraint>
				<requires facet="java" version="[5.0"/>
			</constraint>
		</project-facet-version>
		
		<project-facet-version facet="jpt.jaxb" version="2.2">
			<constraint>
				<requires facet="java" version="[5.0"/>
			</constraint>
		</project-facet-version>
		
		<template id="jpt.jaxb.template">
			<label>%JAXB_TEMPLATE_LABEL</label>
			<fixed facet="jpt.jaxb"/>
			<fixed facet="java"/>
		</template>
		
		<action facet="jpt.jaxb" type="install" id="jpt.jaxb.install">
			<config-factory class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetInstallDataModelProvider"/>
			<delegate class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetInstallDelegate"/>
		</action>
		
		<action facet="jpt.jaxb" type="version-change" id="jpt.jaxb.version-change">
			<config-factory class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetVersionChangeDataModelProvider"/>
			<delegate class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetVersionChangeDelegate"/>
		</action>
		
		<action facet="jpt.jaxb" type="uninstall" id="jpt.jaxb.uninstall">
			<delegate class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetUninstallDelegate"/>
		</action>
		
	</extension>
	
	
	<extension
		point="org.eclipse.wst.validation.validatorV2"
		id="jaxbValidator"
		name="%JAXB_VALIDATOR">
		
		<validator
        	class="org.eclipse.jpt.jaxb.core.internal.validation.JaxbValidator"
        	markerId="org.eclipse.jpt.jaxb.core.jaxbProblemMarker">
			<include>
				<rules>
					<facet id="jpt.jaxb"/>
				</rules>
			</include>
			<include>
				<rules>
					<contentType id="org.eclipse.jdt.core.javaSource" exactMatch="false"/>
					<contentType id="org.eclipse.jpt.core.content.javaPackageInfo" exactMatch="false"/>
				</rules>
			</include>
		</validator>
		
	</extension>
		
</plugin>

Back to the top