[
https://issues.jboss.org/browse/JBIDE-17078?page=com.atlassian.jira.plugi...
]
Alexey Kazakov commented on JBIDE-17078:
----------------------------------------
There is an event which triggers validation because .project has been modified. At least I
can see this event in debugger. JaxrsMetamodelValidator gets this event too. But there is
another problem. It works fine when there was not wst validation builder in the .project
and then you add enable our validator (Jaxrs, CDI, JSF,...) and add a new wst validator
builder. In this case this brand-new WST builder provides an empty list of modified
resources and our validation framework treats it as a validateAll() event. But if you have
already had a wst validation builder in the .project (in case of a Dynamic Web Project,
for example) and then enable a new validator (Jaxrs, CDI, ...) then WST provides a list of
modified resources (.project) and our validation framework generates a
validate(changedResources) event.
So in the test case above I see the following:
1. JaxrsMetamodelValidator.validate(Set<IFile> changedFiles,...) is invoked.
2. changedFiles is a set with the only member: ".project"
3. So JaxrsMetamodelValidator does not validate the whole project but tries to validate
the .project file and does not do anything since there is nothing to validate in the
changed .project file.
This is a common problem with our integration with WST validation.
You have to rebuild the project after enabling any our validator for any project with
enabled WST validation.
And BTW I noticed that if you enable JAX-RS support via project properties you don't
add WST validator (in case there is no WST validator in the .project file). It means that
if you enable JAX-RS support for example for a plain java project then the project
won't be validated either. This is easy to fix if you want. You can use
org.jboss.tools.jst.web.WebModelPlugin.addNatureToProjectWithValidationSupport(IProject
project, String builderId, String natureId) for that. See CDIUtil.enableCDI() as an
example.
JAX-RS Problems doesn't appears after the JAX-RS Support is
activated
---------------------------------------------------------------------
Key: JBIDE-17078
URL:
https://issues.jboss.org/browse/JBIDE-17078
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: webservices
Affects Versions: 4.2.0.Beta1
Reporter: Radoslav RĂ¡bara
Assignee: Xavier Coulon
Fix For: 4.2.0.Beta3
JAX-RS validation runs when there is a change in the project with JAX-RS Support.
However, it doesn't run right after the JAX-RS Support is enabled.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)