I have a class as a sub resource and when ran, everything works with no errors except for eclipse show red underline, how can I make eclipse "know" that the parent @Path is part of it.

ex.![enter image description here](https://i.stack.imgur.com/Vj7Uq.png)

in MessageResouce

```
@Path("/{messageId}/comments")
    public CommentResource getCommentResource() {
        return new CommentResource();
    }

```

and in CommentResource

```
@Path("/") // optional for subresources
@Produces(MediaType.APPLICATION_XML)
@Consumes(MediaType.APPLICATION_XML)
public class CommentResource {

    private CommentService commentService = new CommentService();

    @GET
    public List<Comment> getAllComments(@PathParam("messageId") long messageId) {
        return commentService.getAllComments(messageId);
    }

    @POST
    public Comment addMessage(@PathParam("messageId") long messageId,
            Comment comment) {
        return commentService.addComment(messageId, comment);
    }

    @PUT
    @Path("/{commentId}")
    public Comment updateMessage(@PathParam("messageId") long messageId,
            @PathParam("commentId") long commentId, Comment comment) {
        comment.setId(commentId);
        return commentService.updateComment(messageId, comment);

    }

    @GET
    @Path("/{commentId}")
    public String test2(@PathParam("messageId") long messageId,
            @PathParam("commentId") long commentId) { // messageId still gets
                                                        // passed from parent
                                                        // resource
        return "Method return commment id: " + commentId + " and messageId: "
                + messageId;
    }

    @DELETE
    @Path("/{commentId}")
    public void deleteComment(@PathParam("messageId") long messageId,
            @PathParam("commentId") long commentId) {

        commentService.removeComment(messageId, commentId);

    }

}

```

All the messageId path parameters are underlined with red with error but everything runs fine, it's annoying to see that there and I don't want anyone that might look at my code to freak out.

Thanks