[
https://issues.jboss.org/browse/JBIDE-16790?page=com.atlassian.jira.plugi...
]
Xavier Coulon commented on JBIDE-16790:
---------------------------------------
[~rrabara],
I just tried to reproduce the problem here, and I think we did not test the same use
cases:
- AFAICS, you removed the {{@FOO}} annotation on the {{Customer#fooCustomer}} method, and
as a consequence, the associated JAX-RS endpoint was removed from the Project Explorer.
Adding the {{@FOO}} annotation back again and the JAX-RS endpoint reappears, which is the
expected behaviour.
- What I fixed is: when the user removes the
{{@HttpMethod("FOO")}} meta-annotation on the {{FOO}} annotation, then as a
consequence, all associated JAX-RS endpoint are removed from the Project Explorer (or the
JAX-RS Resource Method may become JAX-RS Resource Locator Methods). If the user adds the
{{@HttpMethod("FOO")}} meta-annotation back again, the JAX-RS endpoint reappear
in the Project Explorer.
Sorry for the previous misunderstanding (and sorry for not spotting that for Beta1).
Please, let me know if the instructions are more clear now ;-)
Should add/remove Resource Methods and Endpoints when adding/removing
@HttpMethod annotation
--------------------------------------------------------------------------------------------
Key: JBIDE-16790
URL:
https://issues.jboss.org/browse/JBIDE-16790
Project: Tools (JBoss Tools)
Issue Type: Enhancement
Components: webservices
Affects Versions: 4.1.1.Final
Reporter: Xavier Coulon
Assignee: Xavier Coulon
Fix For: 4.2.0.Beta2
Attachments: httpMethod01.jpg, httpMethod02.jpg, httpMethod03.jpg
When adding or removing the @HttpMethod annotation on a custom JAX-RS HTTP Method, the
Project Explorer should reflect the changes
Eg:
{code}
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@HttpMethod("FOO")
public @interface FOO {
}
{code}
and
{code}
@Encoded
@Path(value=CustomerResource.URI_BASE)
@Consumes(MediaType.APPLICATION_XML)
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public class CustomerResource {
@PersistenceContext
private EntityManager entityManager = null;
public static final String URI_BASE = "/customers";
@FOO
@Consumes(MediaType.APPLICATION_XML)
public Response fooCustomer(Customer customer) {
return Response.created(null).build();
}
}
{code}
Current workaround: the project needs to be rebuilt to see the changes.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)