| Summary: | [content assist] Code assist BETWEEN 2 different Style rules does not work | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Yaron Mazor <yaron.m> | ||||||||
| Component: | wst.css | Assignee: | Nick Sandonato <nsand.dev> | ||||||||
| Status: | RESOLVED WONTFIX | QA Contact: | Nick Sandonato <nsand.dev> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | amkareh, nsand.dev, thatnitind | ||||||||
| Version: | 3.0 | Keywords: | helpwanted | ||||||||
| Target Milestone: | 3.4.2 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 143926 [details]
Fix Patch
Fixed code so that when a new selector in between Style rules is added using content assist, the proposal selected completes with brackets. Previously the new selector was being read as if it were part of multiple selectors for the same declaration. Now it checks if there is a separator (',' character) between the two selectors, and if there isn't it adds the brackets.
Created attachment 143927 [details]
JUnit Patch
This patch adds a JUnit which uses content assist to add a selector between to two Style rules and makes sure the output is as expected.
Created attachment 144048 [details]
JUnit Patch Updated
Updated JUnit
This appears to be working as design since adding a tag at the cursor location could very well be an ancestor in a descendant selector. To create a stand-alone rule after this, typing { will automatically insert the matching }.
|
1. I have the following CSS file : -------------------------------- 1 H1 { 2 3 } 4 5 | 6 7 H2 { 8 9 } The caret is positioned in line 5 where the | symbol. 2. Now I write a new selector H3 in line 5 (see caret's new location): --------------------------------------------------------------------- 1 H1 { 2 3 } 4 5 H3| 6 7 H2 { 8 9 } 3. Press CTRL+SPACE and choose H3 from the proposals list No completion of brackets is added.