This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 210682

Summary: Code completion does not respect nesting
Product: xml Reporter: Peter Nabbefeld <epdv>
Component: CodeAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description Peter Nabbefeld 2012-04-04 09:47:30 UTC
E.g., creating an XML document using an XSL stylesheet like this:
<xsl:element name="outer">
    <xsl:for-each select="$some-node/test">
        <xsl:element name="inner">TEST</xsl:element>
    </xsl:for-each>
</xsl:element>

If You've already created the "outer" element tags and the loop, there's no completion for the "inner" element tags.
Comment 1 Svata Dedic 2012-04-04 15:01:43 UTC
Sorry, do you mean that if you place cursor inside the xsl:for-each Element,then you don't get CC: for (e.g.) XSL namepace ?
Comment 2 Peter Nabbefeld 2012-08-30 13:01:18 UTC
Sorry, didn't notice Your question in April - only noticed closing now.

Just try this:
1. Write
<xsl:element name="outer">
    <xsl:for-each select="$some-node/test">

    </xsl:for-each>
</xsl:element>

2. Add the opening tag for xsl:element and the text inside
<xsl:element name="outer">
    <xsl:for-each select="$some-node/test">
        <xsl:element name="inner">TEST
    </xsl:for-each>
</xsl:element>

3. Place the cursor behind the text and try code completion
Result: You'll see several xsl tags, but not the closing one.
The last closing tag is "thought" to be the closing one, already,
though it cannot be correct, as the first outer block is xsl:for-each
Comment 3 Martin Balin 2015-09-17 13:21:22 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.