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

Bug 370239

Summary: [scoping] Cannot use ListExtensions without an import
Product: [Tools] Xtend Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: BacklogAssignee: Karsten Thoms <karsten.thoms>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: karsten.thoms, sven.efftinge, tmf.xtext-inbox
Version: 2.3.0Flags: sebastian.zarnekow: juno+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Screenshot none

Description Sebastian Zarnekow CLA 2012-01-31 11:23:20 EST
Code snippet (cursor position |):

val list = new ArrayList<String>();
ListExtensions|::map(list, null)

You'll get multiple error markers on #map due to a missing import for ListExtensions.

1) Place the cursor at | and invoke CA.
2) ListExtensions is proposed but an import will not be added

3) Import 'org.eclipse.xtext.xbase.lib.ListExtensions' manually and everything will be ok

Expectation: org.eclipse.xtext.xbase.lib.* is implicitly imported or CA will add the import automatically
Comment 1 Karsten Thoms CLA 2016-08-20 17:40:16 EDT
A missing import is not marked anymore, ListExtensions is implicitly imported.
Comment 2 Karsten Thoms CLA 2016-08-20 17:40:50 EDT
Created attachment 263688 [details]
Screenshot