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 230992 - Content of POM is corrupted after placeholder auto-complete
Summary: Content of POM is corrupted after placeholder auto-complete
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.4
Hardware: PC Windows 8 x64
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-09 18:36 UTC by kalwi
Modified: 2013-06-14 02:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kalwi 2013-06-09 18:36:13 UTC
When I auto-complete a property placeholder in POM file, the closing element is cut at the beginning.

Example:
1) Define property 'version.org.slf4j'.
2) Let's type the following ('|' character is cursor position):
  <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>${ver|</version>
  </dependency>

3) Press Ctrl + Space, choose the property from drop down menu, press Enter.
4) The placeholder with property is auto-completed, but the closing element is corrupted:
    <version>${version.org.slf4j}ersion>

It's always cut by three characters, maybe there is somewhere forgotten to include '${}' chars to auto-completed string length?

I'm not sure whether this is a bug just in POM editor or also somewhere else (e.g. Spring context XMLs), I haven't reproduced it elsewhere.

---
Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-11090-on-20130606)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Windows 8 version 6.2 running on amd64; Cp1250; cs_CZ (nb)
User directory: C:\Users\kalwi\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\kalwi\AppData\Local\NetBeans\Cache\dev

Reproduced also on another NB installation on Windows 7 x64.
Comment 1 Svata Dedic 2013-06-10 13:40:16 UTC
Fixed in jet-main#477c7d3527f9

Note the fix also affects the issue #228865, needs to be re-tested.
Comment 2 Quality Engineering 2013-06-14 02:00:44 UTC
Integrated into 'main-golden', will be available in build *201306132301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/477c7d3527f9
User: Svata Dedic <sdedic@netbeans.org>
Log: #230992: reimplemented deletion of original text, respects both prefix (kept) and suffix (removed)