| Summary: | [typing] "Automatically close <angle> brackets" should not add > when type argument follows | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||
| Component: | Text | Assignee: | Markus Keller <markus.kell.r> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.7 M6 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 189751 [details]
Fix & Test
I took a look at the implementation and saw that it's not as easy as counting brackets.
A strategy that better suits editing in 1.5 code is to avoid closing angle brackets if the token following the caret location is the start of a valid type argument.
Fixed in HEAD. Thanks. |
HEAD The "Automatically close <angle> brackets" feature from the Typing preference page should not add the closing > when it is already present. This already works fine for (parentheses): import java.util.*; public class Try { void foo(Object o) { List<String> var= new ArrayList|String>(); foo|var); } } When you replace the "|" with "<" and "(", respectively, then you see the good behavior for "(" and the bad additional ">" that gets inserted after the "<".