View | Details | Raw Unified | Return to bug 228298 | Differences between
and this patch

Collapse All | Expand All

(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 109-115 Link Here
109
   org.eclipse.jst.jsf.facelet.ui",
109
   org.eclipse.jst.jsf.facelet.ui",
110
 org.eclipse.jst.jsf.taglibprocessing.attributevalues,
110
 org.eclipse.jst.jsf.taglibprocessing.attributevalues,
111
 org.eclipse.jst.jsf.validation.internal;x-friends:="org.eclipse.jst.jsf.ui",
111
 org.eclipse.jst.jsf.validation.internal;x-friends:="org.eclipse.jst.jsf.ui",
112
 org.eclipse.jst.jsf.validation.internal.appconfig;x-friends:="org.eclipse.jst.jsf.core.tests",
112
 org.eclipse.jst.jsf.validation.internal.appconfig;x-friends:="org.eclipse.jst.jsf.ui,org.eclipse.jst.jsf.core.tests",
113
 org.eclipse.jst.jsf.validation.internal.constraints;x-internal:=true,
113
 org.eclipse.jst.jsf.validation.internal.constraints;x-internal:=true,
114
 org.eclipse.jst.jsf.validation.internal.constraints.impl;x-internal:=true,
114
 org.eclipse.jst.jsf.validation.internal.constraints.impl;x-internal:=true,
115
 org.eclipse.jst.jsf.validation.internal.constraints.util;x-internal:=true,
115
 org.eclipse.jst.jsf.validation.internal.constraints.util;x-internal:=true,
(-)src/org/eclipse/jst/jsf/validation/internal/appconfig/AppConfigValidator.java (-60 / +87 lines)
Lines 7-13 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *    Cameron Bateman/Oracle - initial API and implementation
9
 *    Cameron Bateman/Oracle - initial API and implementation
10
 *    
10
 *
11
 ********************************************************************************/
11
 ********************************************************************************/
12
package org.eclipse.jst.jsf.validation.internal.appconfig;
12
package org.eclipse.jst.jsf.validation.internal.appconfig;
13
13
Lines 20-29 Link Here
20
20
21
import org.eclipse.core.resources.IFile;
21
import org.eclipse.core.resources.IFile;
22
import org.eclipse.core.resources.IProject;
22
import org.eclipse.core.resources.IProject;
23
import org.eclipse.core.resources.IResource;
23
import org.eclipse.core.resources.IWorkspaceRoot;
24
import org.eclipse.core.resources.IWorkspaceRoot;
24
import org.eclipse.core.resources.ResourcesPlugin;
25
import org.eclipse.core.resources.ResourcesPlugin;
25
import org.eclipse.core.runtime.CoreException;
26
import org.eclipse.core.runtime.CoreException;
26
import org.eclipse.core.runtime.IPath;
27
import org.eclipse.core.runtime.IPath;
28
import org.eclipse.core.runtime.IProgressMonitor;
27
import org.eclipse.core.runtime.IStatus;
29
import org.eclipse.core.runtime.IStatus;
28
import org.eclipse.core.runtime.Path;
30
import org.eclipse.core.runtime.Path;
29
import org.eclipse.core.runtime.Status;
31
import org.eclipse.core.runtime.Status;
Lines 37-47 Link Here
37
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
39
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
38
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
40
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
39
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
41
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
42
import org.eclipse.wst.validation.AbstractValidator;
43
import org.eclipse.wst.validation.ValidationResult;
44
import org.eclipse.wst.validation.ValidationState;
40
import org.eclipse.wst.validation.internal.core.ValidationException;
45
import org.eclipse.wst.validation.internal.core.ValidationException;
41
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
46
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
42
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
47
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
43
import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
48
import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
44
import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
49
import org.eclipse.wst.validation.internal.provisional.core.IValidator;
45
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
50
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
46
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
51
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
47
import org.w3c.dom.DocumentType;
52
import org.w3c.dom.DocumentType;
Lines 49-90 Link Here
49
import org.w3c.dom.Node;
54
import org.w3c.dom.Node;
50
import org.w3c.dom.NodeList;
55
import org.w3c.dom.NodeList;
51
56
52
/** 
57
/**
53
 * General build-time validator for the JSF application configuration file  (faces-config.xml)b
58
 * General build-time validator for the JSF application configuration file  (faces-config.xml)b
54
 *
59
 *
55
 * @author cbateman
60
 * @author cbateman
56
 *
61
 *
57
 */
62
 */
58
public class AppConfigValidator implements IValidatorJob {
63
public class AppConfigValidator extends AbstractValidator implements IValidator {
59
64
60
    public ISchedulingRule getSchedulingRule(IValidationContext helper) {
65
    @Override
66
	public ValidationResult validate(final IResource resource, final int kind,
67
			final ValidationState state, final IProgressMonitor monitor) {
68
		final ValidationResult vr = new ValidationResult();
69
		if (resource == null || !(resource instanceof IFile)) {
70
			return vr;
71
		}
72
		final IReporter reporter = vr.getReporter(monitor);
73
		validateFile((IFile) resource, reporter);
74
		return vr;
75
	}
76
77
	/**
78
	 * @param helper
79
	 * @return the scheduling rull for this validator
80
	 */
81
	public ISchedulingRule getSchedulingRule(final IValidationContext helper) {
61
        // no scheduling rule
82
        // no scheduling rule
62
        return null;
83
        return null;
63
    }
84
    }
64
85
65
    public IStatus validateInJob(IValidationContext helper, IReporter reporter)
86
    /**
87
     * @param helper
88
     * @param reporter
89
     * @return the result of running validation
90
     * @throws ValidationException
91
     */
92
    public IStatus validateInJob(final IValidationContext helper, final IReporter reporter)
66
            throws ValidationException {
93
            throws ValidationException {
67
        IStatus status = Status.OK_STATUS;
94
        IStatus status = Status.OK_STATUS;
68
        try {
95
        try {
69
            validate(helper, reporter);
96
            validate(helper, reporter);
70
        }
97
        }
71
        catch (ValidationException e) {
98
        catch (final ValidationException e) {
72
            Logger.logException(e);
99
            Logger.logException(e);
73
            status = new Status(IStatus.ERROR, JSFCorePlugin.getDefault().getPluginID(), IStatus.ERROR, e.getLocalizedMessage(), e);
100
            status = new Status(IStatus.ERROR, JSFCorePlugin.getDefault().getPluginID(), IStatus.ERROR, e.getLocalizedMessage(), e);
74
        }
101
        }
75
        return status;
102
        return status;
76
    }
103
    }
77
104
78
    public void cleanup(IReporter reporter) {
105
    public void cleanup(final IReporter reporter) {
79
        // no cleanup
106
        // no cleanup
80
107
81
    }
108
    }
82
109
83
    public void validate(IValidationContext helper, IReporter reporter)
110
    public void validate(final IValidationContext helper, final IReporter reporter)
84
            throws ValidationException 
111
            throws ValidationException
85
    {
112
    {
86
        String[] uris = helper.getURIs();
113
        final String[] uris = helper.getURIs();
87
        IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
114
        final IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
88
        if (uris.length > 0) {
115
        if (uris.length > 0) {
89
            IFile currentFile = null;
116
            IFile currentFile = null;
90
117
Lines 101-107 Link Here
101
                }
128
                }
102
            }
129
            }
103
        }
130
        }
104
        
131
105
        // copied from JSPValidator TODO: perhaps just use app config locator?
132
        // copied from JSPValidator TODO: perhaps just use app config locator?
106
//        else {
133
//        else {
107
//
134
//
Lines 134-153 Link Here
134
//        }
161
//        }
135
    }
162
    }
136
163
137
    private void validateFile(IFile file, IReporter reporter)
164
    private void validateFile(final IFile file, final IReporter reporter)
138
    {
165
    {
139
        FacesConfigArtifactEdit  facesConfigEdit = null;
166
        FacesConfigArtifactEdit  facesConfigEdit = null;
140
        
167
141
        try
168
        try
142
        {
169
        {
143
            IPath path = JSFAppConfigUtils.getWebContentFolderRelativePath(file);
170
            final IPath path = JSFAppConfigUtils.getWebContentFolderRelativePath(file);
144
            facesConfigEdit = FacesConfigArtifactEdit.
171
            facesConfigEdit = FacesConfigArtifactEdit.
145
                getFacesConfigArtifactEditForRead(file.getProject(), path.toString());
172
                getFacesConfigArtifactEditForRead(file.getProject(), path.toString());
146
            
173
147
            if (facesConfigEdit != null
174
            if (facesConfigEdit != null
148
                    && facesConfigEdit.getFacesConfig()!=null)
175
                    && facesConfigEdit.getFacesConfig()!=null)
149
            {
176
            {
150
                String version = validateVersioning(file, facesConfigEdit, reporter);
177
                final String version = validateVersioning(file, facesConfigEdit, reporter);
151
                validateModel(file, facesConfigEdit,reporter, version);
178
                validateModel(file, facesConfigEdit,reporter, version);
152
            }
179
            }
153
        }
180
        }
Lines 159-196 Link Here
159
            }
186
            }
160
        }
187
        }
161
    }
188
    }
162
    
189
163
    /**
190
    /**
164
     * Ensure that the expected project version (facet) jives with what is in
191
     * Ensure that the expected project version (facet) jives with what is in
165
     * the faces-config.  Generally this means:
192
     * the faces-config.  Generally this means:
166
     * 
193
     *
167
     * if (version == 1.1) then no 1.2 artifacts (error)
194
     * if (version == 1.1) then no 1.2 artifacts (error)
168
     * if (version == 1.2) then warn if using old artifacts (warning)
195
     * if (version == 1.2) then warn if using old artifacts (warning)
169
     */
196
     */
170
    private String validateVersioning(IFile file, FacesConfigArtifactEdit facesConfigEdit, IReporter reporter)
197
    private String validateVersioning(final IFile file, final FacesConfigArtifactEdit facesConfigEdit, final IReporter reporter)
171
    {
198
    {
172
        final String appConfigFileVersion = getAppConfigFileVersion(facesConfigEdit);
199
        final String appConfigFileVersion = getAppConfigFileVersion(facesConfigEdit);
173
        
200
174
        if (appConfigFileVersion != null)
201
        if (appConfigFileVersion != null)
175
        {
202
        {
176
            final String projectVersion = getJSFVersion(file.getProject());
203
            final String projectVersion = getJSFVersion(file.getProject());
177
            
204
178
            if (IJSFCoreConstants.FACET_VERSION_1_1.equals(projectVersion)
205
            if (IJSFCoreConstants.FACET_VERSION_1_1.equals(projectVersion)
179
                    || IJSFCoreConstants.FACET_VERSION_1_0.equals(projectVersion))
206
                    || IJSFCoreConstants.FACET_VERSION_1_0.equals(projectVersion))
180
            {
207
            {
181
                if (IJSFCoreConstants.FACET_VERSION_1_2.equals(appConfigFileVersion))
208
                if (IJSFCoreConstants.FACET_VERSION_1_2.equals(appConfigFileVersion))
182
                {
209
                {
183
                    reporter.addMessage(this, 
210
                    reporter.addMessage(this,
184
                        DiagnosticFactory
211
                        DiagnosticFactory
185
                            .create_APP_CONFIG_IS_NEWER_THAN_JSF_VERSION(file));
212
                            .create_APP_CONFIG_IS_NEWER_THAN_JSF_VERSION(file));
186
                }
213
                }
187
            }
214
            }
188
            else if (IJSFCoreConstants.FACET_VERSION_1_2.equals(projectVersion))
215
            else if (IJSFCoreConstants.FACET_VERSION_1_2.equals(projectVersion))
189
            {
216
            {
190
                if (IJSFCoreConstants.FACET_VERSION_1_1.equals(appConfigFileVersion) 
217
                if (IJSFCoreConstants.FACET_VERSION_1_1.equals(appConfigFileVersion)
191
                        || IJSFCoreConstants.FACET_VERSION_1_0.equals(appConfigFileVersion))
218
                        || IJSFCoreConstants.FACET_VERSION_1_0.equals(appConfigFileVersion))
192
                {
219
                {
193
                    reporter.addMessage(this, 
220
                    reporter.addMessage(this,
194
                        DiagnosticFactory
221
                        DiagnosticFactory
195
                            .create_APP_CONFIG_IS_OLDER_THAN_JSF_VERSION(file
222
                            .create_APP_CONFIG_IS_OLDER_THAN_JSF_VERSION(file
196
                                    , appConfigFileVersion, projectVersion));
223
                                    , appConfigFileVersion, projectVersion));
Lines 200-220 Link Here
200
        }
227
        }
201
        return appConfigFileVersion;
228
        return appConfigFileVersion;
202
    }
229
    }
203
    
230
204
    /**
231
    /**
205
     * @param facesConfigEdit
232
     * @param facesConfigEdit
206
     * @return the version of the app config file or null if not determinant
233
     * @return the version of the app config file or null if not determinant
207
     */
234
     */
208
    private String getAppConfigFileVersion(FacesConfigArtifactEdit facesConfigEdit)
235
    private String getAppConfigFileVersion(final FacesConfigArtifactEdit facesConfigEdit)
209
    {
236
    {
210
        String appConfigVersion = null;
237
        String appConfigVersion = null;
211
        
238
212
        final IDOMModel domModel = facesConfigEdit.getIDOMModel();
239
        final IDOMModel domModel = facesConfigEdit.getIDOMModel();
213
        final IDOMDocument document = domModel.getDocument();
240
        final IDOMDocument document = domModel.getDocument();
214
        if (document == null) {return null;}
241
        if (document == null) {return null;}
215
        
242
216
        final DocumentType docType = domModel.getDocument().getDoctype();
243
        final DocumentType docType = domModel.getDocument().getDoctype();
217
        
244
218
        // if we have DTD doctype then we're looking at 1.1 or before
245
        // if we have DTD doctype then we're looking at 1.1 or before
219
        if (docType != null)
246
        if (docType != null)
220
        {
247
        {
Lines 227-278 Link Here
227
        }
254
        }
228
        else
255
        else
229
        {
256
        {
230
            NodeList rootNodes = domModel.getDocument().getChildNodes();
257
            final NodeList rootNodes = domModel.getDocument().getChildNodes();
231
            
258
232
            for (int i = 0; i < rootNodes.getLength(); i++)
259
            for (int i = 0; i < rootNodes.getLength(); i++)
233
            {
260
            {
234
                Node node = rootNodes.item(i);
261
                final Node node = rootNodes.item(i);
235
                if (node.getNodeType() == Node.ELEMENT_NODE
262
                if (node.getNodeType() == Node.ELEMENT_NODE
236
                        && "faces-config".equals(node.getLocalName()))
263
                        && "faces-config".equals(node.getLocalName()))
237
                {
264
                {
238
                    NamedNodeMap map = node.getAttributes();
265
                    final NamedNodeMap map = node.getAttributes();
239
                    // the most accurate thing is the version
266
                    // the most accurate thing is the version
240
                    Node versionAttrib = map.getNamedItem("version");
267
                    final Node versionAttrib = map.getNamedItem("version");
241
                    
268
242
                    if (versionAttrib != null)
269
                    if (versionAttrib != null)
243
                    {
270
                    {
244
                        appConfigVersion = versionAttrib.getNodeValue();
271
                        appConfigVersion = versionAttrib.getNodeValue();
245
                        break;
272
                        break;
246
                    }
273
                    }
247
                    
274
248
                    // TODO: add additional heuristic to parse out
275
                    // TODO: add additional heuristic to parse out
249
                    // the schema
276
                    // the schema
250
                }
277
                }
251
            }
278
            }
252
        }
279
        }
253
        
280
254
        return appConfigVersion;
281
        return appConfigVersion;
255
    }
282
    }
256
    
257
283
258
284
259
    private void validateModel(final IFile file, 
285
260
                               final FacesConfigArtifactEdit facesConfigEdit, 
286
    private void validateModel(final IFile file,
287
                               final FacesConfigArtifactEdit facesConfigEdit,
261
                               final IReporter reporter,
288
                               final IReporter reporter,
262
                               final String version)
289
                               final String version)
263
    {
290
    {
264
        final FacesConfigType facesConfigType = facesConfigEdit.getFacesConfig();
291
        final FacesConfigType facesConfigType = facesConfigEdit.getFacesConfig();
265
        FacesConfigValidator validator = new FacesConfigValidator(version);
292
        final FacesConfigValidator validator = new FacesConfigValidator(version);
266
        List messages = new ArrayList();
293
        final List messages = new ArrayList();
267
        validator.validate(facesConfigType, messages, file);
294
        validator.validate(facesConfigType, messages, file);
268
        
295
269
        for (final Iterator it = messages.iterator(); it.hasNext();)
296
        for (final Iterator it = messages.iterator(); it.hasNext();)
270
        {
297
        {
271
            IMessage message = (IMessage) it.next();
298
            final IMessage message = (IMessage) it.next();
272
            reporter.addMessage(this, message);
299
            reporter.addMessage(this, message);
273
        }
300
        }
274
    }
301
    }
275
    
302
276
    /**
303
    /**
277
     * @param project
304
     * @param project
278
     * @return the version string for the JSF facet on project
305
     * @return the version string for the JSF facet on project
Lines 283-310 Link Here
283
        try
310
        try
284
        {
311
        {
285
            final IFacetedProject facetedProject = ProjectFacetsManager.create(project);
312
            final IFacetedProject facetedProject = ProjectFacetsManager.create(project);
286
            Set facets = facetedProject.getProjectFacets();
313
            final Set facets = facetedProject.getProjectFacets();
287
            
314
288
            for (final Iterator it = facets.iterator(); it.hasNext();)
315
            for (final Iterator it = facets.iterator(); it.hasNext();)
289
            {
316
            {
290
                IProjectFacetVersion  facetVersion = 
317
                final IProjectFacetVersion  facetVersion =
291
                    (IProjectFacetVersion) it.next();
318
                    (IProjectFacetVersion) it.next();
292
                
319
293
                if (IJSFCoreConstants.JSF_CORE_FACET_ID.equals(facetVersion.getProjectFacet().getId()))
320
                if (IJSFCoreConstants.JSF_CORE_FACET_ID.equals(facetVersion.getProjectFacet().getId()))
294
                {
321
                {
295
                    return facetVersion.getVersionString();
322
                    return facetVersion.getVersionString();
296
                }
323
                }
297
            }
324
            }
298
        }
325
        }
299
        catch (CoreException ce)
326
        catch (final CoreException ce)
300
        {
327
        {
301
            JSFCorePlugin.log(ce, "Problem loading faceted project");
328
            JSFCorePlugin.log(ce, "Problem loading faceted project");
302
            // fall-through and return null
329
            // fall-through and return null
303
        }
330
        }
304
        return null;
331
        return null;
305
    }
332
    }
306
    
333
307
    private String extractVersionFromPublicId(DocumentType docType)
334
    private String extractVersionFromPublicId(final DocumentType docType)
308
    {
335
    {
309
        final String publicId = docType.getPublicId();
336
        final String publicId = docType.getPublicId();
310
        final String publicIdRegex = "-\\/\\/(.*)\\/\\/(.*)\\/\\/.*";
337
        final String publicIdRegex = "-\\/\\/(.*)\\/\\/(.*)\\/\\/.*";
Lines 312-337 Link Here
312
        if (publicId != null)
339
        if (publicId != null)
313
        {
340
        {
314
            final Pattern pattern = Pattern.compile(publicIdRegex);
341
            final Pattern pattern = Pattern.compile(publicIdRegex);
315
            Matcher matcher = pattern.matcher(publicId);
342
            final Matcher matcher = pattern.matcher(publicId);
316
343
317
            if (matcher.matches())
344
            if (matcher.matches())
318
            {
345
            {
319
                final String classTypeString = matcher.group(2);
346
                final String classTypeString = matcher.group(2);
320
                final String[] classTypes = classTypeString.split("\\s+");
347
                final String[] classTypes = classTypeString.split("\\s+");
321
                
348
322
                // verify that the class type is a DTD
349
                // verify that the class type is a DTD
323
                if (classTypes.length > 0
350
                if (classTypes.length > 0
324
                        && "DTD".equals(classTypes[0]))
351
                        && "DTD".equals(classTypes[0]))
325
                {
352
                {
326
                    // either 1.0 or 1.1; be most conservative
353
                    // either 1.0 or 1.1; be most conservative
327
                    String appConfigVersion = IJSFCoreConstants.JSF_VERSION_1_0;
354
                    String appConfigVersion = IJSFCoreConstants.JSF_VERSION_1_0;
328
                   
355
329
                    // see if the version is in the public id
356
                    // see if the version is in the public id
330
                    if (IJSFCoreConstants.JSF_VERSION_1_1.equals(classTypes[classTypes.length-1]))
357
                    if (IJSFCoreConstants.JSF_VERSION_1_1.equals(classTypes[classTypes.length-1]))
331
                    {
358
                    {
332
                        appConfigVersion = IJSFCoreConstants.FACET_VERSION_1_1;
359
                        appConfigVersion = IJSFCoreConstants.FACET_VERSION_1_1;
333
                    }
360
                    }
334
                    
361
335
                    return appConfigVersion;
362
                    return appConfigVersion;
336
                }
363
                }
337
            }
364
            }
Lines 340-353 Link Here
340
        return null;
367
        return null;
341
    }
368
    }
342
369
343
    private String extractVersionFromSystemId(DocumentType docType) 
370
    private String extractVersionFromSystemId(final DocumentType docType)
344
    {
371
    {
345
        final String systemId = docType.getSystemId();
372
        final String systemId = docType.getSystemId();
346
        final String systemIdRegEx = "http:\\/\\/java.sun.com\\/dtd\\/web-facesconfig_(.*)\\.dtd";
373
        final String systemIdRegEx = "http:\\/\\/java.sun.com\\/dtd\\/web-facesconfig_(.*)\\.dtd";
347
        if (systemId != null)
374
        if (systemId != null)
348
        {
375
        {
349
            final Pattern pattern = Pattern.compile(systemIdRegEx);
376
            final Pattern pattern = Pattern.compile(systemIdRegEx);
350
            Matcher matcher = pattern.matcher(systemId);
377
            final Matcher matcher = pattern.matcher(systemId);
351
378
352
            if (matcher.matches())
379
            if (matcher.matches())
353
            {
380
            {
(-)plugin.xml (-58 / +88 lines)
Lines 126-189 Link Here
126
    </extension>
126
    </extension>
127
127
128
   <extension
128
   <extension
129
        point="org.eclipse.wst.validation.validator"
129
         id="JSFNonELAttributeValueValidator"
130
        id="JSFNonELAttributeValueValidator"
130
         name="%JSFNonELAttributeValueValidator"
131
        name="%JSFNonELAttributeValueValidator">
131
         point="org.eclipse.wst.validation.validatorV2">
132
        <validator>
132
      <validator
133
            <projectNature id="org.eclipse.wst.common.modulecore.ModuleCoreNature" />
133
            build="true"
134
            <projectNature id="org.eclipse.jdt.core.javanature" />
134
            class="org.eclipse.jst.jsf.ui.internal.validation.JSFValidator"
135
            <enablement>
135
            manual="true"
136
                <and>
136
            markerId="org.eclipse.jst.jsf.ui.JSPSemanticsValidatorMarker"
137
                    <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.java"/>
137
            sourceid="org.eclipse.jst.jsf.validation.JSFAttributeValueValidator"
138
                    <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.web"/>
138
            version="1">
139
                    <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.jsf"/>
139
         <include>
140
                </and>
140
            <rules>
141
            </enablement> 
141
               <facet
142
            
142
                     id="jst.java">
143
            <markerId
143
               </facet>
144
               markerIdValue="JSPSemanticsValidatorMarker">
144
            </rules>
145
            </markerId>
145
         </include>
146
            <helper 
146
         <include>
147
                class="org.eclipse.wst.validation.internal.operations.WorkbenchContext">
147
            <rules>
148
            </helper>
148
               <facet
149
            <run
149
                     id="jst.web">
150
                class="org.eclipse.jst.jsf.ui.internal.validation.JSFValidator"
150
               </facet>
151
                incremental="true"
151
            </rules>
152
                fullBuild="true"
152
         </include>
153
            />
153
         <include>
154
   <contentTypeBinding
154
            <rules>
155
         contentTypeId="org.eclipse.jst.jsp.core.jspsource">
155
               <facet
156
   </contentTypeBinding>
156
                     id="jst.jsf">
157
   <contentTypeBinding
157
               </facet>
158
         contentTypeId="org.eclipse.jst.jsp.core.jspfragmentsource">
158
            </rules>
159
   </contentTypeBinding>
159
         </include>
160
        </validator>
160
         <include>
161
        </extension>
161
            <rules>
162
        
162
               <projectNature
163
    <extension
163
                     id="org.eclipse.wst.common.modulecore.ModuleCoreNature">
164
        point="org.eclipse.wst.validation.validator"
164
               </projectNature>
165
        id="JSFAppConfigValidator"
165
            </rules>
166
        name="%JSFAppConfigValidator">
166
         </include>
167
        <validator>
167
         <include>
168
            <projectNature id="org.eclipse.wst.common.modulecore.ModuleCoreNature" />
168
            <rules>
169
            <projectNature id="org.eclipse.jdt.core.javanature" />
169
               <projectNature
170
            <filter
170
                     id="org.eclipse.jdt.core.javanature">
171
                objectClass="org.eclipse.core.resources.IFile"
171
               </projectNature>
172
                nameFilter="faces-config.xml">
172
            </rules>
173
            </filter>
173
         </include>
174
            <markerId
174
         <include>
175
               markerIdValue="JSPSemanticsValidatorMarker">
175
            <rules>
176
            </markerId>
176
               <contentType
177
            <helper 
177
                     exactMatch="false"
178
                class="org.eclipse.wst.validation.internal.operations.WorkbenchContext">
178
                     id="org.eclipse.jst.jsp.core.jspsource">
179
            </helper>
179
               </contentType>
180
            <run
180
               <contentType
181
                class="org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator"
181
                     exactMatch="true"
182
                incremental="true"
182
                     id="org.eclipse.jst.jsp.core.jspfragmentsource">
183
                fullBuild="true"
183
               </contentType>
184
            />
184
            </rules>
185
        </validator>
185
         </include>
186
    </extension>
186
         <group
187
               id="org.eclipse.wst.sse.core.structuredModelGroup">
188
         </group>
189
      </validator>
190
   </extension>
191
192
   <extension id="JSFAppConfigValidator" name="%JSFAppConfigValidator" point="org.eclipse.wst.validation.validatorV2">
193
      <validator
194
            build="true"
195
            class="org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator"
196
            manual="true"
197
            markerId="org.eclipse.jst.jsf.ui.JSPSemanticsValidatorMarker"
198
            version="1">
199
         <include>
200
            <rules>
201
				<projectNature id="org.eclipse.wst.common.modulecore.ModuleCoreNature"/>
202
            </rules>
203
         </include>
204
         <include>
205
            <rules>
206
				<projectNature id="org.eclipse.jdt.core.javanature"/>
207
            </rules>
208
         </include>
209
         <include>
210
            <rules>
211
				<contentType id="org.eclipse.jst.jsf.facesconfig.facesConfigFile" exactMatch="true" />
212
            </rules>
213
         </include>
214
      </validator>
215
   </extension>
216
187
    <extension
217
    <extension
188
          point="org.eclipse.ui.editors.templates">
218
          point="org.eclipse.ui.editors.templates">
189
       <template
219
       <template

Return to bug 228298