Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 90769 - [content assist] Codeassist during "rename in file" overwrites to much
Summary: [content assist] Codeassist during "rename in file" overwrites to much
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-08 03:15 EDT by Jan Schnabel CLA
Modified: 2013-06-24 03:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Schnabel CLA 2005-04-08 03:15:52 EDT
there occur problems when the identifier is renamed by an complex expression:

e.g.

HashMap hashmMap = new HashMap();
Object[] array = (Object[]) collection.toArray(new Object[collection.size()]);

I use "Quick Fix" -> "Rename in file" to replace "collection" by "hashMap.
values()"

the result is: 
Object[] array = (Object[]) hashmMap.values()oArray(new Object[hashmMap.values(
).size()]);

maybe the brakes are ignored when the count of characters to insert is 
calculated?
Comment 1 Dani Megert CLA 2005-04-11 05:02:35 EDT
works for me using I20050405-0800
Comment 2 Jan Schnabel CLA 2005-04-11 06:45:33 EDT
I use S-3.1M6-200504011645.
In eclipse preferences i have activated "Java"->"Editor"->"Code Assist"-
>"Insertion"->"Completion overwrites"
The error occurs if i use auto completion to complete "values()". 
If I type "v" and complete then (CTRL-SPACE) the first character of ".toArray()" 
is overwritten.
If I type "va" and complete then the first two characters of ".toArray()" (".t") 
are overwritten and so on.
Comment 3 Dani Megert CLA 2005-04-11 06:53:08 EDT
Used steps in comment 0. There was no code assist involved ;-)
Comment 4 Jan Schnabel CLA 2005-04-11 07:44:39 EDT
sorry, I admit that was not self explaining ;-)
Comment 5 Dani Megert CLA 2013-06-24 03:20:39 EDT
Works for me using 4.3 RC4.