Skip to main content
summaryrefslogtreecommitdiffstats
blob: 4389b3fabe4a83e57137e51560352bee3a518ab7 (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
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
  Copyright (c) 2011, 2013 Oracle. All rights reserved.
  This program and the accompanying materials are made available under the
  terms of the Eclipse Public License 2.0, which accompanies this distribution
  and is available at http://www.eclipse.org/legal/epl-2.0/.

  Contributors:
    Oracle - initial API and implementation
 -->
 
<plugin>

	<!-- ***** extension points ***** -->

	<extension-point
		id="libraryValidators"
		name="%LIBRARY_VALIDATORS"
		schema="schema/libraryValidators.exsd"/>

	<extension-point
		id="resourceLocators"
		name="%RESOURCE_LOCATORS"
		schema="schema/resourceLocators.exsd"/>

	<extension-point
		id="resourceTypes"
		name="%RESOURCE_TYPES"
		schema="schema/resourceTypes.exsd"/>


	<!-- ***** expression definitions ***** -->

	<extension
		point="org.eclipse.core.expressions.definitions">

		<!--
			Return whether a resource's project has the Java facet
			(or a project facet version matches the Java facet).
			Force activation of the WST facet plug-in containing the property tester.
			Example usage:
			<adapt type="org.eclipse.core.resources.IResource">
				<reference definitionId="org.eclipse.jpt.expression.hasJavaFacet"/>
			</adapt>
		-->
		<definition id="org.eclipse.jpt.expression.hasJavaFacet">
			<test property="org.eclipse.wst.common.project.facet.core.projectFacet"
				value="java"
				forcePluginActivation="true"/>
		</definition>

		<!-- Return whether a resource's project has the Static Web facet. -->
		<definition id="org.eclipse.jpt.expression.hasStaticWebFacet">
			<test property="org.eclipse.wst.common.project.facet.core.projectFacet"
				value="wst.web"
				forcePluginActivation="true"/>
		</definition>

		<!-- Return whether a resource's project has the Dynamic Web facet. -->
		<definition id="org.eclipse.jpt.expression.hasDynamicWebFacet">
			<test property="org.eclipse.wst.common.project.facet.core.projectFacet"
				value="jst.web"
				forcePluginActivation="true"/>
		</definition>

	</extension>


	<!-- ***** adapters ***** -->

	<extension
		point="org.eclipse.core.runtime.adapters">

		<!-- IWorkspace -> JptWorkspace -->
		<factory
			adaptableType="org.eclipse.core.resources.IWorkspace"
			class="org.eclipse.jpt.common.core.internal.WorkspaceAdapterFactory">
			<adapter type="org.eclipse.jpt.common.core.JptWorkspace"/>
		</factory>

		<!-- IProject -> ProjectResourceLocator -->
		<factory
			adaptableType="org.eclipse.core.resources.IProject"
			class="org.eclipse.jpt.common.core.internal.resource.ProjectAdapterFactory">
			<adapter type="org.eclipse.jpt.common.core.resource.ProjectResourceLocator"/>
		</factory>

	</extension>


	<!-- ***** content types ***** -->

	<extension
		point="org.eclipse.core.contenttype.contentTypes">

		<!-- JAR content type -->
		<content-type
			id="org.eclipse.jpt.common.core.content.jar"
			name="%JAR_CONTENT"
			file-extensions="jar, zip">
			<describer
				class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
				<parameter name="signature" value="50 4B 03 04"/>
			</describer>
		</content-type>

		<!-- package-info.java content type (for package annotations) -->
		<content-type
			id="org.eclipse.jpt.common.core.content.javaPackageInfo"
			name="%JAVA_PACKAGE_INFO_CONTENT"
			base-type="org.eclipse.jdt.core.javaSource"
			file-names="package-info.java"
			priority="normal">
		</content-type>

		<!-- faceted project file -->
		<content-type
			id="org.eclipse.jpt.common.core.content.projectFacet"
			name="%FACET_CONFIG_XML_CONTENT"
			file-names="org.eclipse.wst.common.project.facet.core.xml"
			base-type="org.eclipse.core.runtime.xml">
			<describer
				class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
				<parameter name="element" value="faceted-project"/>
			</describer>
		</content-type>

	</extension>


	<!-- ***** resource types (eat our own dogfood) ***** -->

	<extension 
		point="org.eclipse.jpt.common.core.resourceTypes">

		<resource-type
			id="org.eclipse.jpt.common.core.resource.jar"
			content-type="org.eclipse.jpt.common.core.content.jar"/>

		<resource-type
			id="org.eclipse.jpt.common.core.resource.javaPackageInfo"
			content-type="org.eclipse.jpt.common.core.content.javaPackageInfo"/>

		<resource-type
			id="org.eclipse.jpt.common.core.resource.javaSource"
			content-type="org.eclipse.jdt.core.javaSource"/>

	</extension>


	<!-- ***** property testers ***** -->

	<extension 
		point="org.eclipse.core.expressions.propertyTesters">

		<propertyTester
			id="org.eclipse.jpt.common.core.propertyTester.LibraryProvider"
			type="org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider"
			namespace="org.eclipse.jpt.common.core"
			properties="id, extendsId"
			class="org.eclipse.jpt.common.core.internal.LibraryProviderPropertyTester"/>

		<propertyTester
			id="org.eclipse.jpt.common.core.propertyTester.JptResourceTypeReference"
			type="org.eclipse.jpt.common.core.JptResourceTypeReference"
			namespace="org.eclipse.jpt.common.core"
			properties="resourceTypeIsKindOf"
			class="org.eclipse.jpt.common.core.internal.JptResourceTypeReferencePropertyTester"/>

		<propertyTester
			id="org.eclipse.jpt.common.core.propertyTester.Resource"
			type="org.eclipse.core.resources.IResource"
			namespace="org.eclipse.jpt.common.core"
			properties="anyReferencingProjectHasFacet"
			class="org.eclipse.jpt.common.core.internal.bundleexclude.ResourcePropertyTester"/>

	</extension>


	<!-- ***** EMF ecore package registry ***** -->

	<extension
		point="org.eclipse.emf.ecore.generated_package">

		<package
			uri="http://www.eclipse.org/dali/common"
			class="org.eclipse.jpt.common.core.resource.xml.CommonPackage"
			genModel="model/common.genmodel"/>
		
	</extension>


	<!-- ***** resource locators (eat our own dogfood) ***** -->

	<extension
		point="org.eclipse.jpt.common.core.resourceLocators">

		<resourceLocator
			id="simpleJavaResourceLocator"
			class="org.eclipse.jpt.common.core.internal.resource.SimpleJavaResourceLocator"
			priority="lowest">
			<enablement>
				<with variable="project">
					<reference definitionId="org.eclipse.jpt.expression.hasJavaFacet"/>
				</with>
			</enablement>
		</resourceLocator>

		<resourceLocator
			id="moduleResourceLocator"
			class="org.eclipse.jpt.common.core.internal.resource.ModuleResourceLocator"
			priority="lower">
			<enablement>
				<with variable="project">
					<and>
						<test property="org.eclipse.core.resources.projectNature" 
							value="org.eclipse.wst.common.modulecore.ModuleCoreNature" 
							forcePluginActivation="true"/>
						<not><reference definitionId="org.eclipse.jpt.expression.hasStaticWebFacet"/></not>
					</and>
				</with>
			</enablement>
		</resourceLocator>

		<resourceLocator
			id="webModuleResourceLocator"
			class="org.eclipse.jpt.common.core.internal.resource.WebModuleResourceLocator"
			priority="low">
			<enablement>
				<with variable="project">
					<reference definitionId="org.eclipse.jpt.expression.hasDynamicWebFacet"/>
				</with>
			</enablement>
		</resourceLocator>

		<resourceLocator
			id="pluginResourceLocator"
			class="org.eclipse.jpt.common.core.internal.resource.PluginResourceLocator"
			priority="normal">
			<enablement>
				<with variable="project">
					<test property="org.eclipse.core.resources.projectNature" 
						value="org.eclipse.pde.PluginNature" 
						forcePluginActivation="true"/>
				</with>
			</enablement>
		</resourceLocator>

	</extension>


	<!-- ***** WTP library providers ***** -->

	<extension 
		point="org.eclipse.jst.common.project.facet.core.libraryProviders">

		<provider 
			id="jpt-no-op-library-provider" 
			extends="no-op-library-provider"
			abstract="true">
			<param name="warning" value="%NO_OP_LIBRARY_PROVIDER_WARNING"/>
		</provider>

	</extension>

</plugin>

Back to the top