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 234933 - pom code completion, wrong closing tag
Summary: pom code completion, wrong closing tag
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords: REGRESSION
: 236345 241515 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-24 12:08 UTC by everflux
Modified: 2015-05-17 05:24 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
suggestion (9.33 KB, image/png)
2013-08-24 12:08 UTC, everflux
Details
wrong completion (8.35 KB, image/png)
2013-08-24 12:08 UTC, everflux
Details

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2013-08-24 12:08:23 UTC
Created attachment 139171 [details]
suggestion

given: valid pom, adding a dependency manually:

...
<dependency>
            <groupId>javax.json</groupId>
            <artifactId>javax.json-api</artifactId>
            <version>1.0</version>
            <scope>####cursor####
        </dependency>
...

I type: "prov"<ctrl><space>
Netbeans suggests "provided" - great. I hit "return".

Result:
<scope>provided</dependency>

Expected result:
<scope>provided</scope>

Or at least
<scope>provided
Comment 1 everflux 2013-08-24 12:08:58 UTC
Created attachment 139172 [details]
wrong completion
Comment 2 everflux 2013-08-24 12:09:08 UTC
Product Version: NetBeans IDE Dev (Build 201308222300)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
Comment 3 markiewb 2013-10-06 12:37:30 UTC
*** Bug 236345 has been marked as a duplicate of this bug. ***
Comment 4 Svata Dedic 2015-05-13 10:41:38 UTC
The current state exhibits the defect only if a fragment of the value is entered; so if the text contains
<scope>p{caret}
and completion completes the prefix, the trailing whitespaces are erased.
Comment 5 Svata Dedic 2015-05-13 13:19:52 UTC
Fixed in jet-main#8b2e051e65e0

The closing tag will not be inserted when multiple nested (same) tags are present.
Comment 6 Svata Dedic 2015-05-14 14:06:56 UTC
*** Bug 241515 has been marked as a duplicate of this bug. ***
Comment 7 Quality Engineering 2015-05-17 05:24:12 UTC
Integrated into 'main-silver', will be available in build *201505170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8b2e051e65e0
User: Svata Dedic <sdedic@netbeans.org>
Log: #234933: avoid eating whitespaces when completing tag contents. Insert closing tag if missing