| Summary: | Code formatter does not handle spaces properly in method declarations with nested parenthesis | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Cody Carroll <cmichaelcarroll> | ||||
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | mateusz.matela | ||||
| Version: | 4.5.1 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
*** Bug 480011 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 475746 *** |
Created attachment 257318 [details] core prefs It looks like the formatter detects the first closing paren in a method declaration as the final closing paren. In our project, we want to add spaces after the opening and before the closing parens of method declarations, but not for any annotations. The desired output of the formatter is something like this: @GET @Path("bracket") @Produces(MediaType.APPLICATION_JSON) public Response getBracket( // final @NotNull @QueryParam("platform") String platform, // final @NotNull @QueryParam("appVersion") String appVersion, // final @NotNull @QueryParam("appId") String appId, // final @Context HttpServletRequest request ) { return responseWithCachingHeaders( out, cacheTime ); } But the actual result is: @GET @Path("bracket") @Produces(MediaType.APPLICATION_JSON) public Response getBracket( // final @NotNull @QueryParam("platform" ) String platform, // final @NotNull @QueryParam("appVersion") String appVersion, // final @NotNull @QueryParam("appId") String appId, // final @Context HttpServletRequest request) { return responseWithCachingHeaders( out, cacheTime ); } The formatter has inserted a space after "platform", and removed the one before the closing paren.