Bug 97307 - [5.0][typing] completion for "import static" deletes all source before
Summary: [5.0][typing] completion for "import static" deletes all source before
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.1 RC2   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 97579 (view as bug list)
Depends on:
Blocks: 95096
  Show dependency tree
 
Reported: 2005-05-30 12:25 EDT by Andrey Loskutov CLA
Modified: 2005-06-10 12:25 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2005-05-30 12:25:14 EDT
Consider followed class:
--------------------
/**
 * Just for test
 */
package de.loskutov.ai;
import java.awt.*;

public class A {
}
--------------------
Now try to type "import static java.lang.Double.pa" and do "ctrl+space" after ".
pa":

--------------------
/**
 * Just for test
 */
package de.loskutov.ai;
import java.awt.*;
import static java.lang.Double.pa<- cursor is here
public class A {
}
----------------

The entire source before static import will be deleted:

---------------
java.lang.Double.parseDouble;

public class A {
}
---------------
I'm running 3.1.0 Build id: I20050527-1300 on JDK 1.5.0_3 for Windows.
Comment 1 Dani Megert CLA 2005-05-30 12:31:20 EDT
Approving for 3.1 RC2.
Comment 2 Tom Hofmann CLA 2005-06-01 05:34:58 EDT
*** Bug 95096 has been marked as a duplicate of this bug. ***
Comment 3 Tom Hofmann CLA 2005-06-01 05:45:49 EDT
The replaceStart and replaceEnd properties of METHOD_NAME_REFERENCE proposals
are not set. Both are zero.
Comment 4 Philipe Mulet CLA 2005-06-01 08:03:06 EDT
+1 for RC2
Comment 5 Philipe Mulet CLA 2005-06-01 08:03:12 EDT
+1 for RC2
Comment 6 David Audel CLA 2005-06-01 08:33:43 EDT
Fixed and test added
  CompletionsTests_1_5#test0223()
Comment 7 David Audel CLA 2005-06-02 03:22:10 EDT
*** Bug 97579 has been marked as a duplicate of this bug. ***
Comment 8 Olivier Thomann CLA 2005-06-06 15:38:31 EDT
Verified using N20050606-0010 + JDT/Core HEAD
Comment 9 Olivier Thomann CLA 2005-06-10 12:25:46 EDT
Verified in I20050610-0010.