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 63757 - CC eats up following word for some "&" tags in XML docs
Summary: CC eats up following word for some "&" tags in XML docs
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 5.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-07 09:27 UTC by Max Sauer
Modified: 2007-09-25 01:33 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 Max Sauer 2005-09-07 09:27:14 UTC
Using of CC when having carret placed right before a word can result in
replacing the word.

Steps to reproduce:
--------------------
1) Open an xml file
2) Place carret in front of a word (ie. |foo, not in fron of a tag)
3) Invoke CC and choose for example ", >
--> The 'foo' word gets replaced by the selected item.

[200509070103, JDK 1.5.0_05, solaris 10 /sparc]
Comment 1 Jiri Kovalsky 2005-09-07 10:07:17 UTC
Maybe this is somehow related to issue #59329 ?
Comment 2 Max Sauer 2005-09-07 10:26:25 UTC
> Maybe this is somehow related to issue #59329 ?

IMO not.
Comment 3 Marek Fukala 2005-10-04 08:35:42 UTC
This happens because of the CC considers the text above & as a reference so it
replaces it with the newly selected one. It is not a bug it is a feature :-).
Yes, you are right, it bad to replace the entire text - I will fix it.
Comment 4 Marek Fukala 2005-10-04 10:09:58 UTC
fixed. 

The CC now recognizes the content of the text right to the cursor and if it is
not a reference entity it doesn't replace it otherwise deletes the original
entity reference by the new one.

Checking in
xml/text-edit/src/org/netbeans/modules/xml/text/completion/SyntaxQueryHelper.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/completion/SyntaxQueryHelper.java,v
 <--  SyntaxQueryHelper.java
new revision: 1.11; previous revision: 1.10
done
Comment 5 Max Sauer 2005-10-05 08:56:02 UTC
Verified in 200510050426. Thanks for a 'fix of feature' :)
Comment 6 Marek Fukala 2007-08-15 10:01:50 UTC
change reverted - it causes issue #93652. The issue is not reproducible even without the fix, so it has likely been
fixed by another fix.

Checking in SyntaxQueryHelper.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/completion/SyntaxQueryHelper.java,v  <--  SyntaxQueryHelper.java
new revision: 1.17; previous revision: 1.16
done
Comment 7 Max Sauer 2007-08-17 10:03:17 UTC
It works as expected. Thanks.