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

Bug 350007

Summary: [Xbase] Content assist doesn't work with prefixes ending with period.
Product: [Modeling] TMF Reporter: Esa Ryhänen <erules>
Component: Xtext BacklogAssignee: Project Inbox <tmf.xtext-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: achim.demelt, chanskw, mkomor, sebastian.zarnekow, sven.efftinge
Version: 2.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 409580    

Description Esa Ryhänen CLA 2011-06-22 03:16:18 EDT
Build Identifier: M20110210-1200

Content assist will not show any proposal when the prefix ends with a period ('.').

Reproducible: Always

Steps to Reproduce:
1. Create following Xtend2 class:

package test
class X {
   def func() {
       var aa = new java.util.|  // pipe (|) is where CA is activated.
   }
}

2. Activate content assist as indicated above.
Comment 1 Sebastian Zarnekow CLA 2011-07-26 06:14:33 EDT
The parser performs some strange error recovery for the given scenario.
One could introduce something like this:

QualifiedNameWithDot:
	QualifiedName '.'?
;

and use that one here

XConstructorCall returns XExpression:
	{XConstructorCall}
	'new' constructor=[types::JvmConstructor|QualifiedNameWithDot] 
	..
;

and in the XAnnotation rule. However, additional validation would be necessary to catch errors like

new java.util.ArrayList.(5)

and the fix cannot be easily applied to 

def java.util.|<EOF>

or def String foobar(java.util.|<EOF>

I'll investigate further in the error recovery issue
Comment 2 Sven Efftinge CLA 2011-09-26 08:55:28 EDT
not 2.1