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.
When writing "</" the completion popup window suggests the apropreate closing tag. To insert the closing tag I have to press enter. When someone writes "</" in XML, he is defenetely closing an open tag. The tag should thus be inserted automatically without requireing the user to press enter. Most XML editors I know of do it that way, and I think this editor should do this too. Following changes in the org.netbeans.modules.xml.text.completion.XMLCompletionQuery class will fix this: In the query(JTextComponent component, int offset, SyntaxSupport support) method the following line: return null; //??? end tag handling should be replaced by: if (preText.endsWith("</") && token.getTokenID().getNumericID() == XMLDefaultTokenContext.TEXT_ID) { list = findStartTag((SyntaxNode) element); if (list != null && list.size() == 1) { ElementResultItem item = (ElementResultItem)list.get(0); item.substituteText(component, offset, 0, 0); } } return null; //??? end tag handling And in the query(SyntaxNode element, TokenItem token, String text) method the following lines should be commented out: } else if ( text.endsWith("</" )) { return findStartTag((SyntaxNode) element); I will attach the the changed file. The changes can be better viewed by diffing it to version 1.10.
Created attachment 5357 [details] org.netbeans.modules.xml.text.completion.XMLCompletionQuery after changing v1.10
Nice enhancement! Thank you, I have applied it PS: why do not use "cvs di" next time?
Verified