Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350007 - [Xbase] Content assist doesn't work with prefixes ending with period.
Summary: [Xbase] Content assist doesn't work with prefixes ending with period.
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext Backlog (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 409580
  Show dependency tree
 
Reported: 2011-06-22 03:16 EDT by Esa Ryhänen CLA
Modified: 2013-05-31 08:43 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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