| Summary: | resetCreationTarget of CSSModelParser.java in org.eclipse.wst.css.core behaves incorrectly | ||
|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Badrinarayan <badri_ravi83> |
| Component: | wst.css | Assignee: | wst.css <wst.css-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Nick Sandonato <nsand.dev> |
| Severity: | normal | ||
| Priority: | P3 | CC: | nsand.dev |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Build Identifier: v200911162000 Thanks for the report. Ian's looking at this in Bug 298111. *** This bug has been marked as a duplicate of bug 298111 *** |
Build Identifier: resetCreationTarget of CSSModelParser.java in org.eclipse.wst.css.core behaves incorrectly . Earlier in the code if (cursorNode == node) { // v<--| // AAAAAA // BBBBBBBBBB cursorNode:A , node:B -> target is A if (bOverOpenBrace && cursorNode instanceof CSSRuleDeclContainer) { targetNode = (CSSNodeImpl) ((CSSRuleDeclContainer) cursorNode).getStyle(); } else { targetNode = cursorNode; } } the targetNode was initialized correctly with cursorNode if first if fails. but a new else if(cursorPos == newStructuredDocumentRegion.getStartOffset() && cursorNode.getParentNode() != null) { targetNode = (CSSNodeImpl)cursorNode.getParentNode(); } has been added because of which targetNode is always assigned cursorNode.getParentNode() if the first if fails and never it comes to else part (int cursorPos = newStructuredDocumentRegion.getStartOffset() is done earlier in the code and cursor position value doesn't change) So there are exceptions caused later. This is because of fix for Bug 284583 - Stack Overflow caused by infinite loop in the CSS Outline Reproducible: Always