Syntax expansion fails to indent after first line
to reproduce: inside an indented context (such as a method body) type a keyword with a multiline expansion template (e.g. "if") and hit ctrl-space and select the template to expand.
Actual Result: the template expands, but every line after the first has an indent of 0.
Example
[before]
[after]
Desired Behavior: the expanded template is indented to fit the context
Actual Result: the template expands, but every line after the first has an indent of 0.
Example
[before]
object myObj {
def myFunc(x: int):int {
if
}
}
[after]
object myObj {
def myFunc(x:int):int {
if(condition) {
}
}
}
Desired Behavior: the expanded template is indented to fit the context
Leave a comment
on 2012-02-06 15:15 *
By skyluc
Type changed from Defect to Enhancement
Version changed from 2.0.0-beta10-29 to 2.0.0-final-29
Eclipse version changed from Helios to All
Assigned to changed from login to -none-
Component changed from None to Editor
Milestone changed from Helium to Enhancements
Status changed from New to Accepted
on 2014-04-04 11:49 *
By Iulian Dragos
Assigned to set to Iulian Dragos
Status changed from Accepted to Fixed
Indent templates to the same indentation as the line of the insertion point.
Simple solution that makes templates usable: even if they are not properly indented,
multi-line templates now align to the first non-whitespace character of the insertion point.
No tests because this is purely UI code.
Fix #1000058, #1000626,
Branch: master
Commit: scala-ide:0431a8f8c8
Simple solution that makes templates usable: even if they are not properly indented,
multi-line templates now align to the first non-whitespace character of the insertion point.
No tests because this is purely UI code.
Fix #1000058, #1000626,
Branch: master
Commit: scala-ide:0431a8f8c8