Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 495615

Summary: Templates with mulitple lines should respect existing indentation
Product: [ECD] Orion Reporter: Eric Moffatt <emoffatt>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Michael_Rennie
Version: 12.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Eric Moffatt CLA 2016-06-07 13:21:39 EDT
Found this one when using the 'for (with loop variable)' template.

        var thisiscode;
       	for (var i=0; i<array.length; i++) {
    var value = array[i];
	
}

note that the result is not indented correctly...my guess would be that every line in the template should be preceded by whatever characters are before the initial 'for' ??
Comment 1 Eric Moffatt CLA 2016-06-07 13:59:31 EDT
Is there any chance we could put some spaces around the '=' and '<' ? My eyes do better that way :)
Comment 2 Michael Rennie CLA 2016-06-07 15:43:00 EDT
(In reply to Eric Moffatt from comment #1)
> Is there any chance we could put some spaces around the '=' and '<' ? My
> eyes do better that way :)

Updated the spacing in our templates in:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ecf9762638c0e8a9724d65bdbff732a41706df0c
Comment 3 Curtis Windatt CLA 2016-06-07 17:12:19 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7915e2e461ec17661866286612514e1e2dee56bf
Fixed in master with tests

This will apply to any template that has newlines in it.