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.
I have not figured out how to reliably reproduce this, but this has been happening to me all day. Sometimes it works, sometimes it doesn't. I am manually typing out an XML file by hand. Sometimes when I type <elementName value="blah">, it will immediately offer code completion for the closing element. Other times it won't, and will say "No suggestions". When it does work, I can backspace the whole line, type it again, and this time it won't work. Other times I'll put my cursor after an element I have just created (such as <elementName>) and press CTRL-SPACE. Sometimes it offers the closing element, other times it doesn't. I am using an XML schema and the elements I am created are legal in the location I am typing them. I forget how, but sometimes it will add the completion on the next line indented instead of at the same column of the opening element. For example: <element> </element> I might have pressed enter after creating the opening element, then pressed CTRL-SPACE to get code completion and enter to select the closing element. I was surprised that it added it where it did (the cursor was not there originally). Again I find it difficult to reproduce as I am getting exceptions, and flaky element completion. I have been reporting the exceptions using the GUI tool as they happen.
Also I've noticed that if I put my cursor directly after an opening element that is not yet closed (such as <element>), then type </ it will sometimes offer element completion, and usually it will not.
Product Version: NetBeans IDE 6.0 Beta 2 (Build 200710160000) Java: 1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-87 System: Mac OS X version 10.4.10 running on i386; MacRoman; en_US (nb) response: Reporter, rdelaplante, if you can provide exact steps to reproduce 100% it would be great. Downgrading because this is not reproducible all the time. I can see that sometimes CC does not suggest anything yet ctrl+space will close the tag.I can reproduce somewhat if I manually enter an opening tag, CC does not have a suggestion, but if I click on another line then click back after that tag and invoke CC I get a close tag suggestion. Steps for that: 1. Create a new well-formed XML document 2. inside of the root block type "<element>" no CC is offered and ctrl+space does not complete 3. click on the line above after "<root>" 4. click after "<element>" and invoke CC via ctrl+space and the closing tag is inserted.
Still a problem. CC isn't giving suggestion to close tags in an XML document. The steps I provided on October 17 are still valid. Reproduced on Mac OS and Linux w/ 6.1 m1, JDK 1.5.0_13 (Mac), and JDK 1.6.0_04(linux)
Solaris x86/JDK1.6.0_07 and Windows Vista/1.6.0_05. This just works. Every time I create a start tag, I do get a closing tag.
Verified. Product Version: NetBeans IDE Dev (Build 200807221016) Java: 1.6.0_05; Java HotSpot(TM) 64-Bit Server VM 1.6.0_05-b13-52 System: Mac OS X version 10.5.4 running on x86_64; MacRoman; en_US (nb)