WS tools 3.3.0 M2 What's New

< Main Index DeltaCloud Tools >


JAX-RS Tooling

This release introduces the work done by Xavier Coulon with respect to JAX-RS tooling. The JAX-RS tooling is supposed to complement and extend the JAX-RS tooling found in Eclipse WTP but also to work on plain Java projects.

The JAX-RS tooling includes a mapping of JAX-RS Resources to the source, validation of JAX-RS constructs and code completion for JAX-RS annotation values.

The tooling is not yet complete but is very functional and we are looking forward to get feedback on its current functionality and what you would like to see in the future.


Enable JAX-RS 1.1 Support

If you are using Eclipse WTP and enable the JAX-RS facet then JBoss Tools JAX-RS support will be added automatically.

You can also enable JBoss Tools JAX-RS support on any Java project via the Configure > JAX-RS 1.1 Support...

In both cases, this enablement adds a JAX-RS Builder to your project that will participate during building of your project to collect JAX-RS related resources.

RESTful Web Services Explorer

When you have enabled JAX-RS a "RESTful Web Services" node in the Project Explorer outlines the various RESTful services that your project contains. The outline will update when you save changes to your code.

Each element in the navigator displays the resolved HTTP Method (GET, POST, etc.) followed by the URI Path Template (/customers/{id}, etc.). This resolution includes @Path annotations at type and at method levels of both Resources and Subresources, as well as the optional @ApplicationPath annotation on a subclass of

Under each element, you'll see the resolved consumed and produced media types (based on the annotations at method or type level) and the associated Java method.

To navigate easily to the related source code for a JAX-RS resource you can double click the elements of the resource explorer and it will open and highlight the related source code. You can also copy the URI Path Template into your clipboard.

JAX-RS Validation

JAX-RS tooling will do validation and mark problem found during building.

In this release, an error is displayed if the @PathParam does not match what is defined in the @Path.

JAX-RS Code completion

There are code completion for template mappings for @PathParam based on what is in the @Path, in association with the Validation shown above.