Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322847 - Autoedit strategy for newlines in CSS should indent correctly
Summary: Autoedit strategy for newlines in CSS should indent correctly
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.css (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.3 M1   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-16 17:17 EDT by Nick Sandonato CLA
Modified: 2010-08-28 17:22 EDT (History)
1 user (show)

See Also:


Attachments
patch (3.24 KB, patch)
2010-08-16 17:23 EDT, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Sandonato CLA 2010-08-16 17:17:49 EDT
When adding a newline for a CSS selector, proper indentation should be added. For example:

a {|}

pressing Enter at the | should cause the format

a {
[tab]|
}
Comment 1 Nick Sandonato CLA 2010-08-16 17:23:44 EDT
Created attachment 176740 [details]
patch
Comment 2 Nick Sandonato CLA 2010-08-16 17:25:28 EDT
Released.
Comment 3 jzaruba CLA 2010-08-28 17:22:33 EDT
I'm not sure I do understand what 'Autoedit strategy' means here, but auto-indent in CSS editor still works in a weird way.

div|

^^ now hitting Enter should not produce this:
div
\t|
but rather this:
div
|


... and if I go along with this weird indent and create a block:

div
\t{|
\t}

^^ hitting Enter should definitely add indentation, instead what I get is this:
div
\t{
\t|
\t}

I believe the CSS-editor goes against the auto-indent habits/conventions, where the rule is quite simple: 'add indent after opening curly brace, remove indent before one, maintan indent otherwise'.