| Summary: | Breakpoints being added to JSPs are not being hit | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Nick Sandonato <nsand.dev> | ||||||||
| Component: | jst.jsp | Assignee: | Nick Sandonato <nsand.dev> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Nick Sandonato <nsand.dev> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | ndsilva, thatnitind | ||||||||
| Version: | 3.2.2 | Flags: | thatnitind:
review+
|
||||||||
| Target Milestone: | 3.2.3 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Nick Sandonato
Created attachment 185093 [details]
patch
Don't forget to check for contentType also being null (in addition to pattern) and for trailing commas, not just extraneous leading ones. Created attachment 185097 [details]
updated patch
Almost a guaranteed IOOBE from buffer.charAt(buffer.length()). Created attachment 185168 [details]
Corrects potential IIOBE
Thanks for the review. Committed. There is an issue with this patch that has to do with the content type hierarchy. If I contribute the same pattern to the cssjspfragment content type and the jspfragment content type, then the final pattern contains duplicates. Is there a way to check for duplicates or the content type hierarchy? (In reply to comment #7) > There is an issue with this patch that has to do with the content type > hierarchy. > If I contribute the same pattern to the cssjspfragment content type and the > jspfragment content type, then the final pattern contains duplicates. > Is there a way to check for duplicates or the content type hierarchy? Is there a reason not to attach the pattern to the main JSP content type? My pattern is specified for the base JSP content type. When Platform.getContentTypeManager().findContentTypesFor(resource.getName()) in JavaStratumBreakpointProvider.getClassPattern() is called on a .jspf file, the only two content types returned are the css jsp fragment and the jsp fragment. The base JSP content type is not included in the list. So, I had to explicitly add a pattern provider for those types, which results in the patterns being added to the breakpoint twice. So, perhaps the issue is in the findContentTypesFor() method. The easy thing to do would be to put all the patterns in a set until we had checked all the contributors. A side effect of this is that breakpoints in .jspf files do not work when debugging on Tomcat, since WTP itself does not specify patterns for the (css)/jsp fragment content types. (In reply to comment #7) > There is an issue with this patch that has to do with the content type > hierarchy. > If I contribute the same pattern to the cssjspfragment content type and the > jspfragment content type, then the final pattern contains duplicates. > Is there a way to check for duplicates or the content type hierarchy? Then I think we need a new bug to allow for and remove duplicates on our end. Opened bug 334150 for the issue with jsp fragments. |