| Summary: | [misc] Tab key does not work in JSP Scriptlet when using insert spaces for tabs mode | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Jeff B <jeffb.misc> | ||||
| Component: | jst.jsp | Assignee: | Salvador Zalapa <zalapa> | ||||
| Status: | ASSIGNED --- | QA Contact: | Nick Sandonato <nsand.dev> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | mauromol, thatnitind | ||||
| Version: | unspecified | Flags: | zalapa:
review?
(nsand.dev) |
||||
| Target Milestone: | 3.6.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Jeff B
This looks like a result of the JavaAutoIndentStrategy running on the indent. It collapses it to "correct" indent for what should be at that line. For example, if you have
if (true) {
[]
}
and a tab is inserted at [], the correct indentation will occur.
I should add, this runs in TextViewer#customizeDocumentCommand Indeed this is caused do to JavaAutoIndentStrategy, when the text length of the command is higher than 1 (in this scenario the length is 4) it performs the a smartPaste, cutting the indent proposed. In order to confirm the statement, uncheck the "Adjust indentation" (Java>Editor>Typing) and notice that now it works correctly. Still investigating .. i just created https://bugs.eclipse.org/bugs/show_bug.cgi?id=404190 to reported the new issue. My mistake, sorry Please ignore the previous comment. Adding a proposed patch, that marks the command to not be handled by avaAutoIndentStrategy, i already test that the behavior remains untouched. https://github.com/zalapa/webtools.sourceediting/commit/c9063af64eb154730cd58235d1e340ec6a20f33f Created attachment 233764 [details]
patch
Nick, improving patch with your suggestions.
Yes, I am in compliance with the Certificate of Origin |