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 typing in a pom.xml file and adding new xml elements to the file, the "code-completion" of pom.xml tags jumps to a newline when auto-completing an item. In NetBeans 6.8, when editing a pom.xml and auto-completing an item, it would keep the caret on the same line. This bug makes editing a pom.xml a BIG PAIN because you spend a LOT of unnecessary time repositioning your cursor. Reproduce 1. Create a new Maven Project (such as "Maven Quickstart Archtype") 2. Open the pom.xml file 3. Create a new <dependency> section by adding a newline after an existing </dependency> 4. Type "<dep" (the completion popup will appear with "dependency" in the list) 5. Hit ENTER to select "dependency" from the list Results "<dependency>" is completed on the line and the cursor is position to the next line Expected results "<dependency" is completed on the line and the cursor remains on the same line (at the end of the completion. (example <dependency| ) AND after typing ">" a new completion popup appears with "</dependency>" in the list. (the same behavior as NetBeans 6.8)
While I agree that this issue can be annoying, this bug doesn't meet the criteria for being P1. Please don't abuse our priority standards and do your homework (=read priority guidelines). Thank you. Btw you are right, version 6.8 did position the caret differently. However this is general issue of completion over xml files (try layer files for example), not related to Maven support, so reassigning.
Alex, please take a look.
Fixed in trunk: http://hg.netbeans.org/main/rev/8775074ea6a9
Integrated into 'main-golden', will be available in build *201005170932* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ User: Log:
*** Bug 185898 has been marked as a duplicate of this bug. ***
Integrated into 'main-golden', will be available in build *201005182201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ User: Log:
It correctly puts the cursor on the right line, however it is not between the elements. Compare with html completion. To reproduce, create any xml element in an xml document, for example <foo>. If I create the <foo> element and then press ctrl-space I expect it to look like this: <foo>|</foo> where "|" is the location of the cursor. When completing in an html document, and when completing in 6.8 it works as expected. When completing in 6.9-rc1 the cursor is positioned like this (after the closing element): <foo></foo>| I have seen this on both windows and linux.
This bug related to the original description http://netbeans.org/bugzilla/show_bug.cgi?id=186007#c0 has been fixed. Please file a new bug with new description according to http://netbeans.org/bugzilla/show_bug.cgi?id=186007#c7.
I don't believe that it does. The last sentence in the description says "the same behavior as NetBeans 6.8". It does not have the same behavior as netbeans 6.8. My comment was to clarify what the original description said. The current behavior still has the same problems as initially described because you still have to "spend a LOT of unnecessary time repositioning your cursor." The fix only addressed 1 aspect of the problem - putting the cursor on the following line. It did not address the rest of the issue - the positioning of the cursor for efficiency while editing xml documents.
I would have to agree.... while the current FIX is MUCH better than the original bug, the FIX does a different behavior than NetBeans 6.8, and will cause the user to still have to potentially reposition the caret.
I'd like to explain why I'd prefer to get a new bug. 1. In my opinion the key words of the original bug are - "keep the caret on the same line" (it's a difference from NB 6.8 behaviour): "In NetBeans 6.8, when editing a pom.xml and auto-completing an item, it would keep the caret on the same line." I'm not sure that "a BIG PAIN because you spend a LOT of unnecessary time repositioning your cursor" is a real software bug (probably medical trouble). 2. The fix was already integrated into 'main-golden' and I think that another changing of source code should be marked with a new bug number.
I have created http://netbeans.org/bugzilla/show_bug.cgi?id=186916 as a follow up to this issue as requested.
Thank you. The bug http://netbeans.org/bugzilla/show_bug.cgi?id=186916 has been fixed.