Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 529457

Summary: Autocomplete of import static fails if previous imports are folded
Product: [Eclipse Project] JDT Reporter: Martin Tilsted <mtilsted>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 4.7.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Martin Tilsted CLA 2018-01-05 09:52:53 EST
I have this code:

package com.example.mypackage

import java.util.ArrayList;
import java.util.Collections;

If the imports are folded (So only the first import is shown) and I put the cursor on the line after the last import line and then type

import static java. (And then hit ctrl+space to do a auto complete). the line containing the static import disappear. (And the document dom get messed up, so I need to close the editor and open it again to see the line). 

The above is just an example, auto complete of static import fails if there are folded imports on the previous line, no matter which classes are being imported. 

This bug is also present in Eclipse 4.6 (And most likely older versions too).
Comment 1 Martin Tilsted CLA 2018-01-05 09:59:35 EST
Sorry, seems my eclipse had update problems. This is indeed fixed in 4.7.2. Thank you :)